Learn R Programming

mcemGLM (version 1.1.3)

mcemGLMMext: Extending the Iterations of a Model Fitted with mcemGLMM

Description

Given a model fitted with the function mcemGLMM this function will add iterations and update the model estimates for more accurate results.

This is recommended if the initial fitting seems to have a large Monte Carlo error. This function will use the previous maximum likelihood estimate as its initial point and will also start with a Monte Carlo sample size equal to the sample size used in the last iteration of the previous fitting.

Usage

mcemGLMMext(object, it = 20, controlEM)

Value

An updated object of class mcemGLMM.

Arguments

object

an model fitted with mcemGLMM

it

the maximum number of iterations to be performed.

controlEM

a list. New set of options for the EM algorithm. Can be missing

Author

Felipe Acosta Archila <acosta@umn.edu>

See Also

mcemGLMM

Examples

Run this code
# \donttest{
set.seed(72327)
data(exdata)
fit1 <- mcemGLMM(obs ~ z2 + x, random = ~ 0 + z1, 
                 data = exdata, 
                 family = "bernoulli", vcDist = "normal", 
                 controlEM = list(verb = FALSE, EMit = 5, MCit = 8000), 
                 initial = c(-0.13, -0.15, -0.21, 1.59, 0.002))
                 
# Now we extend the algorithm to do at least another 10 iterations
fit2 <- mcemGLMMext(fit1, it = 10)
# }

Run the code above in your browser using DataLab