Learn R Programming

mixdist (version 0.5-5)

coef.mix: Extract Mixture Model Coefficients

Description

coef.mix is a function which extracts mixture model coefficients from objects returned by the model fitting function mix. It is called via the generic function coef.

Usage

# S3 method for mix
coef(object, natpar = FALSE, …)

Arguments

object

an object of class "mix", usually, the results returned by the model fitting function mix.

natpar

a logical scalar specifying whether the natural parameters should be given.

other arguments.

Value

A data frame containing three variables, which are, in order, the proportions, means, and standard deviations, respectively. If natpar is TRUE, then the natural parameters of component distributions are also displayed.

See Also

mix for model fitting.

Examples

Run this code
# NOT RUN {
data(pike65) # load the grouped data `pike65'
data(pikepar) # load the initial values of parameters for the data `pike65'
fit <- mix(pike65, pikepar, "lnorm", mixconstr(consigma = "CCV"), emsteps = 3)
coef(fit)
coef(fit, natpar = TRUE)
# }

Run the code above in your browser using DataLab