Important: Read this before posting to this forum
- This forum is for questions related to the use of Apollo. We will answer some general choice modelling questions too, where appropriate, and time permitting. We cannot answer questions about how to estimate choice models with other software packages.
- There is a very detailed manual for Apollo available at http://www.ApolloChoiceModelling.com/manual.html. This contains detailed descriptions of the various Apollo functions, and numerous examples are available at http://www.ApolloChoiceModelling.com/examples.html. In addition, help files are available for all functions, using e.g. ?apollo_mnl
- Before asking a question on the forum, users are kindly requested to follow these steps:
- Check that the same issue has not already been addressed in the forum - there is a search tool.
- Ensure that the correct syntax has been used. For any function, detailed instructions are available directly in Apollo, e.g. by using ?apollo_mnl for apollo_mnl
- Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
- Make sure that R is using the latest official release of Apollo.
- Users can check which version they are running by entering packageVersion("apollo").
- Then check what is the latest full release (not development version) at http://www.ApolloChoiceModelling.com/code.html.
- To update to the latest official version, just enter install.packages("apollo"). To update to a development version, download the appropriate binary file from http://www.ApolloChoiceModelling.com/code.html, and install the package from file
- If the above steps do not resolve the issue, then users should follow these steps when posting a question:
- provide full details on the issue, including the entire code and output, including any error messages
- posts will not immediately appear on the forum, but will be checked by a moderator first. This may take a day or two at busy times. There is no need to submit the post multiple times.
How to define the start value of mu and sigma when adding random parameters to the mixed logit model?
-
- Site Admin
- Posts: 1232
- Joined: 24 Apr 2020, 16:29
Re: How to define the start value of mu and sigma when adding random parameters to the mixed logit model?
You could start the offset and range both at zero, or you could start the offset at MNL estimates
Re: How to define the start value of mu and sigma when adding random parameters to the mixed logit model?
Dear Stephane,
I run a hybrid choice model with subsdies attribute so I assume it should be always positive. Therefore I used the following positive log-normal transformation when creating random coeffcient:
randcoeff[["b_subsidies"]] = exp(mu_b_subsidies + sig_b_subsidies * draws_subsidies + b_subsidies_shift_lambda * randcoeff[["LV"]]).
The mu_subsidies that I have obtained was negative (-7.92) but significant. I run the deltaMethod to obtain the mean of parameter and the mean was positive and significant. Is that ok? I mean, is it ok if the estimated parameter is negative and then the mean of distribution is positive when the positive log-normal transformation was used? Or should the estimated parameter be also positive?
My second concern regards the calculation of mean WTA using delta method. In hybrid choice model for each level I obtain the mean of parameter and its SD but also the coefficient for interaction of a given level with latent variable. Should I just calculate two WTA (for mu and for interaction) and then sum it up?
For example, in the vector for expression of deltaMethod should I put:
deltaMethod_settings[['expression']] <- c(zero_till ="mu_b_zero_till/b_subsidies" , zero_till_interaction ="mu_b_zero_till_LV/b_subsidies")
The interpretation would then be, for example, that the farmers would accept to introduce zero-till practices for 100 EUR but for those with higher value of latent variable 70 EUR is enough (assuming that "first" WTA is -100 and for interaction is 30).
Best regards,
Łukasz
I run a hybrid choice model with subsdies attribute so I assume it should be always positive. Therefore I used the following positive log-normal transformation when creating random coeffcient:
randcoeff[["b_subsidies"]] = exp(mu_b_subsidies + sig_b_subsidies * draws_subsidies + b_subsidies_shift_lambda * randcoeff[["LV"]]).
The mu_subsidies that I have obtained was negative (-7.92) but significant. I run the deltaMethod to obtain the mean of parameter and the mean was positive and significant. Is that ok? I mean, is it ok if the estimated parameter is negative and then the mean of distribution is positive when the positive log-normal transformation was used? Or should the estimated parameter be also positive?
My second concern regards the calculation of mean WTA using delta method. In hybrid choice model for each level I obtain the mean of parameter and its SD but also the coefficient for interaction of a given level with latent variable. Should I just calculate two WTA (for mu and for interaction) and then sum it up?
For example, in the vector for expression of deltaMethod should I put:
deltaMethod_settings[['expression']] <- c(zero_till ="mu_b_zero_till/b_subsidies" , zero_till_interaction ="mu_b_zero_till_LV/b_subsidies")
The interpretation would then be, for example, that the farmers would accept to introduce zero-till practices for 100 EUR but for those with higher value of latent variable 70 EUR is enough (assuming that "first" WTA is -100 and for interaction is 30).
Best regards,
Łukasz
Last edited by lukasz on 28 Oct 2024, 18:02, edited 1 time in total.
-
- Site Admin
- Posts: 1232
- Joined: 24 Apr 2020, 16:29
Re: How to define the start value of mu and sigma when adding random parameters to the mixed logit model?
Łukasz
the mu_subsidies is the mean inside the exponential, so for the logarithm of beta. The fact that this is negative simply means that the median of b_subsidies is less than 1 in absolute value. The sign of b_subsidies is positive due to the exponential.
In relation to the second question, you cannot use the delta method function in this case as b_subsidies is random. You can work with apollo_unconditionals
Stephane
the mu_subsidies is the mean inside the exponential, so for the logarithm of beta. The fact that this is negative simply means that the median of b_subsidies is less than 1 in absolute value. The sign of b_subsidies is positive due to the exponential.
In relation to the second question, you cannot use the delta method function in this case as b_subsidies is random. You can work with apollo_unconditionals
Stephane