[Lme4-commits] r1693 - in pkg/lme4: . man tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 26 16:41:14 CEST 2012


Author: mmaechler
Date: 2012-03-26 16:41:14 +0200 (Mon, 26 Mar 2012)
New Revision: 1693

Modified:
   pkg/lme4/DESCRIPTION
   pkg/lme4/NAMESPACE
   pkg/lme4/man/profile-methods.Rd
   pkg/lme4/tests/lmer.R
   pkg/lme4/tests/lmer2_ex.R
Log:
depend on Matrix, check vcov()  {and do-roxy}

Modified: pkg/lme4/DESCRIPTION
===================================================================
--- pkg/lme4/DESCRIPTION	2012-03-22 22:14:10 UTC (rev 1692)
+++ pkg/lme4/DESCRIPTION	2012-03-26 14:41:14 UTC (rev 1693)
@@ -14,6 +14,7 @@
 Depends:
     R(>= 2.14.0),
     lattice,
+    Matrix(>= 1.0),
     methods,
     stats
 LinkingTo: Rcpp, RcppEigen

Modified: pkg/lme4/NAMESPACE
===================================================================
--- pkg/lme4/NAMESPACE	2012-03-22 22:14:10 UTC (rev 1692)
+++ pkg/lme4/NAMESPACE	2012-03-26 14:41:14 UTC (rev 1693)
@@ -16,11 +16,11 @@
 export(glmResp)
 export(golden)
 export(GQdk)
-export(isNested)
-export(isREML)
-export(isLMM)
 export(isGLMM)
+export(isLMM)
+export(isNested)
 export(isNLMM)
+export(isREML)
 export(lmer)
 export(lmerResp)
 export(lmList)
@@ -111,9 +111,8 @@
 S3method(fitted,merMod)
 S3method(fixef,merMod)
 S3method(formula,lmList)
-S3method(formula,merMod)
-S3method(isLMM,merMod)
 S3method(isGLMM,merMod)
+S3method(isLMM,merMod)
 S3method(isNLMM,merMod)
 S3method(isREML,merMod)
 S3method(logLik,merMod)

Modified: pkg/lme4/man/profile-methods.Rd
===================================================================
--- pkg/lme4/man/profile-methods.Rd	2012-03-22 22:14:10 UTC (rev 1692)
+++ pkg/lme4/man/profile-methods.Rd	2012-03-26 14:41:14 UTC (rev 1693)
@@ -6,8 +6,8 @@
 \usage{
   \method{profile}{merMod} (fitted, which = 1:nptot,
     alphamax = 0.01, maxpts = 100, delta = cutoff/8,
-    verbose = 0, devtol = 1e-09, startmethod = "prev",
-    optimizer = "bobyqa", ...)
+    verbose = 0, devtol = 1e-09, maxmult = 10,
+    startmethod = "prev", optimizer = "bobyqa", ...)
 }
 \arguments{
   \item{fitted}{a fitted model, e.g., the result of

Modified: pkg/lme4/tests/lmer.R
===================================================================
--- pkg/lme4/tests/lmer.R	2012-03-22 22:14:10 UTC (rev 1692)
+++ pkg/lme4/tests/lmer.R	2012-03-26 14:41:14 UTC (rev 1693)
@@ -17,5 +17,27 @@
 ## gave error inside  model.frame()
 stopifnot(all.equal(unname(fixef(fm)), -0.8345, tol=.01))
 
+## check working of Matrix methods on  vcov(.) etc ----------------------
+fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
+V  <- vcov(fm)
+V1 <- vcov(fm1)
+TOL <- 0 # to show the differences below
+TOL <- 1e-5 # for the check
+stopifnot(
+	  all.equal(diag(V), 0.176078, tol = TOL) # 64b: 2.4e-8
+	  ,
+	  all.equal(as.numeric(chol(V)), 0.4196165, tol = TOL)	# 64b: 3.2e-8
+	  ,
+	  all.equal(diag(V1), c(46.574978, 2.389469), tol = TOL)# 64b: 9.8e-9
+	  , dim(C1 <- chol(V1)) == c(2,2) ,
+	  all.equal(as.numeric(C1),
+		    c(6.82458627, 0, -0.2126260, 1.5310973), tol=TOL)# 64b: 1.6e-9
+          ,
+          dim(chol(crossprod(getME(fm1, "Z")))) == 36
+	  , TRUE)
+## printing
+signif(chol(crossprod(getME(fm,"Z"))), 4)# -> simple 4 x 4 sparse
 
+
+
 cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''

Modified: pkg/lme4/tests/lmer2_ex.R
===================================================================
--- pkg/lme4/tests/lmer2_ex.R	2012-03-22 22:14:10 UTC (rev 1692)
+++ pkg/lme4/tests/lmer2_ex.R	2012-03-26 14:41:14 UTC (rev 1693)
@@ -11,6 +11,7 @@
               y2 <- y + RE
           })
 
+## FIXME:   want  lmer(* , sparseX = TRUE )  {as in lme4a}
 if (FALSE) {                            # need to adapt to new structure
 
 ##' <description>



More information about the Lme4-commits mailing list