Description Usage Arguments Details Value See Also Examples

Auxiliary function for `mhglm`

fitting. Typically only used
internally by `mhglm.fit`

, but may be used to construct a
control argument to either function.

1 2 3 4 5 6 7 | ```
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(...), ...)
``` |

`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 |

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.

A list with components named as the arguments.

`mhglm.fit`

, the fitting procedure used by
`mhglm`

.

`firthglm.fit`

, the default subpopulation-specific fitting method.

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")))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.