Hello everybody.
I’m trying to introduce some noise in a choice model. A classical model would look like:
EV[t] = ... // some function of the data and parameters
choice[t] ~ categorical_logit(EV[t])
}
What i look for would be something like:
model{
mean_EV[t] = ... // some some function of the data and parameters
sigma_EV[t] = ... /// some function of the data and parameters
EV[t] ~ normal(mean_EV[t], sigma_EV[t]);
choice[t] ~ categorical_logit(EV[t])
}
This, however, does not work. I realise that the problem is that choice[t] (data) is observed, while EV[t] is not (it’s a latent variable), and therefore that the above “model” is inappropriate. But i cannot figure out how i should code that. The only work around i found was to generate noise in the transformed data block, and then inject it in the model. But this is not a good solution, because the noise is then “frozen” for the all sampling process (instead of changing at each sample iteration, as it should).
Any help would be great.
Regards,
thibault