mc_build_sigma: Build variance-covariance matrix

Description Usage Arguments Value Author(s) See Also

View source: R/mc_build_sigma.R

Description

This function builds a variance-covariance matrix, based on the variance function and omega matrix.

Usage

1
2
mc_build_sigma(mu, Ntrial = 1, tau, power, Z, sparse, variance,
  covariance, power_fixed, compute_derivative_beta = FALSE)

Arguments

mu

A numeric vector. In general the output from mc_link_function.

Ntrial

A numeric vector, or NULL or a numeric specifing the number of trials in the binomial experiment. It is usefull only when using variance = binomialP or binomialPQ. In the other cases it will be ignored.

tau

A numeric vector.

power

A numeric or numeric vector. It should be one number for all variance functions except binomialPQ, in that case the argument specifies both p and q.

Z

A list of matrices.

sparse

Logical.

variance

String specifing the variance function: constant, tweedie, poisson_tweedie, binomialP or binomialPQ.

covariance

String specifing the covariance function: identity, inverse or expm.

power_fixed

Logical if the power parameter is fixed at initial value (TRUE). In the case power_fixed = FALSE the power parameter will be estimated.

compute_derivative_beta

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

Value

A list with the Cholesky decomposition of Σ, Σ^{-1} and the derivative of Σ with respect to the power and tau parameters.

Author(s)

Wagner Hugo Bonat

See Also

mc_link_function, mc_variance_function, mc_build_omega.


wbonat/mcglm documentation built on June 23, 2020, 11:06 a.m.