[Mattice-commits] r144 - in pkg: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jan 9 20:51:59 CET 2009
Author: andrew_hipp
Date: 2009-01-09 20:51:59 +0100 (Fri, 09 Jan 2009)
New Revision: 144
Modified:
pkg/NAMESPACE
pkg/R/informationCriterion.R
pkg/R/summarizingAnalyses.R
pkg/man/carex.Rd
pkg/man/informationCriterion.Rd
pkg/man/ouSim.Rd
pkg/man/summary.hansenBatch.Rd
Log:
changes to arguments and documentation
Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE 2009-01-09 19:09:09 UTC (rev 143)
+++ pkg/NAMESPACE 2009-01-09 19:51:59 UTC (rev 144)
@@ -3,4 +3,8 @@
export(regimeVectors, paintBranches)
export(summary.hansenBatch, print.hansenSummary)
export(isMonophyletic, nodeDescendents, mrcaOUCH)
-export(runBatchHansen)
\ No newline at end of file
+export(runBatchHansen)
+S3method(print, ouSim)
+S3method(print, hansenSummary)
+S3method(print, informationCriterion)
+S3method(summary, hansenBatch)
\ No newline at end of file
Modified: pkg/R/informationCriterion.R
===================================================================
--- pkg/R/informationCriterion.R 2009-01-09 19:09:09 UTC (rev 143)
+++ pkg/R/informationCriterion.R 2009-01-09 19:51:59 UTC (rev 144)
@@ -32,7 +32,8 @@
return(outdata)
}
-print.informationCriterion <- function(ic, ...) {
+print.informationCriterion <- function(x, ...) {
+ ic <- x
items <- c('u', 'K', 'AIC', 'AICc', 'BIC', 'AICwi', 'AICcwi', 'BICwi')
out <- matrix(NA, nrow = length(ic$names), ncol = length(items), dimnames = list(ic$names, items))
for(i in items) out[, i] <- ic[[i]]
Modified: pkg/R/summarizingAnalyses.R
===================================================================
--- pkg/R/summarizingAnalyses.R 2009-01-09 19:09:09 UTC (rev 143)
+++ pkg/R/summarizingAnalyses.R 2009-01-09 19:51:59 UTC (rev 144)
@@ -4,7 +4,7 @@
summary.hansenBatch <- function(object, ...){
## items in output: hansens, regimeList, regimeMatrix
- hansenBatch <- x
+ hansenBatch <- object
icObject <- informationCriterion.hansenBatch(hansenBatch) # Get information criterion weights for all models
nmodels <- dim(hansenBatch$hansens[[1]])[1] # number of models per tree (ignores the fact that models may not be present in all trees)
ntrees <- length(hansenBatch$hansens) # number of trees
Modified: pkg/man/carex.Rd
===================================================================
--- pkg/man/carex.Rd 2009-01-09 19:09:09 UTC (rev 143)
+++ pkg/man/carex.Rd 2009-01-09 19:51:59 UTC (rev 144)
@@ -42,6 +42,7 @@
}
\examples{
+ library(maticce)
data(carex)
attach(carex)
ovales.tree <- ape2ouch(ovales.tree) # tree comes in in phylo format, but we need an ouchtree object
@@ -53,3 +54,4 @@
plot(trialSim, colors = paintBranches(list(ovales.nodes[[2]]), ovales.tree)) # plots the character simulation, with branch colors changing only at node 2
}
\author{Andrew L. Hipp <ahipp at mortonarb.org>}
+\keyword{datasets}
\ No newline at end of file
Modified: pkg/man/informationCriterion.Rd
===================================================================
--- pkg/man/informationCriterion.Rd 2009-01-09 19:09:09 UTC (rev 143)
+++ pkg/man/informationCriterion.Rd 2009-01-09 19:51:59 UTC (rev 144)
@@ -5,9 +5,9 @@
\title{Information criterion and weights for a set of models}
\description{Returns AIC, AICc, and BIC values and weights for a set of models.}
\usage{
- informationCriterion(u = NULL, lnL = NULL, K, n = 1, names = NULL)
+ informationCriterion(u = NULL, lnL = NULL, K, n = 1, names = NULL, ...)
informationCriterion.hansenBatch(hansenBatch)
- print.informationCriterion(ic, ...)
+ print.informationCriterion(x, ...)
}
\details{
At the minimum, a vector of either the model log-likelihoods (\code{lnL}) or deviances (\code{u} = -2 * lnL) and a vector
@@ -33,7 +33,7 @@
}
\item{hansenBatch}{
Output from \{runBatchHansen}.
- \item{ic}{
+ \item{x}{
Output from \{informationCriterion}.
}
\value{
Modified: pkg/man/ouSim.Rd
===================================================================
--- pkg/man/ouSim.Rd 2009-01-09 19:09:09 UTC (rev 143)
+++ pkg/man/ouSim.Rd 2009-01-09 19:51:59 UTC (rev 144)
@@ -1,24 +1,28 @@
\name{ouSim}
\alias{ouSim}
\alias{ouSim.ouchtree}
-\alias{ouSim.brownHansen}
+\alias{ouSim.browntree}
+\alias{ouSim.hansentree}
\alias{ouSim.phylo}
\alias{ouSim.hansenBatch}
+\alias{ouSim.hansenSummary}
\title{Discrete-time simulation of Ornstein-Uhlenbeck models on a user tree.}
\description{
\code{ouSim} simulates the evolution of a single character for visualization purposes; for parametric bootstrapping,
utilize the \code{simulate} methods in \code{ouch}.
}
\usage{
- ouSim(object, ...) ## Generic function
- ouSim.phylo(phy, rootState = 0, shiftBranches = NULL, shiftStates = NULL, alpha = 0, variance = 1, theta = rootState, model = "OU", branchMeans = NULL, steps = 1000)
- ouSim.ouchtree(tree, rootState = 0, alpha = 0, variance = 1, theta = rootState, steps = 1000)
- ouSim.brownHansen(analysis, ...)
- ouSim.hansenBatch(analysis, tree, treeNum = 1, rootState = NULL, ...)
+ ouSim(object, ...)
+ ouSim.phylo(object, rootState = 0, shiftBranches = NULL, shiftStates = NULL, alpha = 0, variance = 1, theta = rootState, model = "OU", branchMeans = NULL, steps = 1000)
+ ouSim.ouchtree(object, rootState = 0, alpha = 0, variance = 1, theta = rootState, steps = 1000)
+ ouSim.browntree(object, ...)
+ ouSim.hansentree(object, ...)
+ ouSim.hansenBatch(object, ...)
+ ouSim.hansenSummary(analysis, tree, treeNum = 1, rootState = NULL, ...)
}
\details{
A call to \code{ouSim} detects the class of \code{object} and behaves as follows:
- \item{phylo}{
+ \item{object}{
With an \pkg{ape}-style tree, all parameters of the model are specified by branch. Most flexibility, least convenience.
}
\item{ouchtree}{
@@ -44,7 +48,7 @@
model using two vectors that correspond to the branches in an \code{ape}-format tree. It is important to note that
this simulation method is really heuristic device, not appropriate for estimating parameter distributions. For
analysis purposes, you should utilize the \code{simulate} and \code{bootstrap} methods in \code{ouch}.
-}
+ }
\arguments{
\item{object}{
In a call to the generic function, an object of class ouchtree, browntree, hansentree, hansenBatch, or hansenSummary.
Modified: pkg/man/summary.hansenBatch.Rd
===================================================================
--- pkg/man/summary.hansenBatch.Rd 2009-01-09 19:09:09 UTC (rev 143)
+++ pkg/man/summary.hansenBatch.Rd 2009-01-09 19:51:59 UTC (rev 144)
@@ -16,7 +16,10 @@
}
\item{x}{
Output from \code{summary.hansenBatch}.
- }
+ }
+ \item{...}{
+ Additional arguments to \code{print} or \code{summary}.
+ }
}
\details{
\code{summary.hansenBatch} averages parameters over models and over trees, and provides the cumulative
More information about the Mattice-commits
mailing list