genD: Generates the covariance matrix of the random effects

View source: R/RcppExports.R

genDR Documentation

Generates the covariance matrix of the random effects

Description

Generates the covariance matrix of the random effects from a sparse representation

Usage

genD(
  B,
  N_dim,
  N_func,
  func_def,
  N_var_func,
  col_id,
  N_par,
  sum_N_par,
  cov_data,
  gamma
)

Arguments

B

Integer specifying the number of blocks in the matrix

N_dim

Vector of integers, which each value specifying the dimension of each block

N_func

Vector of integers specifying the number of functions in the covariance function for each block.

func_def

Matrix of integers where each column specifies the function definition for each function in each block.

N_var_func

Matrix of integers of same size as 'func_def' with each column specying the number of variables in the argument to each function in each block

col_id

3D array (cube) of integers of dimension length(func_def) x max(N_var_func) x B where each slice the respective column indexes of 'cov_data' for each function in the block

N_par

Matrix of integers of same size as 'func_def' with each column specifying the number of parameters in the function in each block

cov_data

3D array (cube) holding the data for the covariance matrix where each of the B slices is the data required for each block

gamma

Vector of covariance parameters specified in order they appear column wise in the functions specified by 'func_def'

Value

A symmetric positive definite covariance matrix


samuel-watson/glmmr documentation built on July 27, 2022, 10:30 p.m.