Learn R Programming

glmmrBase (version 0.2.5)

sample_re: Generates a sample of random effects

Description

Generates a sample of random effects from the specified covariance matrix.

Usage

sample_re(cov, data, eff_range, gamma)

Value

A lower triangular matrix

Arguments

cov

An integer matrix with columns of block identifier, dimension of block, function definition, number of varaibles in the argument to the funciton, and index of the parameters, respectively. Rows are specific functions of each block.

data

Vector of data. Created by flattening the matrices in column-major order of the data used in each block.

eff_range

Vector of values with the effective range parameters of the covariance functions, where required.

gamma

Vector of parameters used to generate the matrix D.