rr.profile.plot: Plotting a vitamin D profile and relative risk curve.

View source: R/rr.profile.plot.R

rr.profile.plotR Documentation

Plotting a vitamin D profile and relative risk curve.

Description

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.

Usage

rr.profile.plot( x, expos, infect, idx = 1, ... )

Arguments

x

An object of class vitd.curve.

expos

An object of class exposure.levels.

infect

An object of class infection.count.

idx

Index of curve to plot.

...

Additional arguments to plot.

Author(s)

Rebecca Mangan and Jason Wyse

Examples

# 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 )

SimVitD documentation built on Aug. 20, 2023, 5:06 p.m.