randcov_params {spmodel} | R Documentation |
Create a random effects covariance parameter object
Description
Create a random effects covariance parameter object for use with other functions.
Usage
randcov_params(..., nm)
Arguments
... |
A named vector (or vectors) whose names represent the name of each random
effect and whose values represent the variance of each random effect. If
unnamed, |
nm |
A character vector of names to assign to |
Details
Names of the random effects should match eligible names given to
random
in modeling functions. While with the random
argument to these functions, an
intercept is implicitly assumed, with randcov_params
, an intercept must be
explicitly specified. That is, while with random
, x | group
is shorthand for (1 | group) + (x | group)
, with randcov_params
,
x | group
implies just x | group
, which means that if 1 | group
is also desired, it must be explicitly specified.
Value
A named numeric vector of random effect covariance parameters.
Examples
randcov_params(group = 1, subgroup = 2)
randcov_params(1, 2, nm = c("group", "subgroup"))
# same as
randcov_params("1 | group" = 1, "1 | subgroup" = 2)