genBlockD: Generates a block of the random effects covariance matrix

View source: R/RcppExports.R

genBlockDR Documentation

Generates a block of the random effects covariance matrix

Description

Generates a block of the random effects covariance matrix

Usage

genBlockD(N_dim, N_func, func_def, N_var_func, col_id, N_par, cov_data, gamma)

Arguments

N_dim

Integer specifying the dimension of the matrix

N_func

Integer specifying the number of functions in the covariance function for this block.

func_def

Vector of integers of same length as 'func_def' specifying the function definition for each function.

N_var_func

Vector of integers of same length as 'func_def' specying the number of variables in the argument to the function

col_id

Matrix of integers of dimension length(func_def) x max(N_var_func) that indicates the respective column indexes of 'cov_data'

N_par

Vector of integers of same length as 'func_def' specifying the number of parameters in the function

cov_data

Matrix holding the data for the covariance matrix

gamma

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

Details

Using the sparse representation of the random effects covariance matrix, constructs one of the blocks. The function definitions are: 1 indicator, 2 exponential, 3 AR-1, 4 squared exponential, 5 matern, 6 Bessel.

Value

A symmetric positive definite matrix


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