Learn R Programming

simr (version 1.0.0)

tests: Specify a statistical test to apply

Description

Specify a statistical test to apply

Usage

fixed(xname, method = c("z", "t", "lr", "kr", "pb"))

compare(model, method = c("lr", "pb"))

fcompare(model, method = c("lr", "kr", "pb"))

rcompare(model, method = c("lr", "pb"))

random()

Arguments

xname
an explanatory variable to test (character).
method
the type of test to apply (see Details).
model
a null model for comparison (formula).

Value

  • A function which takes a fitted model as an argument and returns a single p-value.

Details

[object Object],[object Object],[object Object],[object Object]

Examples

Run this code
lm1 <- lmer(y ~ x + (x|g), data=simdata)
lm0 <- lmer(y ~ x + (1|g), data=simdata)
anova(lm1, lm0)
compare(. ~ x + (1|g))(lm1)
rcompare(~ (1|g))(lm1)
powerSim(fm1, compare(. ~ x + (1|g)))

Run the code above in your browser using DataLab