This is a help function for NMixMCMC
function. If
initr
is not given, it calculates reasonable initial values for
component allocations. If initr
argument is given then it is
checked for consistency and formatted on output.
THIS FUNCTION IS NOT TO BE CALLED BY ORDINARY USERS.
NMixMCMCinitr(z, K, w, mu, Sigma, p, n, initr)
A vector with reasonable initial component allocations.
a vector (if \(p=1\)) or a \(n\times p\) matrix with initial values of scaled observations
a number of mixture components
a vector with (initial) mixture weights
a vector of (initial) mixture means (if \(p=1\)) or a \(K\times p\) matrix with (initial) mixture means in rows (if \(p>1\))
a vector of (initial) mixture variances (if \(p=1\)) or a \(K\,p\times p\) matrix with (initial) mixture covariance matrices put below each other
dimension of the data
number of observations
a vector of initial component allocations to be checked for consistency. If not given then reasonable initials are generated.
Arnošt Komárek arnost.komarek@mff.cuni.cz
NMixMCMC
.