Dummy coding and bayesian priors

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Dummy coding and bayesian priors

Postby Gilou » Wed Apr 20, 2016 7:45 pm

Hello all,
I have some issues about correctly specifying dummy coding for a Random parameters model, with either bayesian or fixed priors.

Without specifying the dummy coding, the basic of my design (for the case of bayesian priors) is the following :

Design
;alts(M1)=alt1*,alt2*,alt3*
;rows=16
;block=2
;eff=M1(rp,d)
;model(M1):U(alt1)=b1
+b2[n,(u,0.045,0.055),(u,0.0003,0.0005)]*marge[100,200,-100,0]
+b3[u,(u,-4.5,-3.5),(u,-2.5,-1.5)]*ravage[1,2,0]
+b4[n,(u,-1.5,-0.5),(u,0.045,0.55)]*modal[1,2,3,0]
+b5[n,(u,-0.11,-0.09),(u,0.0005,0.0015)]*pest[-20,-50,-100]/
U(alt2)=b1+b2*marge+b3*ravage+b4*modal+b5*pest
;cond: if(alt1.modal=3,alt1.pest=-100),
if(alt2.modal=3,alt2.pest=-100)
;rdraws=halton(180)
;bdraws=sobol(200)
$


Now I want to introduce dummy coding for the "modal" variable. I am thinking about three possible specifications.
- b4.dummy[n,-0.5,0.05|n,-1.5,0.05|n,-4,0.05]*modal[1,2,3,0]

- b4.dummy[(n,-0.5,0.05)|(n,-1.5,0.05)|(n,-4,0.05)]*modal[1,2,3,0]

- b4.dummy[n,(u,-0.65,-0.45),(u,0.045,0.55)|n,(u,-1.75,-1.25),(u,0.045,0.055)|n,(u,-4.5,-3.5),(u,0.045,0.55)]*modal[1,2,3,0]

I would say that the first two are identical for the model with fixed priors, but they give very different outputs.
In fact, the Ngene manual says that the second specification is the one for bayesian priors, but this is not really consistent with the standard specification for bayesian priors, which is the third specification here.

Could someone explain me the differences between these three specification please, and in which cases I have to use them ?

Thank you
Gilou
Gilou
 
Posts: 3
Joined: Tue Apr 12, 2016 6:37 pm

Re: Dummy coding and bayesian priors

Postby johnr » Thu Apr 21, 2016 6:31 am

Hi Gilou

The second is indeed for Bayesian priors, whilst the first is for local priors, however both assume fixed parameter specifications. In the third case, you are specifying Bayesian priors for random parameters. Also, in the efficiency command - ;eff=M1(rp,d) - because you haven't specified any moments such as mean or median, the program will calculate the Bayesian priors, but will optimise on the local.

John
johnr
 
Posts: 168
Joined: Fri Mar 13, 2009 7:15 am

Re: Dummy coding and bayesian priors

Postby Gilou » Thu Apr 21, 2016 6:30 pm

Hi John,
Thank you for this quick answer, it helps me a lot.
Gilou
Gilou
 
Posts: 3
Joined: Tue Apr 12, 2016 6:37 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 63 guests