mhglm.control {mbest} | R Documentation |
Auxiliary for Controlling Moment Heirarchical GLM Fitting
Description
Auxiliary function for mhglm
fitting. Typically only used
internally by mhglm.fit
, but may be used to construct a
control argument to either function.
Usage
mhglm.control(standardize = TRUE, steps = 1, parallel = FALSE, diagcov = FALSE,
fit.method = "firthglm.fit", fixef.rank.warn = FALSE, cov.rank.warn = FALSE,
cov.psd.warn = TRUE, fit.control = list(...), ...)
mhglm_ml.control(standardize = FALSE, steps = 1, parallel = FALSE, diagcov = FALSE,
fit.method = "firthglm.fit", fixef.rank.warn = FALSE, cov.rank.warn = FALSE,
cov.psd.warn = FALSE, fit.control = list(...), ...)
Arguments
standardize |
logitcal indicating if predictors should be standardized before moment-based fitted |
steps |
number of refinement steps |
parallel |
fit the group-specific estimates in parallel rather than sequentially |
diagcov |
estimate random effect covairance matrix with diagonal approximation |
fit.method |
method for obtaining group-specific effect estimates |
fixef.rank.warn |
if TRUE, print warnings when fixef is unidentifiable |
cov.rank.warn |
if TRUE, print warnings when covariance matrix is unidentifiable |
cov.psd.warn |
if TRUE, print warnings when moment based estimates of covariance matrix is not positive semi-definite |
fit.control |
control parameters for |
... |
arguments to be used to form the |
Details
Setting standardize = TRUE
ensures that the procedure is equivariant,
and generally leads to better estimation performance.
Right now standardize = TRUE
is not allowed for mhglm_ml
.
The steps
argument gives the number of refinement steps for the moment
based parameters. In each step, the previous fixed effect and random effect
covariance matrix estimates are used to weight the subpopulation-specific
effect estimates. In principle, higher values of steps
could lead to
more accurate estimates, but in simulations, the differences are negligible.
Value
A list with components named as the arguments.
See Also
mhglm.fit
, the fitting procedure used by
mhglm
.
firthglm.fit
, the default subpopulation-specific fitting method.
Examples
library(lme4) # for cbpp data
# The default fitting method uses Firth's bias-corrected estimates
(gm.firth <- mhglm(cbind(incidence, size - incidence) ~ period + (1 | herd),
data = cbpp, family = binomial,
control=mhglm.control(fit.method="firthglm.fit")))
# Using maximum likelihood estimates is less reliable
(gm.ml <- mhglm(cbind(incidence, size - incidence) ~ period + (1 | herd),
data = cbpp, family = binomial,
control=mhglm.control(fit.method="glm.fit")))