Design based on recoded attributes?

This forum is for posts covering broader stated choice experimental design issues.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Design based on recoded attributes?

Postby max » Tue Oct 23, 2018 2:07 am

Hi everyone, I have just started using NGENE, and choice modeling in general, so forgive me if any of my questions make little sense. I had a look in previous threads but I don’t know enough about the software to identify the issue I am having, which makes a solution hard to find.

I am working with data from a pilot test which included a stated choice component in which each “scenario” consisted of 5 attributes that were varied across different levels. After the data collection I developed a two in NLOGIT that had good fit r2=.333, but in order to get a good fitting model I had to recode the attributes into binary variables (technically I effects coded them).
Now I want to use the coefficients and standard errors these models to produce a design in NGENE. However, when I try to run my syntax NGENE shuts down (in the sense of crashing before I see an error message).
Since I am new to both choice modeling and NGENE I would appreciate any help in specifying what my problem is. I have a few potential candidates, presented with most likely at the top of the list.
1. Some basic issue with my syntax
2. The fact that I split the variables up into binary variables
3. The effects coding of the dummy variables
4. The assumption of normality

Sorry that the code looks a bit messy. I havn’t learned the finer points of the syntax yet, model1 is a MNL model and model2 is a RPM if that matters:

Design
;alts(model1) = alt1*, alt2*, alt3*
;alts(model2) = alt1*, alt2*, alt3*
;rows = 18
;block = 3
;eff = model1(mnl,d,mean)
;rep = 1000
;rdraws = gauss(3)
;bdraws = gauss(3)
;alg = swap(stop = noimprov(10000 iterations))

