Hi,

I am attempting to estimate a multinomial logistic model where the coefficients of the model depend on a latent class. Specifically, a given customer i can choose from j = 1, …, 4 brands including an “outside option”. The model assumes alternative dependent constants as well as generic coefficients for two covariates, quantity and price. Furthermore, these constants and coefficients differ based on the latent customer type; here, we assume a customer can be of three types, indexed by 1, 2, and 3.

I have included the code that also generates the data set. Please pardon my RStan code, as it is not

terribly elegant or efficient. My main concern is that I am not able to recover the simulated parameters of the model. The traceplots show evidence of label switching. I am unsure of how I can apply parameter ordering in this particular case. Any suggestions on how I could resolve this issue would be greatly appreciated!

Best,

Paul

Please see attached code:

script_HomoMNL_v3.R (5.2 KB)