In the newest version of the Gentle Intro, the mixture model example described on page 14.21 states the parameter values for the generating model were pi=0.40, p(piA)=0.70 and p(piB)=0.50. I constructed the DM shown on page 14.25 and examined the output. The real parameter estimates were as follows: pi-hat=0.582, p(piA)-hat=0.656 and p(piB)-hat=0.460. Obviously, it appears that the pi-hat estimate reported reflects (1-pi). Why is this? Am I correct to conclude that the first half of p-hat estimates (6 in this case) always corresponds to mixture A? Does how you code the mixture identifier column consisting of 6 1's, 6 0's, 6 1's and 6 0's that follows the common intercept column for p and c make a difference in interpreting p-hat estimates (i.e., changing the order from top to bottom to 6 0's, 6 1's, etc) ? I don't see how it would, but maybe I'm missing some subtle detail, or worse, a blatantly obvious mistake. Could this possibly be a typo in the new intro?
Thanks
Jared