Description Usage Arguments Value Examples

Generates expected baseline health outcome counts based on average outcome and desired seasonal and / or long-term trends.

1 2 | ```
sim_baseline(n, lambda, trend = "no trend", slope = 1, amp = 0.6,
start.date = "2000-01-01")
``` |

`n` |
A numeric value specifying the number of days for which to simulate data |

`lambda` |
A numeric value specifying the mean for the expected outcomes |

`trend` |
A character string that specifies the desired trend function. Options are: "no trend": No trend, either seasonal or long-term (default). "cos1": A seasonal trend only. "cos2": A seasonal trend with variable amplitude across years. "cos3": A seasonal trend with steadily decreasing amplitude over time. "linear": A linear long-term trend with no seasonal trend. "curvilinear": A curved long-term trend with no seasonal trend. "cos1linear": A seasonal trend plus a linear long-term trend.
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. |

`start.date` |
A date in the format "yyyy-mm-dd" specifying the first day for which to simulate data |

A data frame with the date and expected baseline outcome count for each day of simulated data.

1 | ```
sim_baseline(n = 5, lambda = 100, trend = "cos1")
``` |

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.