MyNixOS website logo
Description

Multivariate Mixed Effects Model.

Analyzing data under multivariate mixed effects model using multivariate REML and multivariate Henderson3 methods. See Meyer (1985) <doi:10.2307/2530651> and Wesolowska Janczarek (1984) <doi:10.1002/bimj.4710260613>.

MMeM (Multivariate Mixed-effects Model)

Build Status Rdoc

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

Installation

To install from CRAN:

install.packages("MMeM")
library(MMeM)

You can also use devtools to install the latest development version:

devtools::install_github("pengluyaoyao/MMeM")
library(MMeM)

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:
# using lme4 to analyze 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)
# Compare with lme4:
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.

Metadata

Version

0.1.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows