[Lme4-commits] r1747 - pkg/lme4/tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed May 16 23:41:07 CEST 2012
Author: bbolker
Date: 2012-05-16 23:41:07 +0200 (Wed, 16 May 2012)
New Revision: 1747
Modified:
pkg/lme4/tests/glmerWarn.R
pkg/lme4/tests/prLogistic.R
Log:
wrap prLogistic attempt in try()
add warning-test for specifying REML in glmer; make gives_warning() tests more specific
Modified: pkg/lme4/tests/glmerWarn.R
===================================================================
--- pkg/lme4/tests/glmerWarn.R 2012-05-16 21:38:20 UTC (rev 1746)
+++ pkg/lme4/tests/glmerWarn.R 2012-05-16 21:41:07 UTC (rev 1747)
@@ -2,13 +2,19 @@
library(testthat)
m1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
family = binomial, data = cbpp)
-expect_that(m2 <- lmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+expect_that(lmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
family = binomial, data = cbpp),
- gives_warning())
+ gives_warning("calling lmer with family\\(\\) is deprecated.*"))
## FIXME: should glmer(..., [no family]) give a warning as well?
stopifnot(all.equal(m1,m2))
+expect_that(glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
+ family = binomial, data = cbpp,
+ REML=TRUE),
+ gives_warning("extra argument.*REML.*disregarded"))
+
+
m3 <- glmer(Reaction ~ Days + (Days|Subject), sleepstudy)
m4 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
m5 <- glmer(Reaction ~ Days + (Days|Subject), sleepstudy, family=gaussian)
Modified: pkg/lme4/tests/prLogistic.R
===================================================================
--- pkg/lme4/tests/prLogistic.R 2012-05-16 21:38:20 UTC (rev 1746)
+++ pkg/lme4/tests/prLogistic.R 2012-05-16 21:41:07 UTC (rev 1747)
@@ -2,6 +2,7 @@
## (Thailand, clustered-data) in prLogistic package
load("prLogistic.RData")
library(lme4)
-glmer(rgi~ sex + pped + (1|schoolid),
- data = dataset, family=binomial)
+## FIXME: un-try() after PIRLS failure addressed
+try(glmer(rgi~ sex + pped + (1|schoolid),
+ data = dataset, family=binomial))
More information about the Lme4-commits
mailing list