-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
moha
committed
Oct 7, 2015
1 parent
55a9b72
commit 1bf62e2
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
% Generated by roxygen2 (4.1.1): do not edit by hand | ||
% Please edit documentation in R/shift_configuration.R | ||
\name{configuration_ic} | ||
\alias{configuration_ic} | ||
\title{compute the information criterion score for the given configuration} | ||
\usage{ | ||
configuration_ic(tr, Y, shift.configuration, criterion = c("pBIC", "pBICess", | ||
"mBIC", "BIC", "AIC", "AICc"), root.model = c("OUrandomRoot", | ||
"OUfixedRoot")) | ||
} | ||
\arguments{ | ||
\item{tr}{an ultrametric phylogenetic tree of type phylo with branch lengths.} | ||
|
||
\item{Y}{the trait vector/matrix where it is labeled by the species names appear as row names.} | ||
|
||
\item{shift.configuration}{the shift positions, i.e. indicies of edges where the estimated shifts occurs.} | ||
|
||
\item{criterion}{the information criterion.} | ||
|
||
\item{root.model}{the asncestoral state model.} | ||
} | ||
\value{ | ||
the information criterion value of the shift configuration. | ||
} | ||
\description{ | ||
compute the information criterion score for the given configuration | ||
} | ||
\examples{ | ||
library("l1ou"); | ||
data("lizard.traits", "lizard.tree"); | ||
Y <- lizard.traits[,1]; | ||
eModel <- estimate_shift_configuration(lizard.tree, Y); | ||
ic.score <- configuration_ic(lizard.tree, eModel$Y, eModel$shift.configuration, criterion="pBIC"); | ||
print(ic.score); | ||
} | ||
\seealso{ | ||
\code{\link{estimate_shift_configuration}} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
% Generated by roxygen2 (4.1.1): do not edit by hand | ||
% Please edit documentation in R/phylogeny_bootstrap.R | ||
\name{l1ou_bootstrap_support} | ||
\alias{l1ou_bootstrap_support} | ||
\title{computes the bootstrap support for the detected shift configuration} | ||
\usage{ | ||
l1ou_bootstrap_support(tr, model, nItrs = 100, multicore = FALSE, | ||
nCores = 2) | ||
} | ||
\arguments{ | ||
\item{tr}{an ultrametric phylogenetic tree of type phylo with branch lengths and tip labels.} | ||
|
||
\item{model}{the object generetes by function estimate_shift_configuration.} | ||
|
||
\item{nItrs}{number of independent iterations (bootstrap independent replicates).} | ||
|
||
\item{multicore}{logical. If TRUE, it runs nCores processes in parallel. See details.} | ||
|
||
\item{nCores}{desired number of parallel processes.} | ||
} | ||
\value{ | ||
vector of size of the number of edges in the tree. Each entry is the proportion of bootstrap replicates for which a shift is detected on the corresponding edge. | ||
} | ||
\description{ | ||
computes the bootstrap support for the detected shift configuration | ||
} | ||
\details{ | ||
The results of sequential and parallel runs are not necessarily equal, because different seeds might be used for different bootstrap replicates. | ||
To change options, like the information criterion or maximum allowed number of shifts, modify model$opt. | ||
} | ||
\examples{ | ||
data(lizard.traits, lizard.tree); | ||
Y <- lizard.traits[,1]; | ||
eModel <- estimate_shift_configuration(lizard.tree, Y); | ||
result <- l1ou_bootstrap_support(lizard.tree, eModel, nItrs=2); | ||
print(result); | ||
} | ||
\seealso{ | ||
\code{\link{estimate_shift_configuration}} | ||
} | ||
|