Hi Andrew,
Here's the code:
- Code: Select all
Design
; alts(A) = alt1*, alt2*, alt3*
; alts(B) = alt1*, alt2*, alt3*
; alts(C) = alt1*, alt2*, alt3*
; rows = 16
; block = 4
; bseed=179424673
; rseed=179424673
; eff = 0.33* B(mnl,d) + 0.66*C(mnl,d,median)
; alg = swap(reset=100, resetinc=100), stop=total(14400 secs)), mfederov
? ;bdraws=gauss(3)
; bdraws=sobol(5000)
;model(A):
U(alt1) = BC[0.35]*COW[0,0.1,1.5,3] + BMC[1]*MC[0,1] + BW[0.17]*WAGE[0,0.8,2,6] + BR[1]*ROAD[0,1] + BT[-0.42]*TIME[0,0.1,0.8,2.4] + BL[-0.4]*LL[0,0.1,0.2,0.4]
+ BTL[0]*TIME*LL/
U(alt2) = BC*COW + BMC*MC + BW*WAGE + BR*ROAD + BT*TIME + BL*LL + BTL*TIME*LL/
U(alt3) = BC*COW + BMC*MC + BW*WAGE + BR*ROAD + BT*TIME + BL*LL + BTL*TIME*LL
;model(B):
U(alt1) = BC[0]*COW[0,0.1,1.5,3] + BMC[0]*MC[0,1] + BW[0]*WAGE[0,0.8,2,6] + BR[0]*ROAD[0,1] + BT[0]*TIME[0,0.1,0.8,2.4] + BL[0]*LL[0,0.1,0.2,0.4] + BTL[0]*TIME*LL/
U(alt2) = BC*COW + BMC*MC + BW*WAGE + BR*ROAD + BT*TIME + BL*LL + BTL*TIME*LL/
U(alt3) = BC*COW + BMC*MC + BW*WAGE + BR*ROAD + BT*TIME + BL*LL + BTL*TIME*LL
;model(C):
U(alt1) = BC[(n,0.35,0.18)]*COW[0,0.1,1.5,3] + BMC[(n,1,0.5)]*MC[0,1] + BW[(n,0.17,0.9)]*WAGE[0,0.8,2,6] + BR[(n,1,0.5)]*ROAD[0,1] + BT[(n,-0.42,0.21)]*TIME[0,0.1,0.8,2.4] + BL[(n,-0.4,0.2)]*LL[0,0.1,0.2,0.4]
+ BTL[(n,-0.96,0.48)]*TIME*LL/
U(alt2) = BC*COW + BMC*MC + BW*WAGE + BR*ROAD + BT*TIME + BL*LL + BTL*TIME*LL/
U(alt3) = BC*COW + BMC*MC + BW*WAGE + BR*ROAD + BT*TIME + BL*LL + BTL*TIME*LL
$
Basically what matters is model B and C. The target efficiency was calculated for MNL model with 0 priors (model B; weight 33%) and MNL model with all the parameters normally distributed (model C; weight 66%) with priors of means specified as 1/maximum variable value (with the expected sign) and priors of standard deviation specified as 0.5 of the prior of mean. This was in order to assume all variables equally important for respondents and not allow any of the attributes to dominate the others, as we had no clue at this point.
I tried it with sobol, halton and mfederov bdraws. You can of course reduce the no. of bdraws and the time after which the algorithm is supposed to change to mfederov - the result is the same.
In the end I used the swap algorithm only because I did not like unbalanced number of the attributes in the design mfederov generated (for some attributes there were many highest levels of the attributes used and very few or none middle levels; perhaps if I dummy coded them it would help but it's for the pilot and a sample will be very small anyway).
One other funny thing I've noticed with this - I had a few optimizations run simultaneously for a few days with different bdraws - gauss(3), gauss(5), sobol(5000) and halton(5000). They all used the SWAP. After that time I saved the best design of each optimization and compared them with ;eval. It turned out that depending on what bdraws I specified for evaluation (I used as many as 50000 draws or gauss with 7 abscissas, so a lot) different designs had the lowest d-error. Interestingly the ranking according to sobol and halton was pretty consistent, gauss was different. I suppose that if there are many draws - the kind of draws should not influence d-error and ranking of the designs. That's why I found this result very strange. Any ideas what might be going wrong?
I can send you the designs for comparisons if you like.
Thank you very much in advance for any help/suggestions on this.
Mikolaj