Description Usage Arguments Value See Also Examples
Generate a data frame representing a population of pop.size
individuals and record relevant disease diagnosed with and without screening
and overdiagnoses under gradual dissemination of screening.
1 2 3 4 | multipopulation_setting(pop.size = 1e+05, onset.rate = 0.001,
sojourn.min = 0, sojourn.max = 6, sensitivity = 0.5,
overdiag.rate = 0.25, proportion = c(0.05, 0.1, 0.15, 0.15, 0.05, 0.5),
start.year = c(2, 3, 4, 5, 6, 28), followup.years = 30)
|
pop.size |
Number of individuals in the simulated population. |
onset.rate |
Annual incidence rate of relevant preclinical disease. |
sojourn.min |
Shortest relevant preclinical duration. |
sojourn.max |
Longest relevant preclinical duration. |
sensitivity |
Screen test episode sensitivity. |
overdiag.rate |
Proportion of screen detections that are overdiagnosed. |
proportion |
Vector of proportions (that sum to 1) representing components of the population that initiate screening in specified years. |
start.year |
Vector of years in which the corresponding component of the population initiates screening. |
followup.years |
Number of years of follow-up. |
A data frame of simulated disease incidence organized by year of preclinical onset, sojourn time, and year of diagnosis.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(plyr)
library(reshape)
mpset <- multipopulation_setting()
print(head(mpset))
multipopulation_2ways <- function(dissemination.pattern='default'){
if(dissemination.pattern == 'default'){
proportion <- c(0.05, 0.1, 0.15, 0.15, 0.05, 0.5)
start.year <- c(2, 3, 4, 5, 6, 28)
dissemination.name <- 'Cumulative uptake (years 2-6): 5%,15%,30%,45%,50%'
} else {
proportion <- c(0.1, 0.3, 0.1, 0.5)
start.year <- c(2, 3, 4, 28)
dissemination.name <- 'Cumulative uptake (years 2-4): 10%,40%,50%'
}
mpset <- multipopulation_setting(proportion=proportion,
start.year=start.year)
mpset <- transform(mpset, dissemination=dissemination.name)
return(mpset)
}
mpset_default <- multipopulation_2ways(dissemination.pattern='default')
mpset_variant <- multipopulation_2ways(dissemination.pattern='variant')
mpset_2ways <- rbind(mpset_default, mpset_variant)
print(head(mpset_2ways))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.