/usr/share/doc/r-cran-lmertest/tests/DamonData.R is in r-cran-lmertest 2.0-36-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | testSat <- FALSE
testKen <- TRUE
if(testSat){
## checking on big data sets
require(lmerTest)
load(system.file("testdata", "ttDamon.RData", package="lmerTest"))
testFirstR02.test=lmer(RT2LogR ~ condition*v_matri_plus_n_indef_freq_sq+
(1+condition|Subject),ttDamon, REML=TRUE)
an.sat <- anova(testFirstR02.test)
TOL <- 1e-2 # for the check
## with 4 decimals should agree with SAS output
## numbers before decimals should agree with SAS output
stopifnot(
all.equal(an.sat[,"DenDF"], c(76.206, 6074.6, 6146.1), tol = TOL),
all.equal(an.sat[, "F.value"], c(9.2182, 2.8360, 6.6544), tol = TOL)
, TRUE)
## check with calcSatterth function
# L <- matrix(0, nrow=3, ncol=8)
# L[1,2] <- L[2,3] <- L[3,4] <- 1
# system.time(calcSatterth(testFirstR02.test, L))
# if(require(pbkrtest))
# system.time(KRmodcomp(testFirstR02.test, L))
if(testKen){
if(require(pbkrtest))
an.kenw <- anova(testFirstR02.test, ddf="kenw")
stopifnot(ncol(an.kenw) == 6)
}
}
|