View source: R/rr.profile.plot.R
rr.profile.plot | R Documentation |
Plot a vitamin D status profile for a single participant and the relative risk curve for vitamin D (with exposure times and whether a participant was infected at that exposure time) side by side.
rr.profile.plot( x, expos, infect, idx = 1, ... )
x |
An object of class |
expos |
An object of class |
infect |
An object of class |
idx |
Index of curve to plot. |
... |
Additional arguments to |
Rebecca Mangan and Jason Wyse
# 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 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.