fit_mcglm: Chaser and Reciprocal Likelihood Algorithms

View source: R/fit_mcglm.R

fit_mcglmR Documentation

Chaser and Reciprocal Likelihood Algorithms

Description

This function implements the two main algorithms used for fitting multivariate covariance generalized linear models. The chaser and the reciprocal likelihood algorithms.

Usage

fit_mcglm(list_initial, list_link, list_variance,
         list_covariance, list_X, list_Z, list_offset,
         list_Ntrial, list_power_fixed, list_sparse,
         y_vec, correct, max_iter, tol, method,
         tuning, verbose, weights)

Arguments

list_initial

a list of initial values for regression and covariance parameters.

list_link

a list specifying the link function names.
Options are: "logit", "probit", "cauchit", "cloglog", "loglog", "identity", "log", "sqrt", "1/mu^2" and "inverse".
See mc_link_function for details. Default link = "identity".

list_variance

a list specifying the variance function names. Options are: "constant", "tweedie", "poisson_tweedie", "binomialP" and "binomialPQ". See mc_variance_function for details. Default variance = "constant".

list_covariance

a list of covariance function names. Options are: "identity", "inverse" and "expm". Default covariance = "identity".

list_X

a list of design matrices. See model.matrix for details.

list_Z

a list of knowm matrices to compose the matrix linear predictor.

list_offset

a list of offset values. Default NULL.

list_Ntrial

a list of number of trials, useful only when analysing binomial data. Default 1.

list_power_fixed

a list of logicals indicating if the power parameters should be estimated or not. Default power_fixed = TRUE.

list_sparse

a list of logicals indicating if the matrices should be set up as sparse matrices. This argument is useful only when using exponential-matrix covariance link function. In the other cases the algorithm detects automatically if the matrix should be sparse or not.

y_vec

a vector of the stacked response variables.

correct

a logical indicating if the algorithm will use the correction term or not. Default correct = FALSE.

max_iter

maximum number of iterations. Default max_iter = 20.

tol

a numeric specyfing the tolerance. Default tol = 1e-04.

method

a string specyfing the method used to fit the models ("chaser" or "rc"). Default method = "chaser".

tuning

a numeric value in general close to zero for the rc method and close to 1 for the chaser method. This argument control the step-length. Default tuning = 1.

verbose

a logical if TRUE print the values of the covariance parameters used on each iteration. Default verbose = FALSE

weights

Vector of weights for model fitting.

Value

A list with regression and covariance parameter estimates. Details about the estimation procedures as iterations, sensitivity, variability are also provided. In general the users do not need to use this function directly. The mcglm provides GLM interface for fitting mcglm.

Author(s)

Wagner Hugo Bonat, wbonat@ufpr.br

Source

Bonat, W. H. and Jorgensen, B. (2016) Multivariate covariance generalized linear models. Journal of Royal Statistical Society - Series C 65:649–675.

Bonat, W. H. (2018). Multiple Response Variables Regression Models in R: The mcglm Package. Journal of Statistical Software, 84(4):1–30.

See Also

mcglm, mc_matrix_linear_predictor, mc_link_function and
mc_variance_function.


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