data(yeast)
dm <- dist.logDet(yeast)
tree <- NJ(dm)
fit <- pml(tree,yeast)
fits <- optim.pml(fit)
weight=xtabs(~ index+genes,attr(yeast, "index"))[,1:10]
sp <- pmlPart(edge ~ rate + inv, fits, weight=weight)
sp
if (FALSE) {
sp2 <- pmlPart(~ edge + inv, fits, weight=weight)
sp2
AIC(sp2)
sp3 <- pmlPen(sp2, lambda = 2)
AIC(sp3)
}
Run the code above in your browser using DataLab