mixdist (version 0.5-5)

mixparam: Construct Starting Values for Parameters

Description

Construct starting values for parameters of a mixture model.

Usage

mixparam(mu, sigma, pi = NULL)

Arguments

mu

a vector of means of component distributions, which should be in ascending order.

sigma

a vector of standard deviations of component distributions, which are corresponding to the means. sigmas must be in ascending order when means are equal.

pi

the corresponding mixing proportions of components. If NULL, the proportions will be taken as 1/k, where k is the number of elements of mu.

Value

A data frame containing three variables, which are, in order, the proportions, means, and standard deviations.

See Also

mixgroup for grouping data, mixconstr for constructing constraints.

Examples

Run this code
# NOT RUN {
mixparam(mu = c(20, 30, 40), sigma = c(2, 3, 4))
mixparam(c(20, 30, 40), c(3), c(0.15, 0.78, 0.07))
# }

Run the code above in your browser using DataLab