Page 1 of 1

Ngene crashes: "Something went unexpectedly wrong"

PostPosted: Wed Nov 08, 2023 7:04 am
by janak12jp
Hello!!
I am trying to generate DCEs based on D-efficient method in the Shared electric mobility adoption context. I am trying to analyse the adoption of new modes when they are introduced in the current transport system. I am considering random parameters in the utility specifications. However, it crashes every time and prompts that "Something went unexpectedly wrong. You may wish to email ChoiceMetrics at contact@choice-metrics.com for assistance."

The code is as below:
Code: Select all
Design
;alts = car, pt, ecar, ebike, escoot, sq
;rows = 36
;block = 4
;eff = (rppanel, d)
;rep = 500
;rdraws = halton(200)
;cond:
if(car.ivtt_car=8, car.tc_car=[0.5, 0.8]),
if(car.ivtt_car=16, car.tc_car=[0.8, 1.2]),
if(pt.ivtt_pt=9, pt.tc_pt=[1, 1.4]),
if(pt.ivtt_pt=18, pt.tc_pt=[1.4, 1.8]),
if(ecar.ivtt_ecar=8, ecar.tc_ecar=[3, 5]),
if(ecar.ivtt_ecar=16, ecar.tc_ecar=[5, 7]),
if(ebike.ivtt_ebike=7, ebike.tc_ebike=[2, 3.5]),
if(ebike.ivtt_ebike=15, ebike.tc_ebike=[3.5, 5]),
if(escoot.ivtt_escoot=8, escoot.tc_escoot=[2, 3.5]),
if(escoot.ivtt_escoot=16, escoot.tc_escoot=[3.5, 5]),
if(car.tc_car=0.5, ecar.tc_ecar=[3, 5]),
if(car.tc_car=1.2, ecar.tc_ecar=[5, 7]),
if(car.tc_car=0.5, ebike.tc_ebike=[2, 3.5]),
if(car.tc_car=1.2, ebike.tc_ebike=[3.5, 5]),
if(car.tc_car=0.5, escoot.tc_escoot=[2, 3.5]),
if(car.tc_car=1.2, escoot.tc_escoot=[3.5, 5]),
if(ecar.tc_ecar=3, ebike.tc_ebike=[2, 3.5]),
if(ecar.tc_ecar=7, ebike.tc_ebike=[3.5, 5]),
if(ecar.tc_ecar=3, escoot.tc_escoot=[2, 3.5]),
if(ecar.tc_ecar=7, escoot.tc_escoot=[3.5, 5]),
if(ebike.tc_ebike=2, escoot.tc_escoot=[2, 3.5]),
if(ebike.tc_ebike=5, escoot.tc_escoot=[3.5, 5]),
if(car.ivtt_car=8, ecar.ivtt_ecar=8),
if(car.ivtt_car=12, ecar.ivtt_ecar=12),
if(car.ivtt_car=16, ecar.ivtt_ecar=16),
if(car.ivtt_car=8, pt.ivtt_pt=[9, 14] AND ebike.ivtt_ebike=[7, 11] AND escoot.ivtt_escoot=[8, 12]),
if(car.ivtt_car=16, pt.ivtt_pt=[14, 18] AND ebike.ivtt_ebike=[11, 15] AND escoot.ivtt_escoot=[12, 16])   

;model:
U(car) = asc_car[n,-0.01,0.002] + b_ivtt_car[n,-0.03,0.009]*ivtt_car[8, 12, 16] + b_egt_car[n,-0.04,0.013]*egt_car[5, 8, 11] +
b_tc_car[n,-0.125,0.03]*tc_car[0.5, 0.8, 1.2] + b_pc[n,-0.25,0.05]*pc[0, 5, 10] + b_wthr_car[n,0.4,0.06]*wthr[-1, 1] +
b_tmp_car[n,0.02,0.006]*tmp[-1, 1]/

U(pt) = asc_pt[n,-0.5,0.08] + b_ivtt_pt[n,-0.05,0.01]*ivtt_pt[9, 14, 18] + b_act_pt[n,-0.06,0.014]*act_pt[2, 6, 10] +
b_egt_pt[n,-0.04,0.011]*egt_pt[2, 6, 10] + b_wt_pt[n,-0.02,0.008]*wt_pt[4, 7, 10] + b_tc_pt[n,-0.5,0.07]*tc_pt[1, 1.4, 1.8] +
b_wthr_pt[n,-0.06,0.013]*wthr[wthr] + b_tmp_pt[n,-0.005,0.001]*tmp[tmp]/

