View source: R/mc_main_function.R
| mcglm | R Documentation |
Fits multivariate covariance generalized linear models. Models are specified through lists defining the linear predictors and matrix linear predictors. The user can choose among different link, variance, and covariance functions. Model fitting is based on an estimating function approach, combining quasi-score functions for regression parameters and Pearson estimating functions for covariance parameters.
mcglm(linear_pred, matrix_pred, link, variance, covariance,
offset, Ntrial, power_fixed, data, control_initial,
contrasts, weights, control_algorithm)
linear_pred |
A list of model formulas, one for each response.
See |
matrix_pred |
A list of known matrices defining the matrix linear
predictor for the covariance structure. See
|
link |
A list of link function names, one for each response.
Possible values are |
variance |
A list of variance function names.
Possible values are |
covariance |
A list of covariance link function names.
Possible values are |
offset |
A list of numeric vectors specifying offsets for each
response. Use |
Ntrial |
A list of numeric vectors specifying the number of trials
for binomial responses. Only used for |
power_fixed |
A list of logical values indicating whether the power
parameter should be fixed ( |
data |
a data frame. |
control_initial |
A list of initial values for the fitting algorithm.
If set to |
contrasts |
An optional list of contrasts passed to
|
weights |
A list of numeric vectors of observation weights.
Each element must have length equal to the number of observations.
Missing observations should be coded as |
control_algorithm |
A list of control parameters passed to the
fitting algorithm. See |
An object of class "mcglm" representing a fitted multivariate
covariance generalized linear model.
The returned object is a list produced by the fitting routine
fit_mcglm, augmented with additional components used by
post–estimation methods. The main components include:
A list of character vectors giving the names of the regression coefficients for each response variable.
A list of logical values indicating whether the power parameters were fixed or estimated.
A list of initial values used in the fitting algorithm.
An integer giving the number of observations.
A list of link functions used in the model.
A list of variance functions used in the model.
A list of covariance link functions used in the model.
A list of formulas defining the linear predictors.
A list of matrices defining the matrix linear predictors.
A list of design matrices corresponding to the linear predictors.
A matrix of observed response values, with rows corresponding to observations and columns to response variables.
A list containing the number of trials for each response variable, when applicable.
A list of offset vectors used in the model.
A list of logical values indicating whether each matrix linear predictor is treated as sparse.
A numeric vector of weights used in the fitting process.
The data frame used to fit the model.
A list of control parameters used by the fitting algorithm.
Additional components may be present for internal use by methods such as
print, summary and predict.
Wagner Hugo Bonat, wbonat@ufpr.br
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.
fit_mcglm, mc_link_function and
mc_variance_function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.