Learn R Programming

EMMIXcontrasts2 (version 0.1.2)

wire.init.fit: Get the initial values

Description

The routinnes to fit mixture models to the data and to obtain initial partition or initial values.

Usage

wire.init.fit(dat,X,qe,n,m,g,nkmeans,nrandom=0)
wire.init.reg(dat,X,qe,n,m,g,cluster)
tau.estep.wire(dat,pro,mu,sigma,n,m,g)

Arguments

dat
The dataset, an n by m numeric matrix, where n is number of observations and m the dimension of data.
X
The design matrix
n
The number of observations
m
The number of variables
g
The number of components in the mixture model
qe
The number of columns of design matrix W
cluster
A vector of integers specifying the initial partitions of the data
nkmeans
An integer to specify the number of KMEANS partitions to be used to find the best initial values.
nrandom
An integer to specify the number of random partitions to be used to find the best initial values; the default value is 0.
pro
A vector of mixing proportions pi
mu
A numeric matrix with each column corresponding to the mean.
sigma
The covaraince m by m by g array.

Value

pro
A vector of mixing proportions pi
beta
A numeric matrix with each column corresponding to the mean.
sigma.e
The covaraince of error
cluster
A vector of final partition
loglik
The loglikelihood at convergence
lk
A vector of loglikelihood at each EM iteration

Details

These functions are called internally.

See Also

emmixwire