Important: Read this before posting to this forum

  1. 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.
  2. 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
  3. Before asking a question on the forum, users are kindly requested to follow these steps:
    1. Check that the same issue has not already been addressed in the forum - there is a search tool.
    2. 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
    3. Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
    4. Make sure that R is using the latest official release of Apollo.
  4. If the above steps do not resolve the issue, then users should follow these steps when posting a question:
    1. provide full details on the issue, including the entire code and output, including any error messages
    2. posts will not immediately appear on the forum, but will be checked by a moderator first. We check the forum at least twice a week. It may thus take a couple of days for your post to appear and before we reply. There is no need to submit the post multiple times.

Mixed logit model in WTP space - WTP estimates and Delta method

Ask questions about post-estimation functions (e.g. prediction, conditionals, etc) or other processing of results.
Post Reply
nimslkg
Posts: 3
Joined: 25 May 2024, 00:04

Mixed logit model in WTP space - WTP estimates and Delta method

Post by nimslkg »

Dear Prof. Hess & Palma,

I estimated a Mixed logit model with normally distributed non-cost attributes and the cost with a negative log-normal distribution in WTP space. I first estimated an MNL model in preference space and used MNL parameters as starting values for the mixed logit model.

Here is the output:

Code: Select all

Model run by nimsl using Apollo 0.3.3 on R 4.3.1 for Windows.
Please acknowledge the use of Apollo by citing Hess & Palma (2019)
  DOI 10.1016/j.jocm.2019.100170
  www.ApolloChoiceModelling.com

Model name                                  : MMNL_WTPspace
Model description                           : MMNL model1
Model run at                                : 2024-06-16 01:40:41.03767
Estimation method                           : bgw
Model diagnosis                             : Relative function convergence
Optimisation diagnosis                      : Maximum found
     hessian properties                     : Negative definite
     maximum eigenvalue                     : -0.337944
     reciprocal of condition number         : 3.19278e-05
Number of individuals                       : 457
Number of rows in database                  : 4570
Number of modelled outcomes                 : 4570

Number of cores used                        :  10 
Number of inter-individual draws            : 1000 (sobol)

LL(start)                                   : -2962.06
LL at equal shares, LL(0)                   : -3167.68
LL at observed shares, LL(C)                : -3071.15
LL(final)                                   : -2498.55
Rho-squared vs equal shares                  :  0.2112 
Adj.Rho-squared vs equal shares              :  0.204 
Rho-squared vs observed shares               :  0.1864 
Adj.Rho-squared vs observed shares           :  0.1793 
AIC                                         :  5043.11 
BIC                                         :  5190.94 

Estimated parameters                        : 23
Time taken (hh:mm:ss)                       :  01:11:42.35 
     pre-estimation                         :  00:01:58.86 
     estimation                             :  00:22:30.47 
          initial estimation                :  00:19:43.26 
          estimation after rescaling        :  00:02:47.21 
     post-estimation                        :  00:47:13.01 
Iterations                                  :  117  
     initial estimation                     :  99 
     estimation after rescaling             :  18 

Unconstrained optimisation.

Estimates:
                 Estimate        s.e.   t.rat.(0)    Rob.s.e. Rob.t.rat.(0)
mu_c             -0.40536     0.03816    -10.6232    0.009486      -42.7347
mu_dm           -14.09705     0.86117    -16.3697    0.280432      -50.2690
mu_dam          -25.21634     0.46471    -54.2625    0.106997     -235.6739
mu_rs            -3.01536     0.64694     -4.6610    0.139426      -21.6270
mu_fs           -19.81948     0.44811    -44.2293    0.124119     -159.6818
mu_ws            -7.30486     0.73289     -9.9673    0.177994      -41.0399
mu_ms           -17.59294     0.79972    -21.9988    0.178754      -98.4200
mu_md           -10.40502     0.95543    -10.8904    0.218507      -47.6188
mu_st            -1.55766     0.97695     -1.5944    0.291004       -5.3527
mu_vs             3.61041     0.89405      4.0383    0.290001       12.4497
mu_logcost       -4.10555     0.22190    -18.5022    0.226635      -18.1153
sigma_c           1.26807     0.02223     57.0547    0.006328      200.3752
sigma_dm          0.29919     0.64612      0.4631    0.138257        2.1640
sigma_dam       -25.45291     0.35423    -71.8534    0.093830     -271.2656
sigma_rs         -1.83377     0.45603     -4.0211    0.119856      -15.2998
sigma_fs         25.76983     0.37546     68.6354    0.091523      281.5682
sigma_ws         -3.43261     0.59285     -5.7900    0.117395      -29.2399
sigma_ms          4.71622     0.62605      7.5333    0.099400       47.4469
sigma_md          0.26842     0.36892      0.7276    0.048431        5.5424
sigma_st        -13.11152     0.69208    -18.9451    0.179352      -73.1051
sigma_vs         11.03608     0.47333     23.3156    0.127723       86.4063
sigma_logcost     3.69903     0.47294      7.8213    0.496675        7.4476
asc_1             0.04245     0.04569      0.9290    0.062197        0.6825
asc_2             0.00000          NA          NA          NA            NA
My questions are:

(1) - Can I just consider the mu_ coefficients as WTPs for respective attributes or do I need to draw distributions using mu_ & sigma_ parameters to get the expected values?

(2) - The signs of mu_ coefficients are the opposite of what I expected. Is it because of the negative log-normal distribution of the cost? So, when interpreting results, can I just consider the opposite signs of the mu_ coefficients produced in the output above?

(3) - I used the code below to get the mean and standard deviation of the cost and I am getting very high values for standard deviation and standard error. Are these high values indicating errors in my model?

Code: Select all

deltaMethod_settings <- list(operation="lognormal", parName1="mu_logcost", parName2="sigma_logcost")
apollo_deltaMethod(model, deltaMethod_settings)
Here is the output:

Code: Select all

Running Delta method computations
                                                Value Robust s.e.
Mean for exp(N( mu_logcost , sigma_logcost )    15.42       28.59
SD for exp(N( mu_logcost , sigma_logcost )   14433.12    53167.44
                                             Rob t-ratio (0)
Mean for exp(N( mu_logcost , sigma_logcost )          0.5395
SD for exp(N( mu_logcost , sigma_logcost )            0.2715
(4) Can I use the following codes to get the mean and standard deviation of cost instead of Delta method or should both ways produce the same results? I am getting very different results:

Code: Select all

b_cost = -exp(rnorm(N, mean=model$estimate["mu_logcost"], sd=model$estimate["sigma_logcost"]))
> mean(b_cost)
[1] -7.275067
> sd(b_cost)
[1] 93.44634
Any suggestion would be greatly appreciated.

Many thanks,
Manori
stephanehess
Site Admin
Posts: 1348
Joined: 24 Apr 2020, 16:29

Re: Mixed logit model in WTP space - WTP estimates and Delta method

Post by stephanehess »

Hi

if you're happy with the use of Normal distributions for WTP (which would imply that some people like and some dislike the attribute) then:

1) the mu will give you the mean wtp, the sigma the standard devaition
2) the sign of the mu has no relation to the use of the negative lognormal, but is simply to do with the MRS. So for a desirable attribute, the mu will be negative as it's the relative impact on utility of an increase in that attribute vs an increase in cost
3) high sds are often the case for lognormals

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
Post Reply