[Lme4-commits] r1466 - pkg/lme4Eigen/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 29 22:09:25 CET 2011


Author: dmbates
Date: 2011-11-29 22:09:24 +0100 (Tue, 29 Nov 2011)
New Revision: 1466

Modified:
   pkg/lme4Eigen/R/profile.R
Log:
Fix up strip names to reflect sigma, not log(sigma).  Should also modify splom names.


Modified: pkg/lme4Eigen/R/profile.R
===================================================================
--- pkg/lme4Eigen/R/profile.R	2011-11-29 20:36:58 UTC (rev 1465)
+++ pkg/lme4Eigen/R/profile.R	2011-11-29 21:09:24 UTC (rev 1466)
@@ -31,7 +31,7 @@
     th <- xpp$theta
     pp <- new(Class=class(xpp), X=xpp$X, Zt=xpp$Zt, Lambdat=xpp$Lambdat, Lind=xpp$Lind, theta=th)
     opt <- c(sig * th, sig)
-    names(opt) <- c(sprintf(".sig%02d", seq_along(pp$theta)), "sigma")
+    names(opt) <- c(sprintf(".sig%02d", seq_along(pp$theta)), ".sigma")
     opt <- c(opt, fixef(fm))
     rr <- fm at resp
     resp <- new(Class=class(rr), y=rr$y)
@@ -212,11 +212,11 @@
 
 stripExpr <- function(ll, nms) {
     stopifnot(inherits(ll, "list"), is.character(nms))
-    lsigNm <- which(nms == ".lsig")
-    sigNms <- grep("^.sig", nms)
+    sigNm <- which(nms == ".sigma")
+    sigNms <- grep("^.sig[0-9]+", nms)
     sigsub <- as.integer(substring(nms[sigNms], 5))
     fLevs <- as.expression(nms)
-    fLevs[lsigNm] <- expression(log(sigma))
+    fLevs[sigNm] <- expression(sigma)
     fLevs[sigNms] <- parse(text=paste("sigma[", sigsub, "]"))
     levsExpr <- substitute(strip.custom(factor.levels=foo), list(foo=fLevs))
     llNms <- names(ll)
@@ -511,7 +511,7 @@
 log.thpr <- function (x, base = exp(1))
 {
     cn <- colnames(x)
-    sigs <- grep("^\\.sig[0-9][0-9]", cn)
+    sigs <- grep("^\\.sig", cn)
     if (length(sigs)) {
         colnames(x) <- sub("^\\.sig", ".lsig", cn)
         levels(x$.par) <- sub("^\\.sig", ".lsig", levels(x$.par))



More information about the Lme4-commits mailing list