pmlPart {phangorn}R Documentation

Partition model.

Description

Model to estimate phylogenies for partitioned data.

Usage

pmlPart(formula, object, ...)

Arguments

formula a formula object (see details).
object an object of class pml or a list of objects of class pml .
... Further arguments passed to or from other methods.

Details

The formula object allows to specify which parameter get optimised. The formula is generally of the form edge + bf + Q ~ rate + shape + ..., on the left side are the parameters which get optimised over all partitions, on the right the parameter which are optimised specific to each partition. The parameters available are "nni", "bf", "Q", "inv", "shape", "edge", "rate". Each parameters can be used only once in the formula. "rate" and "nni" are only available for the right side of the formula.

For partitions with different edge weights, but same topology, pmlPen can try to find more parsimonious models (see example).

Value

kcluster returns a list with elements

logLik log-likelihood of the fit
trees a list of all trees during the optimisation.
object an object of class "pml" or "pmlPart"

Author(s)

Klaus Schliep K.P.Schliep@massey.ac.nz

See Also

pml,pmlCluster,pmlMix

Examples

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]

set.seed(1)

sp <- pmlPart(edge ~ rate + inv, fits, weight=weight)
sp

sp2 <- pmlPart(~ edge + inv, fits, weight=weight)
sp2
AIC(sp2)

sp3 <- pmlPen(sp2, lambda = 2) 
AIC(sp3)


[Package phangorn version 0.0-5 Index]