Create a random effects (co)variance parameter initial object that specifies initial and/or known values to use while estimating random effect variances with modeling functions.

randcov_initial(..., known)

Arguments

...

Arguments to randcov_params().

known

A character vector indicating which random effect variances are to be assumed known. The value "given" is shorthand for assuming all random effect variances given to randcov_initial() are assumed known.

Value

A list with two elements: initial and is_known. initial is a named numeric vector indicating the random effect variances with specified initial and/or known values. is_known is a named logical vector indicating whether the random effect variances in initial are known or not.

Details

A random effect is specified as \(Zu\), where \(Z\) is the random effects design matrix and u is the random effect. The covariance of \(Zu\) is \(\sigma 2 ZZ^T\), where \(\sigma 2\) is the random effect variance, and \(Z^T\) is the transpose of \(Z\).

Examples

randcov_initial(group = 1)
#> $initial
#> group 
#>     1 
#> 
#> $is_known
#> group 
#> FALSE 
#> 
randcov_initial(group = 1, known = "group")
#> $initial
#> group 
#>     1 
#> 
#> $is_known
#> group 
#>  TRUE 
#>