Description Usage Arguments Details Value See Also Examples
Expand input data frame to indicate year of diagnosis and number of cases detected by screening.
1 2 | calculate_screen(dset, sensitivity, attendance, screen.start.year,
screen.stop.year)
|
dset |
A data frame of disease incidence as produced by
|
sensitivity |
Proportion of relevant disease detected by screening. |
attendance |
Proportion of individuals who attend screening tests. |
screen.start.year |
Year of follow-up at which screening starts. |
screen.stop.year |
Year of follow-up at which screening stops. |
This function expects that the input data frame dset
contains
a variable sojourn
with a single unique value. Create new variables
to record year of each screening round (exclusive of stopping year). The
number of false negatives are bounded (1) below by 0 and screen round - 1
and (2) above by number of tests - 1 and sojourn time - 1 Check that
incidence of onset matches diagnoses. Reshape dataset to indicate number of
screen detections in each screen year.
A data frame of simulated disease incidence organized by year of preclinical onset, sojourn time, and year of clinical diagnosis.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(plyr)
library(reshape)
dset <- generate_absence(1000, 0.001, 0, 6, 10)
cset <- ddply(dset,
.(sojourn),
calculate_clinical,
sensitivity=0.5,
attendance=0.8,
screen.start.year=0,
screen.stop.year=10)
sset <- ddply(cset,
.(sojourn),
calculate_screen,
sensitivity=0.5,
attendance=0.8,
screen.start.year=0,
screen.stop.year=10)
print(head(sset))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.