| model components {DirichletMultinomial} | R Documentation |
The accessors mixture and mixturewt return information
about the esimtated Dirichlet comonents of the fitted
model. mixture returns a sample x component matrix of estimated
values, mixturewt reta matrix of
mixture(object, ..., assign=FALSE) mixturewt(object, ...) goodnessOfFit(object, ...) laplace(object, ...) ## S4 method for signature 'DMN' AIC(object, ..., k = 2) ## S4 method for signature 'DMN' BIC(object, ...) ## S4 method for signature 'DMN' fitted(object, ..., scale=FALSE) ## S4 method for signature 'DMN' predict(object, newdata, ..., logevidence=FALSE) ## S4 method for signature 'DMNGroup' fitted(object, ...) ## S4 method for signature 'DMNGroup' predict(object, newdata, ..., assign=FALSE) ## S4 method for signature 'DMNGroup' summary(object, ...)
object |
An instance of class |
newdata |
A |
... |
Additional arguments, available to methods, when applicable. |
assign |
|
scale |
|
logevidence |
|
k |
ignored. |
mixture with assign=FALSE returns a matrix of sample x
Dirichlet component estimates. With assign=TRUE mixture
returns a named vector indexing the maximal Dirichlet component of
each sample.
mixturewt returns a matrix with rows corresponding to mixture
components, and columns pi (component weight) and theta
(component variability). Small values of theta correspond to
highly variable components.
goodnessOfFit returns a named numeric vector of measures of
goodness of fit.
laplace, AIC, and BIC return the corresponding
measures of goodness of fit.
Martin Morgan mailto:mtmorgan@fhcrc.org
data(fit)
best <- fit[[4]]
mixturewt(best)
head(mixture(best), 3)
head(mixture(best, assign=TRUE), 3)
goodnessOfFit(best)
fl <- system.file(package="DirichletMultinomial", "extdata",
"Twins.csv")
count <- t(as.matrix(read.csv(fl, row.names=1)))
data(bestgrp)
bestgrp
head(predict(bestgrp, count))