mcglm: Fitting Multivariate Covariance Generalized Linear Models

Description Usage Arguments Value Author(s) Source See Also

View source: R/mc_main_function.R

Description

The function mcglm is used to fit multivariate covariance generalized linear models. The models are specified by a set of lists giving a symbolic description of the linear and matrix linear predictors. The user can choose between a list of link, variance and covariance functions. The models are fitted using an estimating function approach, combining quasi-score functions for regression parameters and Pearson estimating function for covariance parameters. For details see Bonat and Jorgensen (2016).

Usage

1
2
3
mcglm(linear_pred, matrix_pred, link, variance, covariance,
       offset, Ntrial, power_fixed, data, control_initial,
       contrasts, weights, control_algorithm)

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. For details see mc_matrix_linear_predictor.

link

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

variance

a list of variance functions names. Options are: "constant", "tweedie", "poisson_tweedie", "binomialP" and "binomialPQ".
See mc_variance_function for details.

covariance

a list of covariance link functions names. Options are: "identity", "inverse" and exponential-matrix "expm".

offset

a list of offset values if any.

Ntrial

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

power_fixed

a list of logicals indicating if the values of the power parameter should be estimated or not.

data

a data frame.

control_initial

a list of initial values for the fitting algorithm. If no values are supplied automatic initial values will be provided by the function mc_initial_values.

contrasts

extra arguments to passed to model.matrix.

weights

A list of weights for model fitting. Each element of the list should be a vector of weights of size equals the number of observations. Missing observations should be annotated as NA.

control_algorithm

a list of arguments to be passed for the fitting algorithm. See fit_mcglm for details.

Value

mcglm returns an object of class '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

fit_mcglm, mc_link_function and mc_variance_function.


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