[Lme4-commits] r1648 - in pkg/lme4Eigen: . man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 13 17:16:49 CET 2012


Author: dmbates
Date: 2012-03-13 17:16:49 +0100 (Tue, 13 Mar 2012)
New Revision: 1648

Added:
   pkg/lme4Eigen/man/glmer.nb.Rd
Modified:
   pkg/lme4Eigen/NAMESPACE
   pkg/lme4Eigen/man/Nelder_Mead.Rd
   pkg/lme4Eigen/man/bootMer.Rd
   pkg/lme4Eigen/man/getME.Rd
   pkg/lme4Eigen/man/glmer.Rd
   pkg/lme4Eigen/man/lmer.Rd
   pkg/lme4Eigen/man/mcmcsamp.Rd
   pkg/lme4Eigen/man/mkdevfun.Rd
   pkg/lme4Eigen/man/nlmer.Rd
   pkg/lme4Eigen/man/ranef.Rd
Log:
Updated the .Rd and NAMESPACE files from a do-roxy run


Modified: pkg/lme4Eigen/NAMESPACE
===================================================================
--- pkg/lme4Eigen/NAMESPACE	2012-03-13 16:13:53 UTC (rev 1647)
+++ pkg/lme4Eigen/NAMESPACE	2012-03-13 16:16:49 UTC (rev 1648)
@@ -118,7 +118,6 @@
 S3method(plot,coef.mer)
 S3method(plot,lmList.confint)
 S3method(plot,ranef.mer)
-S3method(plot,merMod)
 S3method(predict,merMod)
 S3method(print,merMod)
 S3method(print,summary.mer)

Modified: pkg/lme4Eigen/man/Nelder_Mead.Rd
===================================================================
--- pkg/lme4Eigen/man/Nelder_Mead.Rd	2012-03-13 16:13:53 UTC (rev 1647)
+++ pkg/lme4Eigen/man/Nelder_Mead.Rd	2012-03-13 16:16:49 UTC (rev 1648)
@@ -7,31 +7,39 @@
 }
 \arguments{
   \item{fn}{a function of one numeric vector argument
-    returning a numeric scalar}
+  returning a numeric scalar}
+
   \item{par}{numeric vector of starting values for the
   parameters.}
+
   \item{lower}{numeric vector of lower bounds - elements
   may be \code{-Inf}.}
+
   \item{upper}{numeric vector of upper bounds - elements
   may be \code{Inf}.}
