rbind.Wald_lmm {LMMstar}R Documentation

Linear Hypothesis Testing Across Linear Mixed Models

Description

Linear hypothesis testing accross linear mixed model.

Usage

## S3 method for class 'Wald_lmm'
rbind(model, ..., effects = NULL, rhs = NULL, name = NULL, sep = ": ")

Arguments

model

a Wald_lmm object (output of anova applied to a lmm object)

...

possibly other Wald_lmm objects

effects

[character or numeric matrix] how to combine the left-hand side of the hypotheses. By default identity matrix but can also be "Dunnett", "Tukey", or "Sequen" (see function multcomp::contrMat from the multcomp package).

rhs

[numeric vector] the right hand side of the hypothesis. Should have the same length as the number of row of argument effects.

name

[character vector or NULL] character used to identify each model in the output. By default, use the name of the outcome of the model.

sep

[character] character used to separate the outcome and the covariate when naming the tests.

Details

WARNING: in presence of measurements from the same cluster across several models, the influence function is used to estimate the covariance between the model parameters. This is why the (robust) standard errors may not match the (model-based) standard error from the linear mixed Setting the argument robust to FALSE when calling anova.lmm will rescale the (robust) standard errors to mimic the original model-based standard errors.

Examples

## simulate data
set.seed(10)
dL <- sampleRem(1e2, n.times = 3, format = "long")

## estimate mixed models
e.lmm1 <- lmm(Y ~ X1+X2+X3, repetition = ~visit|id, data = dL,
              structure = "CS", df = FALSE)
e.lmm2 <- lmm(Y ~ X1+X8+X9, repetition = ~visit|id, data = dL,
              structure = "CS", df = FALSE)

model.tables(e.lmm1) ## model-based standard errors
model.tables(e.lmm1, robust = TRUE) ## robust standard errors

## select null hypotheses & combine (robust standard errors)
AAA <- anova(e.lmm1, ci = TRUE, effect = c("X1|X2,X3"="X1=0","X2|X1,X3"="X2=0"))
BBB <- anova(e.lmm2, ci = TRUE, effect = c("X1|X8,X9"="X1=0"))

ZZZ <- rbind(AAA,BBB)

## select null hypotheses & combine (model-based like standard errors)
AA <- anova(e.lmm1, ci = TRUE, effect = c("X1|X2,X3"="X1=0","X2|X1,X3"="X2=0"),
             robust = FALSE)
BB <- anova(e.lmm2, ci = TRUE, effect = c("X1|X8,X9"="X1=0"),
             robust = FALSE)
ZZ <- rbind(AA,BB)

[Package LMMstar version 1.1.0 Index]