[Lme4-commits] r1724 - pkg/lme4/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue May 8 18:49:10 CEST 2012
Author: bbolker
Date: 2012-05-08 18:49:10 +0200 (Tue, 08 May 2012)
New Revision: 1724
Modified:
pkg/lme4/man/profile-methods.Rd
pkg/lme4/man/refit.Rd
Log:
add example of fitting each column of a matrix via refit()
alias for as.data.frame.thpr
Modified: pkg/lme4/man/profile-methods.Rd
===================================================================
--- pkg/lme4/man/profile-methods.Rd 2012-05-08 16:47:20 UTC (rev 1723)
+++ pkg/lme4/man/profile-methods.Rd 2012-05-08 16:49:10 UTC (rev 1724)
@@ -2,6 +2,7 @@
\name{profile-methods}
\alias{profile.merMod}
\alias{profile-methods}
+\alias{as.data.frame.thpr}
\title{Methods for profile() of [ng]lmer fitted models}
\usage{
\method{profile}{merMod} (fitted, which = 1:nptot,
Modified: pkg/lme4/man/refit.Rd
===================================================================
--- pkg/lme4/man/refit.Rd 2012-05-08 16:47:20 UTC (rev 1723)
+++ pkg/lme4/man/refit.Rd 2012-05-08 16:49:10 UTC (rev 1724)
@@ -29,4 +29,14 @@
creation of the model representation and goes directly to
the optimization step.
}
-
+\examples{
+ ## using refit() to fit each column in a matrix of responses
+ set.seed(101)
+ Y <- matrix(rnorm(1000),ncol=10)
+ res <- list()
+ d <- data.frame(y=Y[,1],x=rnorm(100),f=rep(1:10,10))
+ fit1 <- lmer(y~x+(1|f),data=d)
+ res <- c(fit1,lapply(as.data.frame(Y[,-1]),
+ refit,object=fit1))
+}
+
\ No newline at end of file
More information about the Lme4-commits
mailing list