em.glmerMod {em}R Documentation

The em function for glmerMod

Description

The em function for glmerMod

Usage

## S3 method for class 'glmerMod'
em(
  object,
  latent = 2,
  verbose = FALSE,
  init.method = c("random", "kmeans", "hc"),
  algo = c("em", "cem", "sem"),
  max_iter = 500,
  concomitant = list(...),
  ...
)

Arguments

object

the model used, e.g. 'lm', 'glm', 'gnm'.

latent

the number of latent classes.

verbose

'True' to print the process of convergence.

init.method

the initialization method used in the model. The default method is 'random'. 'kmeans' is K-means clustering. 'hc' is model-based agglomerative hierarchical clustering.

algo

the algorithm used in em: 'em' the default EM algorithm, the classification em 'cem', or the stochastic em 'sem'.

max_iter

the maximum iteration for em algorithm.

concomitant

the formula to define the concomitant part of the model. The default is NULL.

...

arguments used in the 'model'.

Value

An object of class 'em' is a list containing at least the following components: models a list of models/objects whose class are determined by a model fitting from the previous step. pi the prior probabilities. latent number of the latent classes. algorithm the algorithm used (could be either 'em', 'sem' or 'cem'). obs the number of observations. post_pr the posterior probabilities. concomitant a list of the concomitant model. It is empty if no concomitant model is used. init.method the initialization method used. call the matched call. terms the codeterms object used.


[Package em version 1.0.0 Index]