The mixture probabilities given in weights
must sum to one. As such for \(K\) mixture components, only \(K-1\) of the elements of weights
can be estimated. The mixture probabilities in weights
should be a column vector (i.e., a \(K\) by 1 matrix, or algebra with a \(K\) by 1 result).
For ease of use the raw free parameters of weights can be rescaled by OpenMx according to the scale
argument. When scale
is set to "softmax" the softmax function is applied to the weights. The softmax function is also sometimes called multinomial logistic regression. Softmax exponentiates each element in a vector and then divides each element by the sum of the exponentiated elements. In equation form the softmax function is
$$ softmax(x_i) = \frac{e^{x_i}}{\sum_{k=1}^{K} } e^{x_k} $$
When using the softmax scaling no free parameter bounds or constraints are needed. However, for model identification, one element of the weights vector must be fixed. If the softmax scaling is used, then the usual choice for the fixed parameter value is zero. The latent class or mixture component that has its raw weight set to zero becomes the comparison against which other probabilities are evaluated.
When scale
is set to "sum" then each element of the weights matrix is internally divided by its sum. When using the sum scaling, the same model identification requirements are present. In particular, one element of the weights must be fixed. The typical value to fix this value at for sum scaling is one. Additionally when using sum scaling, all free parameters in the weights must have lower bounds of zero. In equation form the sum scaling does the following:
$$ sumscale(x_i) = \frac{x_i}{\sum_{k=1}^{K} } x_k $$
When scale
is set to "none" then no re-scaling is done. The weights are left "as is". This can be dangerous and is not recommended for novice users. However, some advanced users may find no scaling to be advantageous for certain applications (e.g., they are providing their own scaling), and thus it is provided as an option.
Parameters are estimated in the given scale. To obtain the weights
column vector, examine the expectation's output
slot with for example yourModel$expectation$output
An extension of this expectation to a Hidden Markov model
is available with mxExpectationHiddenMarkov.
mxGenerateData is not implemented for this type of expectation.