View source: R/mt_main_function.R
mglm4twin | R Documentation |
The function mglm4twin
is used for fitting multivariate
generalized linear models to twin data. 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 and variance
functions. The models are fitted using an estimating function
approach, combining the quasi-score function for the regression
parameters and the Pearson estimating function for the covariance
parameters. For details see Bonat and Jorgensen (2016).
mglm4twin(linear_pred, matrix_pred, link, variance,
offset, Ntrial, power_fixed, weights, data, control_initial,
contrasts, control_algorithm)
linear_pred |
a list of formula see |
matrix_pred |
a list of matrices, in general the output of |
link |
a list of link functions names. Options are:
|
variance |
a list of variance functions names.
Options are: |
offset |
a list of offset values if any. |
Ntrial |
a list of number of trials on Bernoulli
experiments. It is useful only for |
power_fixed |
a list of logicals indicating if the values of the power parameter should be estimated or not. |
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. |
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 |
contrasts |
extra arguments to passed to
|
control_algorithm |
a list of arguments to be passed for the
fitting algorithm. See |
mcglm returns an object of class 'mcglm'.
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_mglm
, mt_link_function
and
mt_variance_function
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.