+
   \item{control}{a named list of control settings.
-    Possible settings are \describe{
-      \item{verbose}{FIXME (Roxygen sync?)}
-      \item{iprint}{numeric
-	scalar - frequency of printing evaluation information.
-	Defaults to 0 indicating no printing.}
-      \item{maxfun}{numeric scalar - maximum number of function
-	evaluations allowed.} \item{FtolAbs}{numeric scalar -
-	absolute tolerance on change in function values}
-      \item{FtolRel}{numeric scalar - relative tolerance on
-	change in function values} \item{XtolRel}{numeric scalar
-	- relative tolerance on change in parameter values}
-      \item{MinfMax}{numeric scalar - maximum value of the
-	minimum}
-      \item{xst}{numeric vector of initial step sizes to
-	establish the simplex - all elements must be non-zero.}
-      \item{xt}{numeric vector of tolerances on the
-	parameters.}
+  Possible settings are \describe{ \item{iprint}{numeric
+  scalar - frequency of printing evaluation information.
+  Defaults to 0 indicating no printing.}
+  \item{maxfun}{numeric scalar - maximum number of function
+  evaluations allowed (default:10000).}
+  \item{FtolAbs}{numeric scalar - absolute tolerance on
+  change in function values (default: 1e-5)}
+  \item{FtolRel}{numeric scalar - relative tolerance on
+  change in function values (default:1e-15)}
+  \item{XtolRel}{numeric scalar - relative tolerance on
+  change in parameter values (default: 1e-7)}
+  \item{MinfMax}{numeric scalar - maximum value of the
+  minimum (default: .Machine$double.xmin)}
+  \item{xst}{numeric vector of initial step sizes to
+  establish the simplex - all elements must be non-zero
+  (default: rep(0.02,length(par)))} \item{xt}{numeric
+  vector of tolerances on the parameters (default:
+  xst*5e-4)} \item{verbose}{numeric value: 0=no printing,
+  1=print every 20 evaluations, 2=print every 10
+  evalutions, 3=print every evaluation.  Sets
+  \sQuote{iprint}, if specified, but does not override it.}
   }}
 }
 \value{

Modified: pkg/lme4Eigen/man/bootMer.Rd
===================================================================
--- pkg/lme4Eigen/man/bootMer.Rd	2012-03-13 16:13:53 UTC (rev 1647)
+++ pkg/lme4Eigen/man/bootMer.Rd	2012-03-13 16:16:49 UTC (rev 1648)
@@ -11,7 +11,7 @@
   \item{x}{fitted \code{*lmer()} model, see
   \code{\link{lmer}}, \code{\link{glmer}}, etc.}
 
-  \item{FUN}{a \code{\link{function}(x)}, computing the
+  \item{FUN}{a \code{\link{function}(x)}, computating the
   \emph{statistic} of interest, which must be a numeric
   vector, possibly named.}
 
@@ -73,7 +73,7 @@
 fm01ML <- lmer(Yield ~ 1|Batch, Dyestuff, REML = FALSE)
 ## see ?"profile-methods"
 mySumm <- function(.) { s <- sigma(.)
-    c(beta =getME(., "beta"), sigma = s, sig01 = s * getME(., "theta")) }
+    c(beta =getME(., "beta"), sigma = s, sig01 = unname(s * getME(., "theta"))) }
 (t0 <- mySumm(fm01ML)) # just three parameters
 
 ## 3.8s (on a 5600 MIPS 64bit fast(year 2009) desktop "AMD Phenom(tm) II X4 925"):
@@ -94,7 +94,6 @@
                    h = log, hdot = function(.) 1/., hinv = exp))
 
 (bCI.3 <- boot.ci(boo01, index=3, type=c("norm", "basic", "perc")))# sig01
-
 }
 \references{
   Davison, A.C. and Hinkley, D.V. (1997) \emph{Bootstrap
@@ -110,3 +109,4 @@
 }
 \keyword{htest}
 \keyword{models}
+

Modified: pkg/lme4Eigen/man/getME.Rd
===================================================================
--- pkg/lme4Eigen/man/getME.Rd	2012-03-13 16:13:53 UTC (rev 1647)
+++ pkg/lme4Eigen/man/getME.Rd	2012-03-13 16:16:49 UTC (rev 1648)
@@ -4,10 +4,8 @@
 \alias{getME}
 \title{Extract or Get Generalize Components from a Fitted Mixed Effects Model}
 \usage{
-getME(object,
-      name = c("X", "Z", "Zt", "u", "Gp", "L", "Lambda", "Lambdat",
-               "Lind", "RX", "RZX", "beta", "theta", "REML", "n_rtrms",
-               "is_REML", "devcomp", "offset", "lower"))
+  getME(object,
+    name = c("X", "Z", "Zt", "u", "Gp", "L", "Lambda", "Lambdat", "Lind", "RX", "RZX", "beta", "theta", "REML", "n_rtrms", "is_REML", "devcomp", "offset", "lower"))
 }
 \arguments{
   \item{object}{a fitted mixed-effects model of class
@@ -34,14 +32,15 @@
   fixed-effects parameters} \item{RZX}{cross-term in the
   full Cholesky factor} \item{beta}{fixed-effects parameter
   estimates (same as the result of \code{\link{fixef}})}
-  \item{n_rtrms}{number of random-effects terms}
-  \item{is_REML}{same as the result of
-  \code{\link{isREML}}} \item{devcomp}{a list consisting of
-  a named numeric vector, \dQuote{cmp}, and a named integer
-  vector, \dQuote{dims}, describing the fitted model}
-\item{offset}{model offset}
-\item{lower}{lower bounds on model parameters}
-}}
+  \item{theta}{random-effects parameter estimates: these
+  are parameterized as the relative Cholesky factors of
+  each random effect term} \item{n_rtrms}{number of
+  random-effects terms} \item{is_REML}{same as the result
+  of \code{\link{isREML}}} \item{devcomp}{a list consisting
+  of a named numeric vector, \dQuote{cmp}, and a named
+  integer vector, \dQuote{dims}, describing the fitted
+  model} \item{offset}{model offset} \item{lower}{lower
+  bounds on model parameters} ## FIXME: theta only? }}
 }
 \value{
   Unspecified, as very much depending on the
@@ -60,11 +59,6 @@
   \code{\link{fixef}}, \code{\link{ranef}},
   \code{\link{vcov}}, etc.
 }
