mc_initial_values: Automatic Initial Values

View source: R/mc_initial_values.R

mc_initial_valuesR Documentation

Automatic Initial Values

Description

This function provides initial values to be used when fitting multivariate covariance generalized linear models by using the function mcglm. In general the users do not need to use this function, since it is already employed when setting the argument control_initial = "automatic" in the mcglm function. However, if the users want to change some of the initial values, this function can be useful.

Usage

mc_initial_values(linear_pred, matrix_pred, link, variance,
                  covariance, offset, Ntrial, contrasts, data)

Arguments

linear_pred

a list of formula see formula for details.

matrix_pred

a list of known matrices to be used on the matrix linear predictor.
See mc_matrix_linear_predictor for details.

link

a list of link functions names, see mcglm for details.

variance

a list of variance functions names, see mcglm for details.

covariance

a list of covariance link functions names, see mcglm for details.

offset

a list of offset values if any.

Ntrial

a list of the number of trials on Bernoulli experiments. It is useful only for "binomialP" and "binomialPQ" variance functions.

contrasts

list of contrasts to be used in the model.matrix.

data

data frame.

Details

To obtain initial values for multivariate covariance generalized linear models the function
mc_initial_values fits a generalized linear model (GLM) using the function glm with the specified linear predictor and link function for each response variables considering independent observations. The family argument is always specified as quasi. The link function depends on the specification of the argument link. The variance function is always specified as "mu" the only excession appears when using variance = "constant" then the family argument in the glm function is specified as quasi(link = link, variance = "constant"). The estimated value of the dispersion parameter from the glm function is used as initial value for the first component of the matrix linear predictor, for all other components the value zero is used.
For the cases covariance = "inverse" and covariance = "expm" the inverse and the logarithm of the estimated dispersion parameter is used as initial value for the first component of the matrix linear predictor. The value of the power parameter is always started at 1. In the cases of multivariate models the correlation between response variables is always started at 0.

Value

Return a list of initial values to be used while fitting in the mcglm function.

Author(s)

Wagner Hugo Bonat, wbonat@ufpr.br


mcglm documentation built on Sept. 16, 2022, 1:06 a.m.