Learn R Programming

SSLfmm (version 0.1.0)

pack_theta: Pack FMM Parameters into a Vector

Description

Packs mixture weights, means, and covariance(s) into a single numeric vector. Uses the last component as the baseline for mixture weights (g-1 logits stored).

Usage

pack_theta(pi_k, mu_k, Sigma, g, p, ncov = 1)

Value

Numeric vector with parameters packed.

Arguments

pi_k

Numeric vector of length g with mixture weights (positive, sum to 1).

mu_k

List of length g; each element a numeric vector of length p (component means).

Sigma

Covariance: if ncov = 1, a single p x p matrix; if ncov = 2, a list of g p x p matrices.

g

Integer: number of components.

p

Integer: dimension.

ncov

Integer: covariance structure; 1 for shared covariance, 2 for class-specific.