[Lme4-commits] r1590 - pkg/lme4Eigen/inst/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 9 21:50:40 CET 2012


Author: dmbates
Date: 2012-02-09 21:50:40 +0100 (Thu, 09 Feb 2012)
New Revision: 1590

Modified:
   pkg/lme4Eigen/inst/tests/test-lmer.R
Log:
Added some tests of getME.


Modified: pkg/lme4Eigen/inst/tests/test-lmer.R
===================================================================
--- pkg/lme4Eigen/inst/tests/test-lmer.R	2012-02-09 19:35:53 UTC (rev 1589)
+++ pkg/lme4Eigen/inst/tests/test-lmer.R	2012-02-09 20:50:40 UTC (rev 1590)
@@ -24,5 +24,14 @@
     expect_that(fm2 <- refit(fm1, Dyestuff2$Yield),     is_a("lmerMod"))
     expect_that(fixef(fm2),                             is_equivalent_to(5.6656))
     expect_that(VarCorr(fm2)[[1]][1,1],                 equals(0))
+    expect_that(getME(fm2, "theta"),                    equals(0))
+    expect_that(X  <- getME(fm1, "X"),                  is_equivalent_to(array(1, c(1, 30))))
+    expect_that(Zt <- getME(fm1, "Zt"),                 is_a("dgCMatrix"))
+    expect_that(dim(Zt),                                equals(c(6L, 30L)))
+    expect_that(length(Zt at x),                           equals(30L))
+    expect_that(Zt at x,                                   equals(rep.int(1, 30L)))
+    expect_that(theta <- getME(fm1, "theta"),           equals(0.848330078125))
+    expect_that(Lambdat <- getME(fm1, "Lambdat"),       is_a("dgCMatrix"))
+    expect_that(as(Lambdat, "matrix"),                  is_equivalent_to(diag(theta, 6L, 6L)))
 })
 



More information about the Lme4-commits mailing list