Description Usage Arguments Value Author(s) References Examples

This generic function fits 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.

1 | ```
lmec(yL, cens, X, Z, cluster, maxstep = 200, varstruct = "unstructured", init, method = "ML", epsstop = 0.001, abspmv = 0.001, mcmc0 = 100, sdl = 0.1, iter2 = 15, trs = 5, pls = 5, mcmcmax = 1000)
``` |

`yL` |
Observed left-censored response vector |

`cens` |
Censoring indicator: if yL>ytrue, then cens=1 |

`X` |
Design matrix for the fixed-effects model, it needs to include a column of 1's if the intercept is present |

`Z` |
If the design matrix for the random-effects is diag(Z1, Z2, ..., Zm), then Z=(Z1',Z2', ..., Zm')' |

`cluster` |
Cluster indicator taking values between 1 and m |

`maxstep` |
The maximum number of EM iterations |

`varstruct` |
Variance structure for random effects, current options are unstructured and diagonal. |

`init` |
Intial estimated parameters (it is optional), it is a list with components beta, bi, sigma and Delta. |

`method` |
Options are ML, REML and MLmcmc |

`epsstop` |
The threshold for the difference between two consecutive likelihood values in EM sequence |

`abspmv` |
Absolute error tolerance for pmvnorm() function |

`mcmc0` |
The burn-in MCMC sample size for E-step of EM |

`sdl` |
The target standard deviation for the log-likelihood |

`iter2` |
Number of steps in stage 2 for evaluating standard deviation of log-likelihhood |

`trs` |
Number of increase in sample size during transition face |

`pls` |
Number of steps in plateau face of MCEM |

`mcmcmax` |
Maximum MCEM sample size |

`beta` |
Estimated fixed effects |

`bi` |
Estimated random effects |

`sigma` |
Residual standard deviation |

`Psi` |
Variance matrix of random effects |

`Delta` |
Matrix such that Delta'*Delta=sigma2*solve(Psi) |

`loglik` |
Maximum log-likelihood value (or surrogate objective function) |

`varFix` |
Variance matrix for fixed effects |

`method` |
Options are ML, REML and MLmcmc |

`varstruct` |
Variance structure for random effects, current options are unstructured and diagonal |

`step` |
Number of EM iterations |

`likseq` |
Log-likelihood EM sequence |

Florin Vaida ([email protected]) and Lin Liu ([email protected])

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.

1 2 3 4 5 6 7 8 9 10 | ```
data(UTIdata)
UTIdata <- subset(UTIdata, !is.na(RNA))
o <- order(UTIdata$Patid, UTIdata$Fup)
UTIdata <- UTIdata[o,]
cens = (UTIdata$RNAcens==1)+0
y = 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(y)), ncol=1)
cluster = as.numeric(UTIdata$Patid)
fit = lmec(yL=y,cens=cens, X=X, Z=Z, cluster=cluster, method='ML', maxstep=40)
``` |

```
Loading required package: mvtnorm
[1] "1" "0" "-466.563293090989"
[1] "2" "0" "48.7166269540577"
[4] "-417.846666136931"
[1] "3" "0" "4.79431124770679"
[4] "-413.052354889224"
[1] "4" "0" "0.842409871751499"
[4] "-412.209945017473"
[1] "5" "0" "0.14542538885371"
[4] "-412.064519628619"
[1] "6" "0" "0.0160343712743725"
[4] "-412.048485257345"
[1] "7" "0" "0.00502334483746836"
[4] "-412.043461912507"
[1] "8" "0" "0.0017860227875417"
[4] "-412.04167588972"
[1] "9" "0" "0.00406295892707931"
[4] "-412.037612930793"
[1] "10" "0" "9.05209111579097e-06"
[4] "-412.037603878701"
[1] "11" "1" "-0.000946265827963089"
[4] "-412.038550144529"
[1] "12" "2" "-0.0036940278092743"
[4] "-412.042244172339"
```

lmec documentation built on May 29, 2017, 12:01 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.