Description Usage Arguments Value Examples

Fits a model to estimate the log relative risk between an exposure and outcome
by using a natural cubic spline to control for long-term and seasonal trends and
assuming a quasi-Poisson distribution for the outcome. This function provides an
example of a function that can be input to `eesim`

or `power_calc`

.

1 | ```
spline_mod(df, df_year = 7)
``` |

`df` |
A data frame with columns for daily exposure and outcome called "x" and "outcome", respectively |

`df_year` |
A numeric value specifying the degrees of freedom per year to use in the spline to control for long-term and seasonal trends in the outcome. |

A numeric vector of length six with summary measures from fitting this model to simulated data.

1 2 3 4 | ```
exp <- sim_exposure(n = 500, central = 100, sd = 10, trend = "cos1",
amp = .6, exposure_type = "continuous")
out <- sim_outcome(exposure = exp, average_outcome = 22, rr = 1.01)
spline_mod(df = out)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.