## Random data (following APE)
data(bird.orders)
set.seed(1)
x <- structure(rnorm(length(bird.orders$tip.label)),
names=bird.orders$tip.label)
if (FALSE) {
## With the VCV approach
fit1 <- find.mle(make.bm(bird.orders, x), .1)
## With the pruning calculations
lik.pruning <- make.bm(bird.orders, x, control=list(method="pruning"))
fit2 <- find.mle(lik.pruning, .1)
## All the same (need to drop the function from this though)
all.equal(fit1[-7], fit2[-7])
## If this is the same as the estimates from Geiger, to within the
## tolerances expected for the calculation and optimisation:
fit3 <- fitContinuous(bird.orders, x)
all.equal(fit3$Trait1$lnl, fit1$lnLik)
all.equal(fit3$Trait1$beta, fit1$par, check.attributes=FALSE)
}
Run the code above in your browser using DataLab