Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

NMixMCMCinitr

Initial component allocations for the NMixMCMC function


Description

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.

Usage

NMixMCMCinitr(z, K, w, mu, Sigma, p, n, initr)

Arguments

z

a vector (if p=1) or a n x p matrix with initial values of scaled observations

K

a number of mixture components

w

a vector with (initial) mixture weights

mu

a vector of (initial) mixture means (if p=1) or a K x p matrix with (initial) mixture means in rows (if p>1)

Sigma

a vector of (initial) mixture variances (if p=1) or a K*p x p matrix with (initial) mixture covariance matrices put below each other

p

dimension of the data

n

number of observations

initr

a vector of initial component allocations to be checked for consistency. If not given then reasonable initials are generated.

Value

A vector with reasonable initial component allocations.

Author(s)

See Also


mixAK

Multivariate Normal Mixture Models and Mixtures of Generalized Linear Mixed Models Including Model Based Clustering

v5.3
GPL (>= 3)
Authors
Arnošt Komárek <arnost.komarek@mff.cuni.cz>
Initial release
2020-06-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.