[Lme4-commits] r1503 - pkg/lme4Eigen/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 10 21:51:55 CET 2012


Author: dmbates
Date: 2012-01-10 21:51:55 +0100 (Tue, 10 Jan 2012)
New Revision: 1503

Modified:
   pkg/lme4Eigen/man/GHrule.Rd
   pkg/lme4Eigen/man/VerbAgg.Rd
   pkg/lme4Eigen/man/cbpp.Rd
   pkg/lme4Eigen/man/lmer.Rd
Log:
Add examples and use nAGQ in glmer when appropriate.


Modified: pkg/lme4Eigen/man/GHrule.Rd
===================================================================
--- pkg/lme4Eigen/man/GHrule.Rd	2012-01-10 20:50:39 UTC (rev 1502)
+++ pkg/lme4Eigen/man/GHrule.Rd	2012-01-10 20:51:55 UTC (rev 1503)
@@ -46,6 +46,11 @@
 %\note{}
 %\seealso{}
 \examples{
-GHrule(5)
+(rr <- as.data.frame(GHrule(5)))
+sum(rr$w * (rr$z)^2)		# second moment of standard Gaussian
+sum(rr$w * (rr$z)^4)		# fourth moment of standard Gaussian
+sum(rr$w * (rr$z)^6)		# sixth moment of standard Gaussian (approx)
+sum(rr$w * (rr$z)^8)		# eighth moment of standard Gaussian (approx)
+sum(rr$w * (rr$z)^10)		# tenth moment of standard Gaussian (approx)
 }
 \keyword{math}

Modified: pkg/lme4Eigen/man/VerbAgg.Rd
===================================================================
--- pkg/lme4Eigen/man/VerbAgg.Rd	2012-01-10 20:50:39 UTC (rev 1502)
+++ pkg/lme4Eigen/man/VerbAgg.Rd	2012-01-10 20:51:55 UTC (rev 1503)
@@ -53,10 +53,13 @@
 }
 
 \dontrun{## takes about 15 sec
-fmVA <- glmer(r2 ~ (Anger + Gender + btype + situ)^2 +
-                   (1|id) + (1|item),
-              family = binomial, data = VerbAgg)
-fmVA
+print(fmVA <- glmer(r2 ~ (Anger + Gender + btype + situ)^2 +
+                   (1|id) + (1|item), family = binomial, data =
+                   VerbAgg), corr=FALSE)
 }
+                       ## much faster but less accurate
+print(fmVA0 <- glmer(r2 ~ (Anger + Gender + btype + situ)^2 +
+                    (1|id) + (1|item), family = binomial, data =
+                    VerbAgg, nAGQ=0L), corr=FALSE)
 }
 \keyword{datasets}

Modified: pkg/lme4Eigen/man/cbpp.Rd
===================================================================
--- pkg/lme4Eigen/man/cbpp.Rd	2012-01-10 20:50:39 UTC (rev 1502)
+++ pkg/lme4Eigen/man/cbpp.Rd	2012-01-10 20:51:55 UTC (rev 1503)
@@ -40,10 +40,10 @@
 \examples{
 ## response as a matrix
 (m1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
-             cbpp, binomial, verbose = 1))
+             cbpp, binomial, nAGQ=9L))
 ## response as a vector of probabilities and usage of argument "weights"
 m1p <- glmer(incidence / size ~ period + (1 | herd), weights = size,
-             cbpp, binomial, verbose = 1)
+             cbpp, binomial, nAGQ=9L)
 ## Confirm that these are equivalent:
 stopifnot(all.equal(fixef(m1), fixef(m1p), tol = 1e-11),
           all.equal(ranef(m1), ranef(m1p), tol = 1e-11),

Modified: pkg/lme4Eigen/man/lmer.Rd
===================================================================
--- pkg/lme4Eigen/man/lmer.Rd	2012-01-10 20:50:39 UTC (rev 1502)
+++ pkg/lme4Eigen/man/lmer.Rd	2012-01-10 20:51:55 UTC (rev 1503)
@@ -184,16 +184,13 @@
 
 ## nonlinear mixed models --- 3-part formulas ---
 
-nm1 <- nlmer(circumference ~ SSlogis(age, Asym, xmid, scal) ~
+(nm1 <- nlmer(circumference ~ SSlogis(age, Asym, xmid, scal) ~
              0 + Asym + xmid + scal + (0 + Asym|Tree),
-             Orange, start = c(Asym = 200, xmid = 725, scal = 350),
-             verbose = 1)
-nm1
-nm1a <- nlmer(circumference ~ SSlogis(age, Asym, xmid, scal) ~
+             Orange, start = c(Asym = 200, xmid = 725, scal = 350)))
+(nm1a <- nlmer(circumference ~ SSlogis(age, Asym, xmid, scal) ~
               0 + Asym + xmid + scal + (0 + Asym|Tree),
               Orange, start = c(Asym = 200, xmid = 725, scal = 350),
-              verbose = 1, nAGQ = 0L)
-nm1a
+              nAGQ = 0L))
 }
 \keyword{models}
 \keyword{methods}



More information about the Lme4-commits mailing list