File: varcomp.Rd

package info (click to toggle)
r-cran-ape 5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,932 kB
  • sloc: ansic: 7,626; cpp: 116; sh: 17; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 970 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
\name{varcomp}
\alias{varcomp}
\title{Compute Variance Component Estimates}
\description{
  Get variance component estimates from a fitted \code{lme} object.
}
\usage{
varcomp(x, scale = FALSE, cum = FALSE)
}
\arguments{
  \item{x}{A fitted \code{lme} object}
  \item{scale}{Scale all variance so that they sum to 1}
  \item{cum}{Send cumulative variance components.}
}
\details{
  Variance computations is done as in Venables and Ripley (2002).
}
\value{
  A named vector of class \code{varcomp} with estimated variance components.
}
\references{
  Venables, W. N. and Ripley, B. D. (2002) \emph{Modern Applied Statistics
  with S (Fourth Edition)}. New York: Springer-Verlag.
}
\author{Julien Dutheil \email{dutheil@evolbio.mpg.de}}
\seealso{\code{\link[nlme]{lme}}}
\examples{
data(carnivora)
library(nlme)
m <- lme(log10(SW) ~ 1, random = ~ 1|Order/SuperFamily/Family/Genus, data=carnivora)
v <- varcomp(m, TRUE, TRUE)
plot(v)
}
\keyword{regression}
\keyword{dplot}