-\seealso{
-  \code{\link{getCall}()}, More standard methods for mer
-  objects, such as \code{\link{ranef}},
-  \code{\link{fixef}}, \code{\link{vcov}}, etc.
-}
 \examples{
 ## shows many methods you should consider *before* getME():
 methods(class = "merMod")
@@ -79,5 +73,11 @@
 ## All that can be accessed [potentially ..]:
 (nmME <- eval(formals(getME)$name))
 }
+\seealso{
+  \code{\link{getCall}()}, More standard methods for mer
+  objects, such as \code{\link{ranef}},
+  \code{\link{fixef}}, \code{\link{vcov}}, etc.: see
+  \code{methods(class="merMod")}
+}
 \keyword{utilities}
 

Modified: pkg/lme4Eigen/man/glmer.Rd
===================================================================
--- pkg/lme4Eigen/man/glmer.Rd	2012-03-13 16:13:53 UTC (rev 1647)
+++ pkg/lme4Eigen/man/glmer.Rd	2012-03-13 16:16:49 UTC (rev 1648)
@@ -7,7 +7,7 @@
     nAGQ = 1L, compDev = TRUE, subset, weights, na.action,
     offset, contrasts = NULL, mustart, etastart,
     devFunOnly = FALSE, tolPwrss = 1e-10,
