construct_rw | R Documentation |
This function takes random walks as defined
by rw()
, produces the required additional variables
(denoted using a "c" prefix and constructed using
enw_add_cumulative_membership()
), and then returns the
extended data.frame
along with the new fixed effects and the
random effect structure.
construct_rw(rw, data)
rw |
A random walk term as defined by |
data |
A |
A list containing the following:
data
: The input data.frame
with the addition of the new variables
required by the specified random walk. These are added using
enw_add_cumulative_membership()
.
-terms
: A character vector of new fixed effects terms to add to a model
formula.
effects
: A data.frame
describing the random effect structure of the
new effects.
Functions used to help convert formulas into model designs
as_string_formula()
,
construct_re()
,
enw_formula()
,
enw_manual_formula()
,
parse_formula()
,
re()
,
remove_rw_terms()
,
rw()
,
rw_terms()
,
split_formula_to_terms()
data <- enw_example("preproc")$metareference[[1]]
epinowcast:::construct_rw(rw(week), data)
epinowcast:::construct_rw(rw(week, day_of_week), data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.