Description Usage Arguments Details Value Note Author(s) References See Also Examples
mhglm is used to fit a moment hierarchical generalized linear model.
1 2 3 4 5 6 7 8 9 10 | mhglm(formula, family = gaussian, data, weights, subset,
na.action, start = NULL, etastart, mustart, offset,
control = list(), model = TRUE, method = "mhglm.fit",
x = FALSE, z = FALSE, y = TRUE, group = TRUE,
contrasts = NULL)
mhglm.fit(x, z, y, group, weights = rep(1, nobs),
start = NULL, etastart = NULL, mustart = NULL,
offset = rep(0, nobs), family = gaussian(),
control = list(), intercept = TRUE)
|
formula, family, data, weights, subset, na.action, start, etastart,
mustart, offset, model, contrasts, intercept |
These arguments
are analogous to the similarly-named arguments for the |
control |
a list of parameters for controlling the fitting
process. For |
method |
the method to be used in fitting the model. The default
method |
x, z, y, group |
For For |
These functions are analogues of glm and
glm.fit, meant to be used for fitting hierarchical
generalized linear models. A typical predictor has the form
response ~ terms + (reterms | group) where
response is the (numeric) response vector, terms is a
series of terms which specifies a linear predictor for
response, reterms is a series of terms with random
coefficients (effects), and group is a grouping factor; observations
with the same grouping factor share the same random effects.
Currently, only one random effect term is allowed, along with a single
level of hierarchy; random effect terms of the form
reterms | g1/.../gQ are not supported.
mhglm returns an object of class inheriting from "mhglm".
The function summary can be used to obtain or print a summary
of the results.
The generic accessor functions fixef, ranef,
VarCorr, sigma, fitted.values and
residuals can be used to extract various useful features of the
value returned by mhglm.
If the moment-based random effect covariance is not positive-semidefinite, then a warning will be issued, and a projection of the estimate to the positive-semidefinite cone will be used instead.
Patrick O. Perry
Perry, P. O. (2015) "Fast Moment-Based Estimation for Hierarchical Models", Preprint.
terms.mhglm, model.matrix.mhglm, and
predict.mhglm for mhglm methods, and the
generic functions fitted.values, residuals,
summary, vcov, and weights.
Generic functions fixef, ranef,
VarCorr, and sigma for features
related to mixed effect models.
glmer (package lme4) for
fitting generalized linear mixed models with likelihood-based estimates.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.