by Michiel Bliemer » Wed Apr 16, 2025 7:36 am
1. The LAST level is the base/reference level for dummy coding. I usually use 0 or 1 as the base level, so I usually write [2,3,1] when dummy coding, but it is perfectly fine to write [1,2,3] and use level 3 as the base level. When you use uninformative priors with - or +, then the order does not matter, it simply looks at the value of the level itself. So b1.dummy[+] * X[1,2,3] states that larger levels are more preferred. So also in b1.dummy[+] * X[2,3,1] level 3 would be most preferred and level 1 least preferred. When you use informative priors, the order of the levels DOES matter because they have to match the priors. So b1.dummy[0.01|0.02] * X[2,3,1], whereby level 3 is the base/reference level and level 1 is least preferred and level 3 is most preferred, would be equivalent in describing behaviour as b1.dummy[-0.02|-0.01] * X[1,2,3], where again level 3 is most preferred and level 1 is least preferred.
2. Please refer to Chapter 6 in the Ngene manual, which explains how to use constraints:
[url]files.choice-metrics.com/NgeneManual.pdf[/url]
If you are using the default swapping algorithm, you could use something like:
;cond:
if(A.TS = 1, A.WL = [2,3]),
if(A.TS = 3, A.WL = [1,2]),
if(B.TS = 1, B.WL = [2,3]),
if(B.TS = 3, B.WL = [1,2])
Note that you need to be careful linking levels of two dummy coded attributes together, e.g. if(A.TS = 2, A.WL = 2), because this could cause perfect correlations between the attribute levels and result in multicollinearity and an unidentified model (i.e., a model that cannot be estimated). This could possibly occur no change in TS always goes with no change in WL. If such levels are linked, they need to be taken out of the dummy coding and put in a single variable as they always move together and you will need to consider model identifiability and carefully think about your utility functions. This is not something that I can easily help with because it is study specific and sometimes requires quite a bit of time. Ngene will tell you when a model is not identified because it will generate a design with an Undefined D-error, or not generate a design at all. That would be an indication that your constraints are too strict and you need to reformulate your utility function and/or constraints.
Michiel