# simulate individual Vitamin D profiles
indprofiles <- vitd.curve( n=10, type="placebo" )
# make a plot of all these profiles
plot( indprofiles )
# intensity function for exposures to infection
intensfun <- intensity.function( summer.rate=0.1, winter.rate=0.9 )
# exposure times
expos <- exposure.levels( indprofiles, rate=2, intensfun, end=2 )
# plot of exposures on top of Vitamin D profiles
plot( expos )
# disease calculation
infect <- infection.count( expos )
# plot disease points on top of exposure points
infection.count.plot( expos, infect )
Run the code above in your browser using DataLab