4 models- same design

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

4 models- same design

Postby suella_rodrigues » Thu Jul 09, 2020 11:55 pm

Dear Professor,

This is a continuation of a question I had asked you in the 'Stated preference forum' in regards to have 4 models but 1 design and you recommended the following:
If you want to create an efficient design using non-zero priors, then you can optimise a single design for 4 different models simultaneously in Ngene.

''
;eff = beef(mnl,d) + milk(mnl,d) + lamb(mnl,d) + wool(mnl,d)
;model(beef):
...
;model(milk):
...
etc.

You could specify identical models, but different priors for each product.
''

So as a first step for the pilot I used a homogeneous design with 0 priors. Using pilot data I estimated an mnl model and used bayesian priors on ngene (see code below)

Code: Select all
?consumer main

Design
;alts(beef) = alt1, alt2, neither
;alts(milk) = alt1, alt2, neither
;alts(lamb) = alt1, alt2, neither
;alts(wool) = alt1, alt2, neither
;rows = 18
;block = 3
;eff = beef(mnl,d,mean)+milk(mnl,d,mean)+lamb(mnl,d,mean)+wool(mnl,d,mean)
;bdraws = gauss(3)
;rep=250

;con
; model(beef):
?origin #, infectionlevel#, price#, welfare
U(alt1)    = b2.effects[(n,0.8,0.3)|(n,0.7,0.4)]*origin[0,1,2] + b3.effects[(n,1.8,0.4)|(n,0.8,0.5)|(n,0.2,0.5)]*infectionlevel[0,10,20,30]    + b4[(n,-0.19,0.04)]*price[0,1,2] + b5.effects[(n,1.9,0.4)|(n,1.07,0.5)]*welfare[0,1,2] /
U(alt2)    = b2*origin        + b3                        *infectionlevel + b4*price     +b5*welfare                     /
U(neither) = b6

; model(milk):
?origin #, infectionlevel#, price#, welfare
U(alt1)    = b2.effects[(n,1.2,0.3)|(n,0.9,0.5)]*origin[0,1,2] + b3.effects[(n,1.3,0.4)|(n,-0.12,0.5)|(n,0.1,0.5)]*infectionlevel[0,10,20,30]    + b4[(n,-1.6,0.4)]*price[0,1,2] + b5.effects[(n,0.9,0.3)|(n,0.3,05)]*welfare[0,1,2] /
U(alt2)    = b2*origin        + b3                        *infectionlevel + b4*price     +b5*welfare                     /
U(neither) = b6

; model(lamb):
?origin #, infectionlevel#, price#, welfare
U(alt1)    = b2.effects[(n,0.9,0.3)|(n,0.3,0.4)]*origin[0,1,2] + b3.effects[(n,1.8,0.4)|(n,0.7,0.5)|(n,0.6,0.5)]*infectionlevel[0,10,20,30]    + b4[(n,-0.23,0.05)]*price[0,1,2] + b5.effects[(n,1.2,0.3)|(n,0.5,0.4)]*welfare[0,1,2] /
U(alt2)    = b2*origin        + b3                        *infectionlevel + b4*price     +b5*welfare                     /
U(neither) = b6

; model(wool):
?origin #, infectionlevel#, price#, welfare
U(alt1)    = b2.effects[(n,0.9,0.4)|(n,0.6,0.5)]*origin[0,1,2] + b3.effects[(n,2.3,0.5)|(n,1.6,0.6)|(n,1.04,0.6)]*infectionlevel[0,10,20,30]    + b4[(n,-0.22,0.04)]*price[0,1,2] + b5.effects[(n,1.4,0.4)|(n,0.9,0.5)]*welfare[0,1,2] /
U(alt2)    = b2*origin        + b3                        *infectionlevel + b4*price     +b5*welfare                     /
U(neither) = b6
$


I was wondering if you could see if there are any obvious issues with this please?
The iterations run very slowly. I get d-errors for each of the 4 models. The mean Bayesian mnl d-error is 2.6.
b6 which is alt3 ''I will choose neither'' option defaults to 0 prior. Should I be specifying this?
I get probabilities like 0.8,0.008,0.009 which seems extremely wrong.

please advice.

Thank you

Maria
suella_rodrigues
 
Posts: 26
Joined: Mon Aug 19, 2019 12:01 am

Re: 4 models- same design

Postby Michiel Bliemer » Fri Jul 10, 2020 12:03 pm

A few things that I notice:

1. Many of your priors are very large, which means that certain attributes dominate the choice. For example, effects coded variable "welfare" in beef has three levels, and the partworths are as follows: for level 0, the average contribution is 1.9, and for level 2, the average contribution is -1.9-1.07 = -2.97. This means that the contribution to utility of attribute "welfare" ranges from -2.97 to 1.9, which is very large. Please check your parameter estimates as I do not think these are appropriate values.

2. For milk, you use an average prior of -1.6 for price, which you multiply with 0, 1, or 2. Did you perhaps forget to effects code the price attribute? Or are the prices $0, $1, and $2? If not, you need to use the actual price levels in your model.

3. If you use non-zero priors for the attributes, you cannot set the constant for the opt-out to zero as this will make the choice probabilities useless. Using your pilot study data, you need to estimate the constant b6 as well.

4. It runs very slow because you have 8 Bayesian priors and with gauss(3) this means 3^8 = 6561 draws for each of the 4 models, which means 26,244 D-error calculations per design. If you find this too slow, you could use ;bdraws = sobol(1000).