-    optimizer = c("bobyqa","Nelder_Mead"), ...)
+    optimizer = c("bobyqa", "Nelder_Mead"), ...)
 }
 \arguments{
   \item{family}{a GLM family, see \code{\link[stats]{glm}}
@@ -36,12 +36,37 @@
   \code{start} argument of the appropriate length is used
   as the starting value of \code{theta}.}
 
-  \item{optimizer}{which optimizer to use in the second
-  phase of optimization.  The default is
-  \code{\link{NelderMead}} and the alternative is
-  \code{\link{bobyqa}}.  For difficult model fits we have
-  found \code{\link{NelderMead}} to be more reliable but
-  occasionally slower than \code{\link{bobyqa}}.}
+  \item{optimizer}{which optimizer(s) to use for each phase
+  of optimization.  A character vector or list of
+  functions.  If \code{length(optimizer)==2}, the first
+  element will be used for the preliminary (random effects
+  parameters only) optimization, while the second will be
+  used for the final (random effects plus fixed effect
+  parameters) phase. The built-in optimizers are
+  \code{\link{Nelder_Mead}} and \code{\link{bobyqa}} (from
+  the \code{minqa} package; the default is to use
+  \code{\link{bobyqa}} for the first and
+  \code{\link{Nelder_Mead}} for the final phase.  (FIXME:
+  simplify if possible!). For difficult model fits we have
+  found \code{\link{Nelder_Mead}} to be more reliable but
+  occasionally slower than \code{\link{bobyqa}}. Any
+  minimizing function that allows box constraints can be
+  used provided that it (1) takes input parameters
+  \code{fn} (function to be optimized), \code{par}
+  (starting parameter values), \code{lower} (lower bounds)
+  and \code{control} (control parameters, passed through
+  from the \code{control} argument) and (2) returns a list
+  with (at least) elements \code{par} (best-fit
+  parameters), \code{fval} (best-fit function value),
+  \code{conv} (convergence code) and (optionally)
+  \code{message} (informational message, or explanation of
+  convergence failure).  Special provisions are made for
+  \code{\link{bobyqa}}, \code{\link{Nelder_Mead}}, and
+  optimizers wrapped in the \code{optimx} package; to use
+  \code{optimx} optimizers (including \code{L-BFGS-B} from
+  base \code{optim} and \code{nlminb}), pass the
+  \code{method} argument to \code{optim} in the
+  \code{control} argument.}
 
   \item{mustart}{optional starting values on the scale of
   the conditional mean, as in \code{\link[stats]{glm}}; see
@@ -173,6 +198,8 @@
 }
 \examples{
 ## generalized linear mixed model
+library(lattice)
+xyplot(incidence/size ~ period, group=herd, type="a", data=cbpp)
 (gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
               data = cbpp, family = binomial))
 ## using nAGQ=0L only gets close to the optimum

Added: pkg/lme4Eigen/man/glmer.nb.Rd
===================================================================
--- pkg/lme4Eigen/man/glmer.nb.Rd	                        (rev 0)
+++ pkg/lme4Eigen/man/glmer.nb.Rd	2012-03-13 16:16:49 UTC (rev 1648)
@@ -0,0 +1,21 @@
+\name{glmer.nb}
+\alias{glmer.nb}
+\title{glmer() for Negative Binomial}
+\usage{
+  glmer.nb(..., interval = log(th) + c(-3, 3),
+    verbose = FALSE)
+}
+\arguments{
+  \item{...}{formula, data, etc: the arguments for
+  \code{\link{glmer}(..)} (apart from \code{family}!).}
+
+  \item{interval}{interval in which to start the
+  optimization}
+
+  \item{verbose}{logical indicating how much progress
+  information should be printed.}
+}
+\description{
+  glmer() for Negative Binomial
+}
+

Modified: pkg/lme4Eigen/man/lmer.Rd
===================================================================
--- pkg/lme4Eigen/man/lmer.Rd	2012-03-13 16:13:53 UTC (rev 1647)
+++ pkg/lme4Eigen/man/lmer.Rd	2012-03-13 16:16:49 UTC (rev 1648)
@@ -5,7 +5,7 @@
   lmer(formula, data, REML = TRUE, sparseX = FALSE,
     control = list(), start = NULL, verbose = 0L, subset,
     weights, na.action, offset, contrasts = NULL,
-    devFunOnly = FALSE, optimizer="Nelder_Mead", ...)
+    devFunOnly = FALSE, optimizer = "Nelder_Mead", ...)
 }
 \arguments{
   \item{formula}{a two-sided linear formula object
@@ -86,9 +86,10 @@
   \code{contrasts.arg} of \code{model.matrix.default}.}
 
   \item{devFunOnly}{logical - return only the deviance
-    evaluation function.}
-  \item{optimizer}{optimizer to use}
+  evaluation function.}
 