;model(model1):
U(alt1) = I1[(n,0.089,0.324) * A[-1,0,1] +I2[(n,0.132,0.247)] * A[-1,0,1] +W1[(n,0.161,0.184)] * A[-1,0,1] +W2[(n,1.233,0.235)] * A[-1,0,1] +H1[(n,0.3659,0.251)] * A[-1,0,1] +H2[(n,0.652,0.227)] * A[-1,0,1] +C1[(n,0.453,0.293)] * A[-1,0,1] +C2[(n,0.085,0.337)] * A[-1,0,1] +C3[(n,0.526,0.365)] * A[-1,0,1] +C4[(n,0.601,0.434)] * A[-1,0,1] +F1[(n,0.408,0.319)] * A[-1,0,1] +F2[(n,0.056,0.282)] * A[-1,0,1] +F3[(n,0.321,0.305)] * A[-1,0,1] +F4[(n,0.019,0.274)] * A[-1,0,1] /

U(alt2) = I1[(n,0.089,0.324) * A[-1,0,1] +I2[(n,0.132,0.247)] * A[-1,0,1] +W1[(n,0.161,0.184)] * A[-1,0,1] +W2[(n,1.233,0.235)] * A[-1,0,1] +H1[(n,0.3659,0.251)] * A[-1,0,1] +H2[(n,0.652,0.227)] * A[-1,0,1] +C1[(n,0.453,0.293)] * A[-1,0,1] +C2[(n,0.085,0.337)] * A[-1,0,1] +C3[(n,0.526,0.365)] * A[-1,0,1] +C4[(n,0.601,0.434)] * A[-1,0,1] +F1[(n,0.408,0.319)] * A[-1,0,1] +F2[(n,0.056,0.282)] * A[-1,0,1] +F3[(n,0.321,0.305)] * A[-1,0,1] +F4[(n,0.019,0.274)] * A[-1,0,1] /

U(alt3) = I1[(n,0.089,0.324) * A[-1,0,1] +I2[(n,0.132,0.247)] * A[-1,0,1] +W1[(n,0.161,0.184)] * A[-1,0,1] +W2[(n,1.233,0.235)] * A[-1,0,1] +H1[(n,0.3659,0.251)] * A[-1,0,1] +H2[(n,0.652,0.227)] * A[-1,0,1] +C1[(n,0.453,0.293)] * A[-1,0,1] +C2[(n,0.085,0.337)] * A[-1,0,1] +C3[(n,0.526,0.365)] * A[-1,0,1] +C4[(n,0.601,0.434)] * A[-1,0,1] +F1[(n,0.408,0.319)] * A[-1,0,1] +F2[(n,0.056,0.282)] * A[-1,0,1] +F3[(n,0.321,0.305)] * A[-1,0,1] +F4[(n,0.019,0.274)] * A[-1,0,1]

;model(model2):
U(alt1) = I1[(n,0.316,0.264)] * A[-1,0,1] + I2[(n,0.541,0.303)] * A[-1,0,1] + W1[(n,1.509,0.354)] * A[-1,0,1] + W2[(n,1.757,0.496)] * A[-1,0,1] + H1[(n,0.263,0.257)] * A[-1,0,1] + H2[(n,-1.924,0.524)] * A[-1,0,1] + C1[(n,2.648,0.693)] * A[-1,0,1] + C2[(n,-0.675,0.467)] * A[-1,0,1] + C3[(n,-0.122,0.526)] * A[-1,0,1] + C4[(n,-0.815,0.55)] * A[-1,0,1] + F1[(n,-2.821,0.788)] * A[-1,0,1] + F2[(n,-0.324,0.443)] * A[-1,0,1] + F3[(n,1.114,0.467)] * A[-1,0,1] + F4[(n,2.976,0.718)] * A[-1,0,1]/

U(alt2) = I1[(n,0.316,0.264)] * A[-1,0,1] + I2[(n,0.541,0.303)] * A[-1,0,1] + W1[(n,1.509,0.354)] * A[-1,0,1] + W2[(n,1.757,0.496)] * A[-1,0,1] + H1[(n,0.263,0.257)] * A[-1,0,1] + H2[(n,-1.924,0.524)] * A[-1,0,1] + C1[(n,2.648,0.693)] * A[-1,0,1] + C2[(n,-0.675,0.467)] * A[-1,0,1] + C3[(n,-0.122,0.526)] * A[-1,0,1] + C4[(n,-0.815,0.55)] * A[-1,0,1] + F1[(n,-2.821,0.788)] * A[-1,0,1] + F2[(n,-0.324,0.443)] * A[-1,0,1] + F3[(n,1.114,0.467)] * A[-1,0,1] + F4[(n,2.976,0.718)] * A[-1,0,1]/

U(alt3) = I1[(n,0.316,0.264)] * A[-1,0,1] + I2[(n,0.541,0.303)] * A[-1,0,1] + W1[(n,1.509,0.354)] * A[-1,0,1] + W2[(n,1.757,0.496)] * A[-1,0,1] + H1[(n,0.263,0.257)] * A[-1,0,1] + H2[(n,-1.924,0.524)] * A[-1,0,1] + C1[(n,2.648,0.693)] * A[-1,0,1] + C2[(n,-0.675,0.467)] * A[-1,0,1] + C3[(n,-0.122,0.526)] * A[-1,0,1] + C4[(n,-0.815,0.55)] * A[-1,0,1] + F1[(n,-2.821,0.788)] * A[-1,0,1] + F2[(n,-0.324,0.443)] * A[-1,0,1] + F3[(n,1.114,0.467)] * A[-1,0,1] + F4[(n,2.976,0.718)] * A[-1,0,1]
$

Thanks,
Max
max
 
Posts: 2
Joined: Fri Oct 19, 2018 6:22 am

Re: Design based on recoded attributes?

Postby Michiel Bliemer » Tue Oct 23, 2018 8:48 am

Hi Max,

Effects coding does not work this way, one of the levels needs to be a reference level. The proper way to specify an effects coded variable in Ngene is something like:

U(alt1) = ... + b.effects[0.1|0.2|0.3] * attr[1,2,3,0] + ...

where the last level (0) is the reference level, and 0.1, 0.2, and 0.3 are the effects coded parameters for levels 1, 2, and 3, respectively.

Further, you are asking 3 abscissas for doing Gaussian draws for 14 Bayesian priors, this means 3^14 = 4,782,969 draws per design per model. In other words, it is not possible to optimise your design with so many Bayesian priors, you need to reduce the number of Bayesian priors and keep some of them fixed.

Please post any further questions regarding Ngene on the Ngene forum, the "stated choice experimental design" forum is for general questions not related to Ngene.

Best wishes,
Michiel
Michiel Bliemer
 
Posts: 598
Joined: Tue Mar 31, 2009 4:13 pm

Re: Design based on recoded attributes?

Postby max » Tue Oct 23, 2018 10:54 pm

Oh, I see. I'll have a look at the effects coding sheme for NGENE and adjust the draws.
Thank you!
max
 
Posts: 2
Joined: Fri Oct 19, 2018 6:22 am


Return to Stated choice experimental design

Who is online

Users browsing this forum: No registered users and 4 guests