Efficient Bayesian design - too long to run

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Efficient Bayesian design - too long to run

Postby dce.farmers » Fri Apr 05, 2024 2:04 am

Dear Ngene users,

I am running the code below and Ngene is taking a long time to find a design. It only found one design with undefined D error after a few minutes and then it still runs without suggesting other designs.
Am I doing something wrong in my code? Should I not run this code through a mfederov algorithm maybe? What should I change?

Code: Select all
design
;alts = alt1*, alt2*, alt3
;rows = 24
;eff = (mnl,d, mean)
;bdraws = gauss(2)
;block = 4
;alg = mfederov
;reject:
alt2.cost=60000 and alt2.plantation=2,
alt2.cost=60000 and alt2.plantation=3,
alt1.cost=60000 and alt1.plantation=2,
alt1.cost=60000 and alt1.plantation=3
;model:
U(alt1)= b1.dummy[(n, 0.245, 0.290)|(n,0.476, 0.274)]*support[2,3,1] ? 1= none, 2=personalized, 3=collective
                     + b2.dummy[(n,1.283,3.593)|(n,-0.011,0.347)]*plantation[2,3,1]  ? 1=individual (base), 2= collective autonomous, 3=collective coop                 
                     + b3[(n,-0.251,0.349)]*cost[45000,50000,55000,60000](5-7,5-7,5-7,5-7)
                     + b4.dummy[(n,-0.781, 0.264)|(n,-0.658,0.281)]*spraying[2,3,1]
                     + b5.dummy[(n,0.373,0.217)]*suivi[2,1]   
                     + b6[(n,-0.229,0.704)]*cost*plantation.dummy[2] /
U(alt2)= b1*support
         + b2*plantation
         + b3*cost
         + b4*spraying
         + b5*suivi
         + b6*cost*plantation.dummy[2] /

U(alt3)= b0[(n,-2.156,1.940)]
$




Thanks in advance for the help!

Best,

\G
dce.farmers
 
Posts: 14
Joined: Tue Dec 19, 2023 1:27 am

Re: Efficient Bayesian design - too long to run

Postby Michiel Bliemer » Sun Apr 07, 2024 4:23 am

The issue is your priors. Your chosen priors result in choice tasks where the opt-out is chosen by 100% of the people, have a look at the probabilities in the design that Ngene generated with undefined D-error.

Looking at your priors, the value for b3 seems way off, you cannot have a prior of -0.251 if your cost levels are 45000 to 60000 as it makes the cost attribute completely dominant. Please make sure that you use exactly the same attribute levels in your design as you use in model estimation.

Michiel
Michiel Bliemer
 
Posts: 1877
Joined: Tue Mar 31, 2009 4:13 pm

Re: Efficient Bayesian design - too long to run

Postby dce.farmers » Mon Apr 08, 2024 1:28 am

Hi Michiel,

These are not chosen priors but the priors I obtained from my pilot test on 25 respondents.

Here are below the results I get with the constant being the one for the status quo/alt3 . However, what might be an issue is the way the data is coded for my 3rd alternative which is a status quo. I set all levels to be 0 for the third alternative (including for the cost attribute) which I should not do maybe?
I am a bit unsure how the levels of my third alternative should be coded in the data. In my DCE, respondents were informed that, if they chose the status quo, they did not have to incur a cost as this meant choosing to not adopt a certain technology and thefore not getting any support etc. Am I right then that I should code the levels of my status quo as all being zero ?
If the fact that all my levels for my third alternative are 0 is not the problem, I do not really know what to do with my code in Ngene because these are the priors I get. I double checked and in my data when I estimate such model, the possible values for my cost variable are 0 (only for the status quo!), 45 000, 50 000, 55000 and 60 000.

Best,
\G

-----------------------------------------------------------------------------
Discrete choice (multinomial logit) model
Dependent variable Choice
Log likelihood function -143.37839
Estimation based on N = 150, K = 10
Inf.Cr.AIC = 306.8 AIC/N = 2.045
---------------------------------------
Log likelihood R-sqrd R2Adj
Constants only -153.8090 .0678 .0357
Note: R-sqrd = 1 - logL/Logl(constants)
Warning: Model does not contain a full
set of ASCs. R-sqrd is problematic. Use
model setup with ;RHS=one to get LogL0.
---------------------------------------
Response data are given as ind. choices
Number of obs.= 150, skipped 0 obs
--------+--------------------------------------------------------------------
| Standard Prob. 95% Confidence
CHOICE| Coefficient Error z |z|>Z* Interval
--------+--------------------------------------------------------------------
Constant| -2.15633 1.94088 -1.11 .2666 -5.96038 1.64772
SUPPINDI| .24568 .29068 .85 .3980 -.32404 .81540
SUPPCOL| .47685* .27420 1.74 .0820 -.06058 1.01428
TVXINDGP| 1.28301 3.59360 .36 .7211 -5.76032 8.32635
TVXCOOP| -.01094 .34721 -.03 .9749 -.69146 .66957
COST|-.25181D-04 .3490D-04 -.72 .4705 -.93576D-04 .43214D-04
PULVINGP| -.78189*** .26400 -2.96 .0031 -1.29932 -.26446
PULVCOOP| -.65822** .28113 -2.34 .0192 -1.20923 -.10722
TECHCOLL| .37381* .21773 1.72 .0860 -.05293 .80055
COST_TVI|-.22903D-04 .7049D-04 -.32 .7452 -.16105D-03 .11525D-03
--------+--------------------------------------------------------------------
nnnnn.D-xx or D+xx => multiply by 10 to -xx or +xx.
***, **, * ==> Significance at 1%, 5%, 10% level.
Model was estimated on Apr 07, 2024 at 04:49:53 PM
-----------------------------------------------------------------------------
dce.farmers
 
Posts: 14
Joined: Tue Dec 19, 2023 1:27 am

Re: Efficient Bayesian design - too long to run

Postby Michiel Bliemer » Mon Apr 08, 2024 6:56 am

See my response by email.
Michiel Bliemer
 
Posts: 1877
Joined: Tue Mar 31, 2009 4:13 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 4 guests

cron