Angular parameters $\xi_1^{(i)}, \ldots, \xi_{k-1}^{(i)}$ and $\varpi_1^{(i)}, \ldots, \varpi_{k-2}^{(i)}$s are derived from $\tilde{\theta}_i$. There exists an unique solution in $\varpi_1^{(i)}, \ldots, \varpi_{k-2}^{(i)}$ while there are multiple solutions in $\xi^{(i)}$ due to the symmetry of $\mid\cos(\xi) \mid$ and $\mid\sin(\xi) \mid$. The output of $\xi_1^{(i)}, \ldots, \xi_{k-1}^{(i)}$ only includes angles on $[-\pi, \pi]$.
The label of components of $\theta_i$ (before the above transform) is defined by
$$\tau_i^*=\arg \min_{\tau \in \Im_k}\mid \mid \theta_i-\tau(\theta_{MAP}) \mid \mid.$$ The number of label switching occurrences is defined by the number of changes in $\tau^*$.
SM.MAP.MixReparametrized(estimate, xobs, alpha0, alpha)K.MixReparametrizeddata(faithful)
xobs=faithful[50:100,1]
#estimate=K.MixReparametrized(xobs,k=2,alpha0=0.5,alpha=0.5,Nsim=1e4)
#result=SM.MAP.MixReparametrized(estimate,xobs,alpha0=0.5,alpha=0.5)Run the code above in your browser using DataLab