by samantha » Fri Feb 08, 2019 3:08 pm
Hi again,
I very much appreciated all of your help with my pilot study! I have completed the pilot, and it was suggested by my colleagues that I analyze the attributes as both linear (continuous) variables and as categorical. I therefore dummy coded all my attributes to code the full DCE design. I am trying to code one design using the model average approach as I will analyze the data both ways.
I came up with the following:
Design
;alts(model1) = A1*, B2*
;alts(model2) = A1*, B2*
;rows = 24
;eff = model1(mnl,d,mean) + model2(mnl,d,mean)
;rdraws = gauss(3)
;bdraws = gauss(3)
;rep = 1000
;block = 2
;model(model1):
U(A1) = b1[(n,-0.1278,0.2356)] * A[8,4,2] + b2.dummy[(n,0.6077,0.7753)] * B[0,1] + b3[(n,-0.249,0.5278)] * C[18,12,6] + b4[(n,-0.0429,0.0880)] * D[50,35,20] + b5[(n,-0.1837,0.4864)] * E[20,15,10]/
U(B2) = b1 * A + b2 * B + b3 * C + b4 * D + b5 * E
;model(model2):
U(A1) = b1.dummy[(n,-0.9106,1.8188)|(n,-0.2808,1.5451)] * A[8,4,2] + b2.dummy[(n,0.6077,0.7753)] * B[0,1] + b3.dummy[(n,-3.0724,7.4707)|(n,-1.3685,3.3384)] * C[18,12,6] + b4.dummy[(n,-1.2882,2.9468)|(n,-0.6827,1.9131)] * D[50,35,20] + b5.dummy[(n,-1.8936,5.7179)|(n,-1.1191,2.8336)] * E[20,15,10]/
U(B2) = b1 * A + b2 * B + b3 * C + b4 * D + b5 * E
$
This works for mnl, but when I evaluate the design with rppanel it works for model 1 (where all parameters are random), but Ngene does not stop running or solve the design for rppanel for model 2 (not sure how to code dummy variables as random so I guessed):
Design
;alts = A1*, B2*
;rows = 24
;eff = (rppanel,d)
;block = 2
;eval = Average design 1.ngd
;model:
U(A1) = b1.dummy[n,-0.9106,1.8188|n,-0.2808,1.5451] * A[8,4,2] + b2.dummy[n,0.6077,0.7753] * B[0,1] + b3.dummy[n,-3.0724,7.4707|n,-1.3685,3.3384] * C[18,12,6] + b4.dummy[n,-1.2882,2.9468|n,-0.6827,1.9131] * D[50,35,20] + b5.dummy[n,-1.8936,5.7179|n,-1.1191,2.8336] * E[20,15,10]/
U(B2) = b1 * A + b2 * B + b3 * C + b4 * D + b5 * E
$
I will want to test for heterogeneous preferences, is it possible to write dummy or categorical variables as random variables?
Thanks,
Samantha