lmec (version 1.0)

lmec-package: Linear Mixed-Effects Models with Censored Responses

Description

This package includes a function to fit a linear mixed-effects model in the formulation described in Laird and Ware (1982) but allowing for censored normal responses. In this version, the with-in group errors are assumed independent and identically distributed.

Arguments

Details

Package:
lmec
Type:
Package
Version:
1.0
Date:
2009-01-28

References

Vaida, Florin and Liu, Lin, Fast Implementation For Normal Mixed Effects Models with Censored Response (submitted).

Vaida, Florin and Fitzgerald, Anthony and DeGruttola, Victor (2007), Efficient Hybrid EM for nonlinear mixed effects models with censored response, Computational Statistics and Data Analysis, 51, 5718-5730.

Examples

Run this code
data(UTIdata)
UTIdata <- subset(UTIdata, !is.na(RNA))
o <- order(UTIdata$Patid, UTIdata$Fup)
UTIdata <- UTIdata[o,]
cens <- (UTIdata$RNAcens==1)+0
yL<-  log10(UTIdata$RNA)
X<- cbind((UTIdata$Fup==0)+0, (UTIdata$Fup==1)+0, (UTIdata$Fup==3)+0, (UTIdata$Fup==6)+0, (UTIdata$Fup==9)+0, (UTIdata$Fup==12)+0, (UTIdata$Fup==18)+0, (UTIdata$Fup==24)+0)
Z <- matrix(rep(1, length(yL)), ncol=1)
cluster<-  as.numeric(UTIdata$Patid)
fit <- lmec(yL,cens, X, Z, cluster, method='ML', maxstep=40)

Run the code above in your browser using DataLab