exposure.levels: Generate exposures to infectious agent and vitamin D status

View source: R/exposure.levels.R

exposure.levelsR Documentation

Generate exposures to infectious agent and vitamin D status

Description

exposure.levels creates a list of the exposures to an infectious agent and the status of vitamin D at the time of each exposure for each participant. The exposure times are simulated from a non homogeneous poisson process.

Usage

  exposure.levels( x, rate, intensity.func = intensity.function(), start = 0, end = 1 )

Arguments

x

An object of class vitd.curve.

rate

Expected number of exposures per week, the rate at which exposures occur in an equivalent homogeneous Poisson process.

intensity.func

A function that takes time as sole argument and returns value between 0 and 1, scaling the rate argument. For example, exposures may be higher at certain times for seasonal infections.

start

Start time of the study in units of years.

end

End time of study in units of years.

Value

exposure.levels returns an object of class exposure.levels that is a list. The list has the following slots.

exposures

The exposure times to infection for each participant.

levels

The vitamin D staus levels for each participant at the time of exposure to infection.

Author(s)

Rebecca Mangan and Jason Wyse


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