Learn R Programming

LMMstar (version 1.1.0)

confint.lmm: Statistical Inference for Linear Mixed Model

Description

Compute confidence intervals (CIs) and p-values for the coefficients of a linear mixed model.

Usage

# S3 method for lmm
confint(
  object,
  parm = NULL,
  level = 0.95,
  effects = NULL,
  robust = FALSE,
  null = NULL,
  columns = NULL,
  df = NULL,
  type.information = NULL,
  transform.sigma = NULL,
  transform.k = NULL,
  transform.rho = NULL,
  transform.names = TRUE,
  backtransform = NULL,
  ...
)

Value

A data.frame containing some of the following coefficient (in rows):

  • column estimate: the estimate.

  • column se: the standard error.

  • column statistic: the test statistic.

  • column df: the degree of freedom.

  • column lower: the lower bound of the confidence interval.

  • column upper: the upper bound of the confidence interval.

  • column null: the null hypothesis.

  • column p.value: the p-value relative to the null hypothesis.

Arguments

object

a lmm object.

parm

Not used. For compatibility with the generic method.

level

[numeric,0-1] the confidence level of the confidence intervals.

effects

[character] Should the CIs/p-values for all coefficients be output ("all"), or only for mean coefficients ("mean" or "fixed"), or only for variance coefficients ("variance"), or only for correlation coefficients ("correlation").

robust

[logical] Should robust standard errors (aka sandwich estimator) be output instead of the model-based standard errors. Not feasible for variance or correlation coefficients estimated by REML.

null

[numeric vector] the value of the null hypothesis relative to each coefficient.

columns

[character vector] Columns to be output. Can be any of "estimate", "se", "statistic", "df", "null", "lower", "upper", "p.value".

df

[logical] Should a Student's t-distribution be used to model the distribution of the coefficient. Otherwise a normal distribution is used.

type.information, transform.sigma, transform.k, transform.rho, transform.names

are passed to the vcov method. See details section in coef.lmm.

backtransform

[logical] should the variance/covariance/correlation coefficient be backtransformed?

...

Not used. For compatibility with the generic method.

See Also

the function anova to perform inference about linear combinations of coefficients and adjust for multiple comparisons.

coef.lmm for a simpler output (e.g. only estimates).
model.tables.lmm for a more detailed output (e.g. with p-value).

Examples

Run this code
#### simulate data in the long format ####
set.seed(10)
dL <- sampleRem(100, n.times = 3, format = "long")

#### fit Linear Mixed Model ####
eUN.lmm <- lmm(Y ~ X1 + X2 + X5, repetition = ~visit|id, structure = "UN", data = dL)

#### Confidence intervals ####
## based on a Student's t-distribution with transformation
confint(eUN.lmm, effects = "all")
## based on a Student's t-distribution without transformation
confint(eUN.lmm, effects = "all",
        transform.sigma = "none", transform.k = "none", transform.rho = "none")
## based on a Student's t-distribution transformation but not backtransformed
confint(eUN.lmm, effects = "all", backtransform = FALSE)
## based on a Normal distribution with transformation
confint(eUN.lmm, df = FALSE)

Run the code above in your browser using DataLab