5. You do not need ;rep

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

Re: 4 models- same design

Postby suella_rodrigues » Tue Jul 14, 2020 4:07 am

1. The sample size for the pilot was around 26 respondents/product. Since the priors are too large, perhaps I should you zero priors? or can I scale down the estimates to at least reflect the signs (by for example dividing all coeff by 10)?

2. My bad! I was meant to enter actual prices!

3. Estimate for B6 is -1.76. If I go with zero priors for all, B6 can be set to zero.

Thank you Professor.

Maria
suella_rodrigues
 
Posts: 26
Joined: Mon Aug 19, 2019 12:01 am

Re: 4 models- same design

Postby Michiel Bliemer » Tue Jul 14, 2020 9:25 am

You should use either all coefficients to be zero (or near-zero like 0.00001 and -0.00001 in case you are checking for dominance, but currently you are not), or all priors coming from a pilot study. If you did your model estimation correctly and applied effects coding correctly, then you should be able to use the parameter estimates directly. To me, the coefficients seemed too large for effects coding, but if you are certain that they are correctly estimated then all is fine.

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

Re: 4 models- same design

Postby suella_rodrigues » Thu Jul 23, 2020 10:40 pm

Professor,

I get the following error when I enter prices for each of the models.
''one or more of the same attributes alt1.price alt1.price have different levels''

But because each model does have different prices, I decided to rename price for each of the models differently in order to go around this problem. See below:

Code: Select all
?consumer main

Design
;alts(beef) = alt1, alt2, neither
;alts(milk) = alt1, alt2, neither
;alts(lamb) = alt1, alt2, neither
;alts(wool) = alt1, alt2, neither
;rows = 18
;block = 3
;eff = beef(mnl,d,mean)+milk(mnl,d,mean)+lamb(mnl,d,mean)+wool(mnl,d,mean)
;bdraws = sobol(1000)
;



;con
; model(beef):
?origin #, infectionlevel#, price#, welfare
U(alt1)    = b2.effects[(n,-0.08,0.2)|(n,0.4,0.4)]*origin[0,1,2] + b3[(n,-0.008,0.01)]*infectionlevel[0,10,20,30]    + b4[(n,-0.1,0.04)]*priceb[11,14,17] + b5.effects[(n,0.8,0.2)|(n,0.8,0.5)]*welfare[0,1,2] /
U(alt2)    = b2*origin        + b3*infectionlevel + b4*priceb     +b5*welfare                     /
U(neither) = b6[-0.9]

; model(milk):
?origin #, infectionlevel#, price#, welfare
U(alt1)    = b2.effects[(n,0.3,0.1)|(n,0.6,0.4)]*origin[0,1,2] + b3[(n,-0.04,0.009)]*infectionlevel[0,10,20,30]    + b4[(n,-0.6,0.2)]*pricem[0.40,0.90,1.40] + b5.effects[(n,0.4,0.2)|(n,0.6,0.5)]*welfare[0,1,2] /
U(alt2)    = b2*origin        + b3*infectionlevel + b4*pricem     +b5*welfare                     /
U(neither) = b6[-2.7]

; model(lamb):
?origin #, infectionlevel#, price#, welfare
U(alt1)    = b2.effects[(n,0.2,0.2)|(n,0.7,0.4)]*origin[0,1,2] + b3[(n,-0.007,0.009)]*infectionlevel[0,10,20,30]    + b4[(n,-0.1,0.04)]*pricel[4.50,7.50,10.50] + b5.effects[(n,0.7,0.2)|(n,0.4,0.4)]*welfare[0,1,2] /
U(alt2)    = b2*origin        + b3*infectionlevel + b4*pricel     +b5*welfare                     /
U(neither) = b6[-0.4]

; model(wool):
?origin #, infectionlevel#, price#, welfare
U(alt1)    = b2.effects[(n,-0.02,0.2)|(n,-0.02,0.5)]*origin[0,1,2] + b3[(n,-0.03,0.01)]*infectionlevel[0,10,20,30]    + b4[(n,-0.07,0.06)]*pricew[7,9,11] + b5.effects[(n,0.5,0.2)|(n,0.3,0.6)]*welfare[0,1,2] /
U(alt2)    = b2*origin        + b3*infectionlevel + b4*pricew     +b5*welfare                     /
U(neither) = b6[-0.5]
$


Am I violating any assumptions by doing this?
The generated design ends up looking like this:

Choice situation alt1.origin alt1.infectionlevel alt1.priceb alt1.welfare alt2.origin alt2.infectionlevel alt2.priceb alt2.welfare alt1.pricem alt2.pricem alt1.pricel alt2.pricel alt1.pricew alt2.pricew Block

Can this still be considered single design optimised over 4 models? I ask this because the price levels have different combinations for each model so essentially I am creating different designs for each of the models?

Thank you

Maria
suella_rodrigues
 
Posts: 26
Joined: Mon Aug 19, 2019 12:01 am

Re: 4 models- same design

Postby Michiel Bliemer » Fri Jul 24, 2020 10:09 am

Creation if a single design does not work if the levels are different. However, one way around this is to model the price attributes as dummy or effects coded, that way they have identical levels but only different priors, which allows you to create a single design. Of course you can still estimate a model with a linear price attribute, you do not need to use dummy/effects coding in your final model, but for creating the design it would help.

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


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 11 guests

cron