+  \item{optimizer}{character - name of optimizing function}
+
   \item{\dots}{other potential arguments.  A \code{method}
   argument was used in earlier versions of the package. Its
   functionality has been replaced by the \code{REML}

Modified: pkg/lme4Eigen/man/mcmcsamp.Rd
===================================================================
--- pkg/lme4Eigen/man/mcmcsamp.Rd	2012-03-13 16:13:53 UTC (rev 1647)
+++ pkg/lme4Eigen/man/mcmcsamp.Rd	2012-03-13 16:16:49 UTC (rev 1648)
@@ -12,7 +12,7 @@
 
   \item{verbose}{should verbose output be given?}
 
-  \item{...}{unused currently}
+  \item{...}{}
 }
 \value{
   a Markov chain Monte Carlo sample as a matrix

Modified: pkg/lme4Eigen/man/mkdevfun.Rd
===================================================================
--- pkg/lme4Eigen/man/mkdevfun.Rd	2012-03-13 16:13:53 UTC (rev 1647)
+++ pkg/lme4Eigen/man/mkdevfun.Rd	2012-03-13 16:16:49 UTC (rev 1648)
@@ -35,8 +35,6 @@
   \code{nlmer} model objects with \code{nAGQ = 0} the
   argument is also \code{theta}.  However, when nAGQ > 0
   the argument is \code{c(theta, beta)}.
-
-  FIXME: out of date!  See example.
 }
 \examples{
 (dd <- lmer(Yield ~ 1|Batch, Dyestuff, devFunOnly=TRUE))

Modified: pkg/lme4Eigen/man/nlmer.Rd
===================================================================
--- pkg/lme4Eigen/man/nlmer.Rd	2012-03-13 16:13:53 UTC (rev 1647)
+++ pkg/lme4Eigen/man/nlmer.Rd	2012-03-13 16:16:49 UTC (rev 1648)
@@ -5,8 +5,7 @@
   nlmer(formula, data, control = list(), start = NULL,
     verbose = 0L, nAGQ = 1L, subset, weights, na.action,
     offset, contrasts = NULL, devFunOnly = 0L,
-    tolPwrss = 1e-10,
-    optimizer = "Nelder_Mead", ...)
+    tolPwrss = 1e-10, optimizer = "Nelder_Mead", ...)
 }
 \arguments{
   \item{formula}{a nonlinear mixed model formula (see
@@ -101,12 +100,37 @@
   weighted residual sum-of-squares step.  Defaults to
   1e-10.}
 
-  \item{optimizer}{which optimizer to use in the second
-  phase of optimization.  The default is
-  \code{\link{NelderMead}} and the alternative is
-  \code{\link{bobyqa}}.  For difficult model fits we have
-  found \code{\link{NelderMead}} to be more reliable but
-  occasionally slower than \code{\link{bobyqa}}.}
+  \item{optimizer}{which optimizer(s) to use for each phase
+  of optimization.  A character vector or list of
+  functions.  If \code{length(optimizer)==2}, the first
+  element will be used for the preliminary (random effects
+  parameters only) optimization, while the second will be
+  used for the final (random effects plus fixed effect
+  parameters) phase. The built-in optimizers are
+  \code{\link{Nelder_Mead}} and \code{\link{bobyqa}} (from
+  the \code{minqa} package; the default is to use
+  \code{\link{bobyqa}} for the first and
+  \code{\link{Nelder_Mead}} for the final phase.  (FIXME:
+  simplify if possible!). For difficult model fits we have
+  found \code{\link{Nelder_Mead}} to be more reliable but
+  occasionally slower than \code{\link{bobyqa}}. Any
+  minimizing function that allows box constraints can be
+  used provided that it (1) takes input parameters
+  \code{fn} (function to be optimized), \code{par}
+  (starting parameter values), \code{lower} (lower bounds)
+  and \code{control} (control parameters, passed through
+  from the \code{control} argument) and (2) returns a list
+  with (at least) elements \code{par} (best-fit
+  parameters), \code{fval} (best-fit function value),
+  \code{conv} (convergence code) and (optionally)
+  \code{message} (informational message, or explanation of
+  convergence failure).  Special provisions are made for
+  \code{\link{bobyqa}}, \code{\link{Nelder_Mead}}, and
+  optimizers wrapped in the \code{optimx} package; to use
+  \code{optimx} optimizers (including \code{L-BFGS-B} from
+  base \code{optim} and \code{nlminb}), pass the
+  \code{method} argument to \code{optim} in the
+  \code{control} argument.}
 }
 \description{
   Fit a nonlinear mixed-effects model

Modified: pkg/lme4Eigen/man/ranef.Rd
===================================================================
--- pkg/lme4Eigen/man/ranef.Rd	2012-03-13 16:13:53 UTC (rev 1647)
+++ pkg/lme4Eigen/man/ranef.Rd	2012-03-13 16:16:49 UTC (rev 1648)
@@ -79,9 +79,9 @@
 fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy)
 fm3 <- lmer(diameter ~ (1|plate) + (1|sample), Penicillin)
 ranef(fm1)
-if(FALSE) { ##-- postVar=TRUE is not yet implemented -- FIXME
 str(rr1 <- ranef(fm1, postVar = TRUE))
 dotplot(rr1,scales = list(x = list(relation = 'free')))[["Subject"]]
+if(FALSE) { ##-- postVar=TRUE is not yet implemented for multiple terms -- FIXME
 str(ranef(fm2, postVar = TRUE))
 }
 op <- options(digits = 4)



More information about the Lme4-commits mailing list