U(ecar) = asc_ecar[n,-1.8,0.45] + b_ivtt_ecar[n,-0.035,0.01]*ivtt_ecar[8, 12, 16] + b_act_ecar[n,-0.06,0.012]*act_ecar[5, 8, 11] +
b_egt_ecar[n,-0.05,0.012]*egt_ecar[5, 8, 11] + b_tc_ecar[n,-0.2,0.04]*tc_ecar[3, 5, 7] +
b_avail_ecar[n,0.008,0.0015]*avail_ecar[50, 75, 100] + b_wt_ecar[n,-0.05,0.011]*wt_ecar[5, 7] +
b_wthr_ecar[n,-0.02,0.008]*wthr[wthr] + b_tmp_ecar[n,-0.005,0.0015]*tmp[tmp]/

U(ebike) = asc_ebike[n,-0.95,0.3] + b_ivtt_ebike[n,-0.065,0.015]*ivtt_ebike[7, 11, 15] +
b_act_ebike[n,-0.05,0.01]*act_ebike[act_ecar] + b_egt_ebike[n,-0.04,0.01]*egt_ebike[egt_ecar] +
b_tc_ebike[n,-0.4,0.08]*tc_ebike[2, 3.5, 5] + b_avail_ebike[n,0.006,0.0015]*avail_ebike[50, 75, 100] +
b_wt_ebike[n,-0.04,0.009]*wt_ebike[3, 5] + b_wthr_ebike[n,-0.18,0.07]*wthr[wthr] + b_tmp_ebike[n,-0.08,0.03]*tmp[tmp]/

U(escoot) = asc_escoot[n,-1.35,0.3] + b_ivtt_escoot[n,-0.12,0.03]*ivtt_escoot[8, 12, 16] +
b_act_escoot[n,-0.05,0.01]*act_escoot[act_ecar] + b_egt_escoot[n,-0.04,0.008]*egt_escoot[egt_ecar] +
b_tc_escoot[n,-0.55,0.12]*tc_escoot[2, 3.5, 5] + b_avail_escoot[n,0.006,0.001]*avail_escoot[50, 75, 100] +
b_wt_escoot[n,-0.04,0.01]*wt_escoot[3, 5] + b_wthr_escoot[n,-0.18,0.03]*wthr[wthr] + b_tmp_escoot[n,-0.08,0.02]*tmp[tmp]

$


Please note that when I run the same specifications with MNL configuration, it runs and produces the results. But the design statistics seems irrational:
D error: 0.263301
A error: 1.204694
B estimate: 0.072454
S estimate: 224928.8386

Is this design too complicated to run? Please provide your insights on when went wrong here. Also, can you comment on the nos. of rows selected for this study (i.e., 36 here)?
Thank you in advance!

Re: Ngene crashes: "Something went unexpectedly wrong"

PostPosted: Wed Nov 08, 2023 9:25 am
by Michiel Bliemer
It is not possible to generate a design for a mixed logit (rppanel) model that is this complex and with so many rows. It is strongly recommended to optimise designs for the multinomial logit model and possibly evaluate for rppanel models. The benefit of optimising for rppanel is small while the computational complexity is enormous. The error mainly means that your computer cannot handle it, most likely because you run out of memory.

So please use ;eff = (mnl,d)

Did your priors come from a pilot study? If so, I recommend using Bayesian priors that are of the form (n,mean,stdev). Otherwise, please use local fixed priors.

Michiel

Re: Ngene crashes: "Something went unexpectedly wrong"

PostPosted: Wed Nov 08, 2023 8:12 pm
by janak12jp
Thank you very much for the prompt response.

Yes, I have tried with the MNL model specifications before as well. But can you please suggest on how to reduce S-estimate? Also, looking at the Ngene manual, I feel that B-estimate is on a lower side.

My current priors are based on the similar recent studies (not exactly the same though) and some minor adjustments according to study area. However, I plan to conduct the pilot study and revise the design thereafter.

Re: Ngene crashes: "Something went unexpectedly wrong"

PostPosted: Fri Nov 10, 2023 4:21 pm
by Michiel Bliemer
Regarding sample size estimates, please look at the Sp estimates, not the overall S-estimate since this is the maximum of the Sp estimates. Most Sp estimates indicate that the parameter can be estimated with a relatively small sample size. There are only a few parameters where the sample size will need to be very large. This is most often because the corresponding attribute does not contribute much to utility as indicated by the prior value you put in. If an attribute is not very relevant for making a choice, it cannot often not be estimated at a statistically significant level. Not all parameters may be statistically significant in model estimation, finding that certain attributes do not matter is also an important outcome of a study. For numerical attributes the sample size estimates can be reduced by increasing the level range. For categorical attributes it is generally difficult to reduce sample size estimates.

I generally do not worry about some parameters having a large sample size estimate. And they also heavily depends on the priors you put in. Priors after a pilot study may be quite different and therefore your sample size estimates may become quite different.

Michiel