| Title: | Interface to the paratuberculosis model contained in the PTBinraeR package |
|---|---|
| Description: | This is a wrapper package for INRAE's PTB model. The model can be run using the run_ptb_model function. See the vignette for more information. |
| Authors: | Matt Denwood [aut, cre], Sandie Arnoux [aut] |
| Maintainer: | Matt Denwood <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.2.2-1 |
| Built: | 2026-05-09 08:05:42 UTC |
| Source: | https://github.com/ku-awdc/PTBinteRface |
This is a wrapper for the INRAE PTB model. Note that (currently) this is a very thin wrapper; all RNG are C++ i.e. set.seed will have no effect. Also there is no checking for interrupt signals...
run_ptb_model( runsNb = 1L, calfExposure = 1, cullingRateIh = 1/26, testSensitivityItIl = 0.15, testSensitivityIm = 0.47, testSensitivityIh = 0.71, testSpecificity = 1, startGrazing = 14L, endGrazing = 46L, ageAtWeaning = 10L, ageAtGrazing = 26L, ageYoungHeifer = 52L, ageHeifer = 91L, ageAtFirstCalving = 130L, noInfection = FALSE, InitialInfection = PTBinraeR::InitialInfection, BirthFemaleEvents = PTBinraeR::BirthFemaleEvents, CullingRates = PTBinraeR::CullingRates, Headcounts = PTBinraeR::Headcounts, Network = PTBinraeR::Network, seed = sample(.Machine$integer.max, 1) )run_ptb_model( runsNb = 1L, calfExposure = 1, cullingRateIh = 1/26, testSensitivityItIl = 0.15, testSensitivityIm = 0.47, testSensitivityIh = 0.71, testSpecificity = 1, startGrazing = 14L, endGrazing = 46L, ageAtWeaning = 10L, ageAtGrazing = 26L, ageYoungHeifer = 52L, ageHeifer = 91L, ageAtFirstCalving = 130L, noInfection = FALSE, InitialInfection = PTBinraeR::InitialInfection, BirthFemaleEvents = PTBinraeR::BirthFemaleEvents, CullingRates = PTBinraeR::CullingRates, Headcounts = PTBinraeR::Headcounts, Network = PTBinraeR::Network, seed = sample(.Machine$integer.max, 1) )
runsNb |
number of repetitions (default=1L) |
calfExposure |
calf rearing improvement is defined as a reduced exposure to the general environment by varying parameter from 1.0 to 0.35 (default=1.0) |
cullingRateIh |
culling rate of detected Ih animals (default=1.0/26.0) |
testSensitivityItIl |
test sensitivity of low positive animals. (default=0.15) |
testSensitivityIm |
test sensitivity of moderately positive animals. (default=0.47) |
testSensitivityIh |
test sensitivity of highly positive animals. (default=0.71) |
testSpecificity |
test specificity. (default=1.0) |
startGrazing |
Grazing start week (from 0 to 51, default=14L, beginning of April) |
endGrazing |
Grazing end week (from 0 to 51, default=46L, mid November) |
ageAtWeaning |
From this age, in terms of number of weeks, the animal is weaned (default=10L) |
ageAtGrazing |
From this age, in terms of number of weeks, the animal can go outside during grazing period (default=26L) |
ageYoungHeifer |
From this age, in terms of number of weeks, the animal is considered to be a young heifer (default=52L, one year old) |
ageHeifer |
From this age, in terms of number of weeks, the animal is considered to be a heifer, starts reproduction (default=91L) |
ageAtFirstCalving |
From this age, in terms of number of weeks, the animal is considered to be a cow, calves for the first time (default=130L) |
noInfection |
all herds will be initialized without infected animals, so no PTB spread (default=FALSE) |
InitialInfection |
if not empty, then load initial 'infection' from this DF/tibble: 1 line = 1 infected herd with id, nbInfectedAnimals, prevalence and repetitionNum refering to a line in 'initCondFileName' (tibble/DF, default=0 rows) |
BirthFemaleEvents |
a tibble/DF - see ?BirthFemaleEvents |
CullingRates |
a tibble/DF - see ?CullingRates |
Headcounts |
a tibble/DF - see ?Headcounts |
Network |
a tibble/DF - see ?Network |
seed |
the random number seed to use |
a list of tibbles corresponding to the files output by the model