rw: Adds random walks with Gaussian steps to the model.

rwR Documentation

Adds random walks with Gaussian steps to the model.

Description

A call to rw() can be used in the 'formula' argument of model construction functions in the epinowcast package such as enw_formula(). Does not evaluate arguments but instead simply passes information for use in model construction.

Usage

rw(time, by, type = c("independent", "dependent"))

Arguments

time

Defines the random walk time period.

by

Defines the grouping parameter used for the random walk. If not specified no grouping is used. Currently this is limited to a single variable.

type

Character string, how standard deviation of grouped random walks is estimated: "independent", or "dependent" across groups; enforced by base::match.arg().

Value

A list defining the time frame, group, and type with class "enw_rw_term" that can be interpreted by construct_rw().

See Also

Functions used to help convert formulas into model designs as_string_formula(), construct_re(), construct_rw(), enw_formula(), enw_manual_formula(), parse_formula(), re(), remove_rw_terms(), rw_terms(), split_formula_to_terms()

Examples

rw(time)

rw(time, location)

rw(time, location, type = "dependent")

seabbs/epinowcast documentation built on Sept. 20, 2024, 2:39 a.m.