mhglm.control: Auxiliary for Controlling Moment Heirarchical GLM Fitting

Description Usage Arguments Details Value See Also Examples

View source: R/mhglm.R

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

1
2
mhglm.control(standardize = TRUE, steps = 1, parallel = FALSE,
              fit.method = "firthglm.fit", 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

fit.method

method for obtaining group-specific effect estimates

fit.control

control parameters for fit.method

...

arguments to be used to form the fit.control argument if it is not supplied directly.

Details

Setting standardize = TRUE ensures that the procedure is equivariant, and generally leads to better estimation performance.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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")))

mbest documentation built on May 30, 2017, 12:43 a.m.