# individual profiles
indprofiles <- vitd.curve( n=10, type="placebo" )
# 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 )
# disease calculation
infect <- infection.count( expos )
# plot RR profile
rr.profile.plot( indprofiles, expos, infect )
Run the code above in your browser using DataLab