EMupdateGets {lme4}R Documentation

Update an object in the EM algorithm

Description

A generic replacement function used in the EM and ECME optimization algorithms for linear mixed-effects models.

Usage

EMupdate(x, nlev) <- value

Arguments

x an lmeStruct or pdMat object
nlev integer: the number of levels of the grouping factor corresponding to the random-effects structure
value a matrix with the triangular factor from an orthogonal-triangular decomposition of the modal values of the random-effects and their precision matrices

Value

an object of the same class as x

Author(s)

Douglas Bates bates@stat.wisc.edu and Saikat DebRoy saikat@stat.wisc.edu

Examples

library(lme4)
data(Oxboys, package = "nlme")
m3 <- pdLogChol(~ age)
m3
as(m3, 'pdmatrix') <- crossprod(model.matrix(formula(m3), Oxboys))
show(m3)
EMupdate(m3, length(levels(Oxboys$Subject))) <- diag(2)
show(m3)

[Package Contents]