Learn R Programming

languageR (version 1.0)

aovlmer.fnc: Compute p-values for factors in mixed models

Description

This function computes p-values for factors in a mixed-effects model on the basis of an MCMC sample.

Usage

aovlmer.fnc(object, mcmc, which, noMCMC, ...)

Arguments

object
An lmer or glmer model for a response variable fitted with lmer.
mcmc
A Markov chain Monte Carlo sample obtained with pvals.fnc(..., withMCMC=TRUE)$mcmc for the lmer model.
which
A vector of integers or strings denoting the rows in the table of coefficients that specify the coefficients for the factor.
noMCMC
In earlier versions of lmer, a single-argument anova was supported. In more recent versions, this is no longer possible. Hence the p-values based on F-tests are no longer supported.
...
Other optional arguments.

Value

  • A list with components
  • pthe empirical p-value for the hypothesis that the columns of an MCMC sample specified by which have mean zero versus a general multivariate distribution with elliptical contours
  • whichthe rownames specified by which
  • .

See Also

See also lmer, mcmcsamp.

Examples

Run this code
library(lme4, keep.source=FALSE)
	library(coda)
	data(latinsquare)
	l.lmer = lmer(RT~SOA+(1|Word)+(1|Subject), data=latinsquare)
  mcmc = pvals.fnc(l.lmer, nsim=10000, withMCMC=TRUE)
  aovlmer.fnc(l.lmer, mcmc$mcmc, c("SOAmedium", "SOAshort"))

Run the code above in your browser using DataLab