pmlCluster {phangorn}R Documentation

Stochastic Partitioning

Description

Stochastic Partitioning of genes into p cluster.

Usage

pmlCluster(formula, fit, weight, p = 4, part = NULL, ...)

Arguments

formula a formula object (see details).
fit an object of class pml.
weight weight is matrix of frequency of site patterns for all genes.
p number of clusters.
part starting partition, otherwise a random partiton is generated.
... 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 cluster, on the right the parameter which are optimised specific to each cluster. The parameters available are "nni", "bf", "Q", "inv", "shape", "edge", "rate". Each parameters can be used only once in the formula. "rate" is only available for the right side and so is "nni".

Value

pmlCluster returns a list with elements

logLik log-likelihood of the fit
trees a list of all trees during the optimisation.
fits fits for the final partitions

Author(s)

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

See Also

pml,pmlPart,pmlMix

Examples

## Not run: 
data(yeast)
dm <- dist.logDet(yeast)
tree <- NJ(dm)
fit=pml(tree,yeast)
fit = optim.pml(fit)

weight=xtabs(~ index+genes,attr(yeast, "index"))
set.seed(1)

sp <- pmlCluster(edge~rate, fit, weight, p=4)
sp
## End(Not run)

[Package phangorn version 0.0-5 Index]