Description Usage Arguments Details Examples
View source: R/SampleSizeCalc.R
Updating sample size calculations for trial design
1 2 | Sample.size.calc(modresult, radi, pixdistmat, adultsonly = FALSE,
foi = 0.1, agedist = NA, dly = 0)
|
modresult |
a Spatial dengue model object returned from DEN.spatial |
radi |
radius around the index patch that infections / cases are observed within |
pixdistmat |
A patch distance matrix, see example |
adultsonly |
logical, will the trial only include adults (= TRUE), or all ages (= FALSE) |
foi |
single values range 0-1, long term average force of infection in the area concerned, usually estimated from age-stratified seroprevalence surveys, optional, defaults to 0.1 ~ an endemic setting, only required if adultsonly = TRUE |
agedist |
optional vector of counts of individuals in 1 year age bands in years 0-100, defaults to an exponential age distribution otherwise |
dly |
single value, Days between observign symptomatic case and visiting index case's home, defaults to 0 (day of becoming symptomatic) |
returns four plots showing: i) total people within the specified radius of each index cases, ii) total seronegative people within the specified radius of each index case, iii) infection incidence within the radius of each index case in the 28 days following the visit, iv) symptomatic disease incidence in the radius of the index case in the 28 days following the visit Each of these measures are plotted over time over the course of the outbreak with red splines showing the estimated median value. A data.frame is also returned summarising these distributions over the course of the experiment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(sgdat)
data(sgpop)
sgpop <- pop.process(sgpop, agg = 10)
unipix <- make.unipix(sgpop)
pixdistmat <- distm(cbind(unipix$x, unipix$y))
sgdat <- data.frame(sgdat, patchID = apply(cbind(sgdat[, 3:2]), 1, pix.id.find, unipix))
weekdates <- c(40, 92)
# model run with default parameters
denmod_sim <- DEN.spatial(weekdates, sgdat, unipix, pixdistmat)
set.seed(123)
Sample.size.calc(denmod_sim, radi = 1000, pixdistmat, adultsonly = FALSE)
# now just adults only
set.seed(123)
Sample.size.calc(denmod_sim, radi = 1000, pixdistmat, adultsonly = TRUE, foi = 0.12)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.