lme4 (version 0.4-3)

EMupdateGets: 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

Examples

Run this code
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)

Run the code above in your browser using DataCamp Workspace