This function implements the two main algorithms used for fitting multivariate covariance generalized linear models. The chaser and the reciprocal likelihood algorithms.
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)
list_initial | a list of initial values for regression and covariance parameters. |
---|---|
list_link | a list specifying the link function names. |
list_variance | a list specifying the variance function names.
Options are: |
list_covariance | a list of covariance function names. Options
are: |
list_X | a list of design matrices.
See |
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 |
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 |
max_iter | maximum number of iterations. Default |
tol | a numeric specyfing the tolerance. Default |
method | a string specyfing the method used to fit the models
( |
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 |
verbose | a logical if TRUE print the values of the covariance
parameters used on each iteration. Default |
weights | Vector of weights for model fitting. |
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.
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
.
mcglm
, mc_matrix_linear_predictor
,
mc_link_function
and
mc_variance_function
.