Learn R Programming

spmodel (version 0.8.0)

randcov_initial: Create a random effects covariance parameter initial object

Description

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.

Usage

randcov_initial(..., 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.

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.

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

Run this code
randcov_initial(group = 1)
randcov_initial(group = 1, known = "group")

Run the code above in your browser using DataLab