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.
estimation in WTP-space
Re: estimation in WTP-space
Just a quick follow-up question on the interpretation of the log-normally Distributed cost parameter; what does the delta-Method output tell? It tells that the actual cost parameter is approximately zero (as shown in the output script), but the very high Rob t-ratio provided by the deltMethod - what does that mean?
-
- Site Admin
- Posts: 998
- Joined: 24 Apr 2020, 16:29
Re: estimation in WTP-space
I wouldn't really look at the t-ratio in that case. It's clear that the original parameter is not well estimated, see the NaN for the classical standard error for cost_sig. But your cost coefficient here is clearly not different from zero
Re: estimation in WTP-space
Hi Stephane,stephanehess wrote: ↑18 Aug 2020, 10:37 Hi
there could be many reasons for this, and it's difficult to diagnose without seeing your outputs, and also how they compare to the model with Normals. A Normal distribution for cost of course makes no sense, so you're right to try negative Lognormals. One thing to consider is whether your starting values for the negative Lognormal are appropriate. I would advise starting cost_B_mu at something like -3 or even -5
Best wishes
Stephane
Following this discussion, would you recommend specifying vtts and b_cost using different distributions for time and cost in the WTP space.
For example, suppose I specify betta_fare as negative log-normal and vtts as normal,
Assuming the utility to be additive, Is it correct to specify the utility function for alternative 1 as,
V[["alt1"]] =... + betta_fare(vtts * TT_1 + cost_1)
-
- Site Admin
- Posts: 998
- Joined: 24 Apr 2020, 16:29
Re: estimation in WTP-space
Hi
to me, Normal does not make sense for VTT - see for example https://doi.org/10.1016/j.tra.2004.09.007 and https://doi.org/10.1016/j.trb.2016.11.002
But if you use two lognormals, then there is no need for wtp space as the results in preference space will be the same
Stephane
to me, Normal does not make sense for VTT - see for example https://doi.org/10.1016/j.tra.2004.09.007 and https://doi.org/10.1016/j.trb.2016.11.002
But if you use two lognormals, then there is no need for wtp space as the results in preference space will be the same
Stephane
Re: estimation in WTP-space
Thanks and happy holidays.
Regards
Masimba
Regards
Masimba
Re: estimation in WTP-space
Good day, David and Stephane,
I hope you're all doing well.
I am estimating a mixed logit for a public transport mode choice study with 3-time components, fare, and seating arrangement as variables. Like you advised the last time regarding how it doesn't make sense to assume Normal distribution for fare and time components, I tried to specify as lognormal and log uniform distribution and my LL keeps getting worse as I increase the number of draws, which would mean that I am estimating the wrong model. However, normal & uniform specifications seem to work just fine in that context, and my estimates for the fare:
Normal distribution
mean = -0.11153 (-13.32228)
sigma = 0.06084 (12.3186)
a = -0.006285(-0.9827)
b = -0.218420(-11.2865)
The uniform seems to be behaviourally sound. My question is regarding the normal distribution; I have students in my data who I assume might not be sensitive to fare, would you advise allowing continuous distribution within a group. For instance,
betta_fare_student follows N(b_fare_student_mean, b_fare_student_sigma).
I seem not to find literature on that type of specification besides latent class models.
Thanks and regards
Masimba.
I hope you're all doing well.
I am estimating a mixed logit for a public transport mode choice study with 3-time components, fare, and seating arrangement as variables. Like you advised the last time regarding how it doesn't make sense to assume Normal distribution for fare and time components, I tried to specify as lognormal and log uniform distribution and my LL keeps getting worse as I increase the number of draws, which would mean that I am estimating the wrong model. However, normal & uniform specifications seem to work just fine in that context, and my estimates for the fare:
Normal distribution
mean = -0.11153 (-13.32228)
sigma = 0.06084 (12.3186)
- 3.3% non-zero probability of positive coefficient
a = -0.006285(-0.9827)
b = -0.218420(-11.2865)
The uniform seems to be behaviourally sound. My question is regarding the normal distribution; I have students in my data who I assume might not be sensitive to fare, would you advise allowing continuous distribution within a group. For instance,
betta_fare_student follows N(b_fare_student_mean, b_fare_student_sigma).
I seem not to find literature on that type of specification besides latent class models.
Thanks and regards
Masimba.
-
- Site Admin
- Posts: 998
- Joined: 24 Apr 2020, 16:29
Re: estimation in WTP-space
Hi
you say "my LL keeps getting worse as I increase the number of draws, which would mean that I am estimating the wrong model". Why do you think that means you are estimating the wrong model? As explained in the frequently asked questions, your LL will stabilise once you use a large enough number of draws. How many are you using?
Stephane
you say "my LL keeps getting worse as I increase the number of draws, which would mean that I am estimating the wrong model". Why do you think that means you are estimating the wrong model? As explained in the frequently asked questions, your LL will stabilise once you use a large enough number of draws. How many are you using?
Stephane
Re: estimation in WTP-space
I started with 200,500 then 1000
LL(note) : -3172.792
LL(200) : -1540.384
LL(500) : -1541.772
LL(1000) : -1542.743
LL(note) : -3172.792
LL(200) : -1541.001
LL(500) : -1544.171
Code: Select all
LOGNORMAL
LL(200) : -1540.384
LL(500) : -1541.772
LL(1000) : -1542.743
Code: Select all
LOGUNIFORM
LL(200) : -1541.001
LL(500) : -1544.171
-
- Site Admin
- Posts: 998
- Joined: 24 Apr 2020, 16:29
Re: estimation in WTP-space
Hi
okay, so where exactly is the issue? These are still fluctuating, which is quite normal
Stephane
okay, so where exactly is the issue? These are still fluctuating, which is quite normal
Stephane
Re: estimation in WTP-space
Thank you
I thought the LL should have improved when I used 1000 draws from 500.
Let men keep on trying with more draws.
Regards
Masimba
I thought the LL should have improved when I used 1000 draws from 500.
Let men keep on trying with more draws.
Regards
Masimba