phylolm(formula, data = list(), phy, model = c("BM", "OUrandomRoot",
"OUfixedRoot", "lambda", "kappa", "delta", "EB", "trend"),
lower.bound = NULL, upper.bound = NULL,
starting.value = NULL, ...)
data
, the variables are taken from current environment.optim
.BM
), the
Ornstein-Uhlenbeck model with an ancestral state to be estimated at
the root (OUfixedRoot
), the Ornstein-Uhlenbeck model with the
ancestral state at the root having the stationary distribution
(OUrandomRoot
), Pagel's $\lambda$ model
(lambda
), Pagel's $\kappa$ model (kappa
),
Pagel's $\delta$ model (delta
), the early burst
model (EB
), and the Brownian motion model with a trend
(trend
). By default, the bounds on the phylogenetic parameters are
$[10^{-7}/T,50/T]$ for $\alpha$,
$[10^{-7},1]$ for $\lambda$,
$[10^{-6},1]$ for $\kappa$,
$[10^{-5},3]$ for $\delta$ and
$[-3/T,0]$ for rate
, where $T$ is the mean root-to-tip distance.
Butler, M. A. and King, A. A. 2004. "Phylogenetic comparative analysis: A modeling approach for adaptive evolution". The American Naturalist 164:683-695.
Hansen, T. F. 1997. "Stabilizing selection and the comparative analysis of adaptation". Evolution 51:1341-1351.
Harmon, L. J. et al. 2010. "Early bursts of body size and shape evolution are rare in comparative data". Evolution 64:2385-2396.
Ho, L. S. T. and An�, C. "Asymptotic theory with hierarchical autocorrelation: Ornstein-Uhlenbeck tree models". The Annals of Statistics 41(2):957-981.
Pagel, M. 1997. "Inferring evolutionary processes from phylogenies". Zoologica Scripta 26:331-348.
Pagel, M. 1999. "Inferring the historical patterns of biological evolution". Nature 401:877-884.
corBrownian
, corMartins
,
corPagel
, fitContinuous
, pgls
.set.seed(123456)
tre = rcoal(60)
taxa = sort(tre$tip.label)
b0=0; b1=1;
x <- rTrait(n=1, phy=tre,model="BM",
parameters=list(ancestral.state=0,sigma2=10))
y <- b0 + b1*x +
rTrait(n=1,phy=tre,model="lambda",parameters=list(
ancestral.state=0,sigma2=1,lambda=0.5))
dat = data.frame(trait=y[taxa],pred=x[taxa])
fit = phylolm(trait~pred,data=dat,phy=tre,model="lambda")
summary(fit)
Run the code above in your browser using DataLab