Description Usage Arguments Value Examples
Creates a trend vector for a continuous exposure.
1 2 |
n |
A non-negative integer specifying the number of days to simulate. |
trend |
A character string that specifies the desired trend function. Options are:
See the package vignette for examples of the shapes of these trends. |
slope |
A numeric value specifying the slope of the trend, to be used
with |
amp |
A numeric value specifying the amplitude of the seasonal trend. Must be between -1 and 1. |
custom_func |
An R object specifying a customized function from
which to create a trend variable. Must accept the arguments |
... |
Optional arguments to a custom trend function |
A numeric vector of simulated exposure values for each study day, to be used to generate data with seasonal trends.
1 | calc_t(5, "cos3", amp = .5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.