undefined D-error
Posted: Sun May 05, 2019 6:13 pm
Hello
I want to design a choice experiment about the trade-off households make concerning the amount of children and the quality of child-raising. My design includes the following attributes:
*ChildM: number of boys ranging from 1-12 with 6 levels (1,2,4,6,9,12)
*ChildF: number of girls (1,2,4,6,9,12)
*PrimM: the amount of boys sent to primary school (1,2,4,6,9,12)
*PrimF: the amount of girls sent to primary school (1,2,4,6,9,12)
*SecM: the amount of boys sent to secondary school (1,2,4,6,9,12)
*secF: the amount of girls sent to secondary school (1,2,4,6,9,12)
*TertM: the amount of boys sent to tertiary school (1,2,4,6,9,12)
*TertF: the amount of girls sent to tertiary school (1,2,4,6,9,12)
I have made different designs, once with the variables as categorical factors with dummy coding and once as numerical factors. For each design, I made a model with linear effects only, linear and 2-factor interaction effects, and linear, 2-factor interaction effects and quadratic effects. I want to choose the most efficient design, by comparing the D-errors, although for most of my designs (except the linear model with numerical factors) I get an undefined D-error.
This is my code for the linear model with categorical factors:
Design
;alts = alt1*, alt2*
? Each choice set has two options (and no opt-out option)
;rows = 48
;block = 4, minsum
? In total 48 choice sets are created that are blocked in 4 blocks of each 12 choice sets. So every respondent has to answer 12 choice sets.
;eff = (mnl, d)
? I generate a D-efficient design for a multinomial logit model
;alg = mfederov(candidates=10000000)
? Modified Federov algorithm: necessary for the requirements
?;require:
alt1.ChildM + alt1.ChildF <= 12,
alt1.ChildM + alt1.ChildF >= alt1.PrimM + alt1.PrimF,
alt1.PrimM + alt1.PrimF >= alt1.SecM + alt1.SecF,
alt1.SecM + alt1.SecF >= alt1.TertM + alt1.TertF,
alt2.ChildM + alt2.ChildF <= 12,
alt2.ChildM + alt2.ChildF >= alt2.PrimM + alt2.PrimF,
alt2.PrimM + alt2.PrimF >= alt2.SecM + alt2.SecF,
alt2.SecM + alt2.SecF >= alt2.TertM + alt2.TertF
? The number of boys and girls must be smaller than 12 + The number of children cannot be bigger than in the previous attribute
;model:
U(alt1) = b1.dummy[0.01|0.02|0.03|0.02|0.01] * ChildM[2,4,6,9,12,1]
+ b2.dummy[0.01|0.02|0.03|0.02|0.01] * ChildF[2,4,6,9,12,1]
+ b3.dummy[0.01|0.015|0.02|0.025|0.03] * PrimM[2,4,6,9,12,1]
+ b4.dummy[0.01|0.015|0.02|0.025|0.03] * PrimF[2,4,6,9,12,1]
+ b5.dummy[0.015|0.02|0.025|0.03|0.035] * SecM[2,4,6,9,12,1]
+ b6.dummy[0.015|0.02|0.025|0.03|0.035] * SecF[2,4,6,9,12,1]
+ b7.dummy[0.02|0.025|0.03|0.035|0.04] * TertM[2,4,6,9,12,1]
+ b8.dummy[0.02|0.025|0.03|0.035|0.04] * TertF[2,4,6,9,12,1] /
U(alt2) = b1 * ChildM
+ b2 * ChildF
+ b3 * PrimM
+ b4 * PrimF
+ b5 * SecM
+ b6 * SecF
+ b7 * TertM
+ b8 * TertF
$
Why do I get an undefined D-error? I think the problem is related to the constraints, because when I delete the constraints, I get a finite D-error, but I have no idea what the problem is.
Any help would be really appreciated.
Thanks
Eva
I want to design a choice experiment about the trade-off households make concerning the amount of children and the quality of child-raising. My design includes the following attributes:
*ChildM: number of boys ranging from 1-12 with 6 levels (1,2,4,6,9,12)
*ChildF: number of girls (1,2,4,6,9,12)
*PrimM: the amount of boys sent to primary school (1,2,4,6,9,12)
*PrimF: the amount of girls sent to primary school (1,2,4,6,9,12)
*SecM: the amount of boys sent to secondary school (1,2,4,6,9,12)
*secF: the amount of girls sent to secondary school (1,2,4,6,9,12)
*TertM: the amount of boys sent to tertiary school (1,2,4,6,9,12)
*TertF: the amount of girls sent to tertiary school (1,2,4,6,9,12)
I have made different designs, once with the variables as categorical factors with dummy coding and once as numerical factors. For each design, I made a model with linear effects only, linear and 2-factor interaction effects, and linear, 2-factor interaction effects and quadratic effects. I want to choose the most efficient design, by comparing the D-errors, although for most of my designs (except the linear model with numerical factors) I get an undefined D-error.
This is my code for the linear model with categorical factors:
Design
;alts = alt1*, alt2*
? Each choice set has two options (and no opt-out option)
;rows = 48
;block = 4, minsum
? In total 48 choice sets are created that are blocked in 4 blocks of each 12 choice sets. So every respondent has to answer 12 choice sets.
;eff = (mnl, d)
? I generate a D-efficient design for a multinomial logit model
;alg = mfederov(candidates=10000000)
? Modified Federov algorithm: necessary for the requirements
?;require:
alt1.ChildM + alt1.ChildF <= 12,
alt1.ChildM + alt1.ChildF >= alt1.PrimM + alt1.PrimF,
alt1.PrimM + alt1.PrimF >= alt1.SecM + alt1.SecF,
alt1.SecM + alt1.SecF >= alt1.TertM + alt1.TertF,
alt2.ChildM + alt2.ChildF <= 12,
alt2.ChildM + alt2.ChildF >= alt2.PrimM + alt2.PrimF,
alt2.PrimM + alt2.PrimF >= alt2.SecM + alt2.SecF,
alt2.SecM + alt2.SecF >= alt2.TertM + alt2.TertF
? The number of boys and girls must be smaller than 12 + The number of children cannot be bigger than in the previous attribute
;model:
U(alt1) = b1.dummy[0.01|0.02|0.03|0.02|0.01] * ChildM[2,4,6,9,12,1]
+ b2.dummy[0.01|0.02|0.03|0.02|0.01] * ChildF[2,4,6,9,12,1]
+ b3.dummy[0.01|0.015|0.02|0.025|0.03] * PrimM[2,4,6,9,12,1]
+ b4.dummy[0.01|0.015|0.02|0.025|0.03] * PrimF[2,4,6,9,12,1]
+ b5.dummy[0.015|0.02|0.025|0.03|0.035] * SecM[2,4,6,9,12,1]
+ b6.dummy[0.015|0.02|0.025|0.03|0.035] * SecF[2,4,6,9,12,1]
+ b7.dummy[0.02|0.025|0.03|0.035|0.04] * TertM[2,4,6,9,12,1]
+ b8.dummy[0.02|0.025|0.03|0.035|0.04] * TertF[2,4,6,9,12,1] /
U(alt2) = b1 * ChildM
+ b2 * ChildF
+ b3 * PrimM
+ b4 * PrimF
+ b5 * SecM
+ b6 * SecF
+ b7 * TertM
+ b8 * TertF
$
Why do I get an undefined D-error? I think the problem is related to the constraints, because when I delete the constraints, I get a finite D-error, but I have no idea what the problem is.
Any help would be really appreciated.
Thanks
Eva