Custom random parameters in HB
Posted: 28 Apr 2021, 19:44
Hi,
I'm estimating an HB mixed logit model. I'd like to specify some parameters to follow a distribution that is not one of the ones included in the RSGHB package. I'd specifically like to build a Bernoulli random variable.
In classical estimation, what I would do is define a Normal random error component with sd = 1 and mean to be estimated (let's call it random_err). Then, inside apollo_probabilities or apollo_randcoeff I would specify the Bernoulli variable as bern_param = 1 * (random_err > 0). The mean to be estimated controls the implied probability of the Bernoulli.
I tried to do this but random_err apparently "does not influence the log-likelihood of your model!" I realized the random_err object inside apollo_probabilities in HB estimation is one value, not a vector of draws. I guess that's the source of this issue.
Is there a way around this? Thanks!
I'm estimating an HB mixed logit model. I'd like to specify some parameters to follow a distribution that is not one of the ones included in the RSGHB package. I'd specifically like to build a Bernoulli random variable.
In classical estimation, what I would do is define a Normal random error component with sd = 1 and mean to be estimated (let's call it random_err). Then, inside apollo_probabilities or apollo_randcoeff I would specify the Bernoulli variable as bern_param = 1 * (random_err > 0). The mean to be estimated controls the implied probability of the Bernoulli.
I tried to do this but random_err apparently "does not influence the log-likelihood of your model!" I realized the random_err object inside apollo_probabilities in HB estimation is one value, not a vector of draws. I guess that's the source of this issue.
Is there a way around this? Thanks!