Multivariate Mixed Effects Model

Analyzing data under multivariate mixed effects model using multivariate REML and multivariate Henderson3 methods. See Meyer (1985) and Wesolowska Janczarek (1984) .


Description

Estimating the variance covariance components matrix under the multivariate mixed effects model. Currently this package supports multivariate mixed effects model with two response variables, one fixed effects and one random effects.

Estimation Methods

  • Multivariate REML method
  • Multivariate Henderson3 method

Examples

  • bivariate mixed effects model:
 library(MMeM)
 data(simdata)
 T.start = matrix(c(10,5,5,15),2,2)
 E.start = matrix(c(10,1,1,3),2,2)
 results_henderson = MMeM_henderson3(fml = c(V1,V2) ~ X_vec + (1|Z_vec), data = simdata, factor_X = TRUE)
 results_reml = MMeM_reml(fml = c(V1,V2) ~ X_vec + (1|Z_vec), data = simdata, factor_X = TRUE, T.start = T.start, E.start =      E.start, maxit = 10)
  • univariate mixed effects model:
alcohol1 <- read.table("https://stats.idre.ucla.edu/stat/r/examples/alda/data/alcohol1_pp.txt", header=T, sep=",")
attach(alcohol1)
mod1<-lme4::lmer(alcuse ~ age  +(1|id) ,alcohol1,REML=1)
summary(mod1)

library(merDeriv)
vcov(mod1, full =TRUE)
# # var <-model.c$apVar
#
T.start = 3
E.start = 4
results = MMeM_reml(alcuse ~ age + (1|id), alcohol1, factor_X = FALSE, T.start, E.start)

Values

MMeM_reml:

  • T.estimates: the estimated matrix of the variance covariance matrix of the block random effects
  • E.estimates is the estimated matrix of the variance covariance matrix of the residuals
  • VCOV is the asymptotic dispersion matrix of the estimated variance covariance components

MMeM_henderson3:

  • T.estimates: the estimated matrix of the variance covariance matrix of the block random effects with corresponding standard errors
  • E.estimates is the estimated matrix of the variance covariance matrix of the residuals with corresponding standard errors

References

Meyer, K. A. R. I. N. "Maximum likelihood estimation of variance components for a multivariate mixed model with equal design matrices." Biometrics 1985: 153-165

Wesolowska‚ÄźJanczarek, M. T. "Estimation of covariance matrices in unbalanced random and mixed multivariate models." Biometrical journal 26.6 (1984): 665-674.

News

MMeM 0.1.0

  • Added a NEWS.md file to track changes to the package.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("MMeM")

0.1.0 by Luyao Peng, 3 months ago


Report a bug at https://github.com/pengluyaoyao/MMeM/issues


Browse source code at https://github.com/cran/MMeM


Authors: Luyao Peng [aut, cre] , Rui Yang [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports stats, MASS, Matrix, jointDiag, lme4, matrixcalc, psych, stringr


See at CRAN