mc_build_C: Build the joint covariance matrix

View source: R/mc_build_C.R

mc_build_CR Documentation

Build the joint covariance matrix

Description

This function builds the joint variance-covariance matrix using the Generalized Kronecker product and its derivatives with respect to rho, power and tau parameters.

Usage

mc_build_C(
  list_mu,
  list_Ntrial,
  rho,
  list_tau,
  list_power,
  list_Z,
  list_sparse,
  list_variance,
  list_covariance,
  list_power_fixed,
  compute_C = FALSE,
  compute_derivative_beta = FALSE,
  compute_derivative_cov = TRUE
)

Arguments

list_mu

A list with values of the mean.

list_Ntrial

A list with the number of trials. Usefull only for binomial responses.

rho

Vector of correlation parameters.

list_tau

A list with values for the tau parameters.

list_power

A list with values for the power parameters.

list_Z

A list of matrix to be used in the matrix linear predictor.

list_sparse

A list with Logical.

list_variance

A list specifying the variance function to be used for each response variable.

list_covariance

A list specifying the covariance function to be used for each response variable.

list_power_fixed

A list of Logical specifying if the power parameters are fixed or not.

compute_C

Logical. Compute or not the C matrix.

compute_derivative_beta

Logical. Compute or not the derivative of C with respect to regression parameters.

compute_derivative_cov

Logical. Compute or not the derivative of C with respect the covariance parameters.

Value

A list of matrices. This function return the variance-covariance matrix C or its inverse along with its respective matrices of derivatives with respect to rho, power and tau parameters. The returned object is intended for internal use only.

Author(s)

Wagner Hugo Bonat


mcglm documentation built on Jan. 9, 2026, 1:07 a.m.