Page 1 of 1

Reversing order of dummy levels so Level=1 is the base

PostPosted: Fri Dec 01, 2017 12:00 pm
by Kreg
Greetings all,

I’m working on a design for a CE with two options and a SQ (Alt=3), with each option having the same five attributes. Most of the attributes are ordinal and follow a format such as 1=Low diversity, 2=Medium diversity, 3=High diversity.

I want Level=1 to serve as the base, as I find that to be intuitive. I understand Ngene treats the "furthest to the right" level as the base, so I specify my set of dummy variable levels as 3, 2, 1. Assume Level=1 is the base, my prior for Level=2 is in the range from 0 to 0.25, and my prior for Level=3 is in the range from 0 to 0.5. In practice, this is for a pilot test with no apparent equivalents in the literature, so my priors essentially reflect a coarse expectation for coefficients: Level 3 > Level 2 > 0. I specify:

b2.dummy[(u,0,.5)|(u,0,.25)] * Div[3,2,1]

I believe this is correct syntax from what I've read, but I don't recall it being treated explicitly in the manual, and my search of "dummy base level" in this forum generated an error message. Thus, I welcome any feedback -- is this the way to have Ngene treat Level=1 as the base? I've pasted the full syntax below.

Thank you very much in advance for any feedback on this.

Kreg


design
;alts = 1*, 2*, 3
;rows = 12
;block = 3
;eff=(rppanel, d)
;rep=100
;rdraws=halton(100)
;model:
U(1)= b0[(u,0,1)] + b1.dummy[(u,0,1)] * Qual[2,1] + b2.dummy[(u,0,.5)|(u,0,.25)] * Div[3,2,1] + b3.dummy[(u,0,.5)|(u,0,.25)] * Land[3,2,1] +
b4.dummy[(u,0,.5)|(u,0,.25)] * Facil[3,2,1] + b5[u,-0.1,0] * Fee[0,2,5,10]/
U(2)= b0 + b1 * Qual + b2 * Div + b3 * Land + b4 * Facil + b5 * Fee
$

Re: Reversing order of dummy levels so Level=1 is the base

PostPosted: Sat Dec 02, 2017 10:45 am
by Michiel Bliemer
Yes that is correct. Or you can specify it how I typically do it in ascending order by only putting the base level at the end:

b2.dummy[(u,0,.25)|(u,0,.5)] * Div[2,3,1]

It is all the same, so you can choose whichever specification you prefer.

I made some changes to your syntax. I believe you want to do Bayesian priors, not random parameters, so I changed the random parameter you specified for b5 to a Bayesian prior and I changed rppanel to mnl (it is almost impossible to optimise for rppanel, it is best to optimise for mnl and evaluate under rppanel). I also changed your alternative names as I am not sure Ngene likes it if they do not have a proper name (instead of 1,2,3). Further, I changed to gaussian draws and you may want to consider increasing the number of rows as 12 is not a lot for estimating so many parameters (especially if you want to estimate mixed logit models).

design
;alts = alt1*, alt2*, alt3
;rows = 24
;block = 6
;eff=(mnl, d)
;bdraws = gauss(3)
;model:
U(alt1)= b0[(u,0,1)] + b1.dummy[(u,0,1)] * Qual[2,1] + b2.dummy[(u,0,.5)|(u,0,.25)] * Div[3,2,1] + b3.dummy[(u,0,.5)|(u,0,.25)] * Land[3,2,1] +
b4.dummy[(u,0,.5)|(u,0,.25)] * Facil[3,2,1] + b5[(u,-0.1,0)] * Fee[0,2,5,10]/
U(alt2)= b0 + b1 * Qual + b2 * Div + b3 * Land + b4 * Facil + b5 * Fee
$

Re: Reversing order of dummy levels so Level=1 is the base

PostPosted: Mon Dec 04, 2017 10:15 am
by Kreg
Thank you so much for your feedback on this.

Kreg

Re: Reversing order of dummy levels so Level=1 is the base

PostPosted: Tue Dec 05, 2017 3:52 am
by Kreg
Quick follow up question. I'm re-running Ngene with the revised syntax. I receive the following message.

Warning: 59049 Gauss draws were created. The search may be very slow, and if this number is very high, the results may be unpredictable. You may wish to reduce the abscissa(s), or the number of Bayesian priors.

I'm not worried about speed, as the evaluations are proceeding fairly quickly. Can you clarify what "results may be unpredictable" means? Specifically, if the large number of Gauss draws may lead to inaccurate results, should I use a different approach -- such as reducing abscissas from 3 to 2 or using an alternative to Gaussian draws?

Thanks again for any feedback on this.

Kreg

PS -- on page 112 of the Ngene 1.1.2 manual, the following wording appears: "this would yield 55 = 3,125 Gaussian draws". Should that be "5^5"?