Hello. I am trying to specify global constraints for multiple models in a single design. The multiple models correspond to different covariate levels. However, I am given this error message when I try to generate the design:
"Error in Command 1: An attribute, 'alt.1.admin', specified in the ';cond' property could not be found."
My question is: are constraints for multiple models specified different than constraints for a single model? If so, how?
Thank you,
Stephen
Below is the code I am using:
Design
;alts (nd) = alt1*, alt2*, alt3
;alts (disc) = alt1*, alt2*, alt3
;rows=12
;eff = f1(mnl,d)
;fisher(f1) = des1(nd[0.5],disc[0.5])
;con
?---CONSTRAINTS---?
;cond:
if (alt1.location=-2, alt1.admin=1),
if (alt2.location=-2, alt2.admin=1),
if (alt1.location=-2, alt1.anon=1),
if (alt2.location=-2, alt2.anon=1)
;model(nd):
U(alt1) =
?ATTRIBUTES--------------
a1.effects[.01|.01|.01] * location[-2,-1,1,2] +
a2.effects[.01] * anon[-1,1] +
a3.effects[.01] * admin[-1,1] +
a4.effects[.01] * disclosure[-1,1] +
a5.effects[.01] * type [-1,1] +
a6.effects[.01|.01|.01] * cost[-2,-1,1,2] +
?COVARIATES--------------
C1[0]*evertold.covar[0]
/
U(alt2) =
?ATTRIBUTES--------------
a1.effects[.01|.01|.01] * location[-2,-1,1,2] +
a2.effects[.01] * anon[-1,1] +
a3.effects[.01] * admin[-1,1] +
a4.effects[.01] * disclosure[-1,1] +
a5.effects[.01] * type [-1,1] +
a6.effects[.01|.01|.01] * cost[-2,-1,1,2] +
?COVARIATES--------------
C1[0]*evertold.covar[0] +
$
Specifying constraints for multiple models
Moderators: Andrew Collins, Michiel Bliemer, johnr
Re: Specifying constraints for multiple models
Sorry. The code was truncated in the original post. Below is the code in its entirety:
Design
;alts (neverdisclosed) = alt1*, alt2*, alt3
;alts (disclosed) = alt1*, alt2*, alt3
;rows=12
;eff = f1(mnl,d)
;fisher(f1) = des1(neverdisclosed[0.5]) +des2(disclosed[0.5])
;con
?---CONSTRAINTS---?
;cond:
if (alt1.location=-2, alt1.admin=1),
if (alt2.location=-2, alt2.admin=1),
if (alt1.location=-2, alt1.anonymity=1),
if (alt2.location=-2, alt2.anonymity=1)
;model(neverdisclosed):
U(alt1) =
?ATTRIBUTES--------------
a1.effects[0|0|0] * location[-2,-1,1,2] +
a2.effects[0] * anonymity[-1,1] +
a3.effects[0] * admin[-1,1] +
a4.effects[0] * disclosure[-1,1] +
a5.effects[0] * testtype [-1,1] +
a6.effects[0|0|0] * cost[-2,-1,1,2] +
?COVARIATES--------------
C1[0]*evertold.covar[0]
/
U(alt2) =
?ATTRIBUTES--------------
a1.effects[0|0|0] * location[-2,-1,1,2] +
a2.effects[0] * anonymity[-1,1] +
a3.effects[0] * admin[-1,1] +
a4.effects[0] * disclosure[-1,1] +
a5.effects[0] * testtype [-1,1] +
a6.effects[0|0|0] * cost[-2,-1,1,2] +
?COVARIATES--------------
C1[0]*evertold.covar[0] +
$
;model(disclosed):
U(alt1) =
?ATTRIBUTES--------------
a1.effects[0|0|0] * location[-2,-1,1,2] +
a2.effects[0] * anonymity[-1,1] +
a3.effects[0] * admin[-1,1] +
a4.effects[0] * disclosure[-1,1] +
a5.effects[0] * testtype [-1,1] +
a6.effects[0|0|0] * cost[-2,-1,1,2] +
?COVARIATES--------------
C1[0]*evertold.covar[1] +
/
U(alt2) =
?ATTRIBUTES--------------
a1.effects[0|0|0] * location[-2,-1,1,2] +
a2.effects[0] * anonymity[-1,1] +
a3.effects[0] * admin[-1,1] +
a4.effects[0] * disclosure[-1,1] +
a5.effects[0] * testtype [-1,1] +
a6.effects[0|0|0] * cost[-2,-1,1,2] +
?COVARIATES--------------
C1[0]*evertold.covar[1] +
$
Design
;alts (neverdisclosed) = alt1*, alt2*, alt3
;alts (disclosed) = alt1*, alt2*, alt3
;rows=12
;eff = f1(mnl,d)
;fisher(f1) = des1(neverdisclosed[0.5]) +des2(disclosed[0.5])
;con
?---CONSTRAINTS---?
;cond:
if (alt1.location=-2, alt1.admin=1),
if (alt2.location=-2, alt2.admin=1),
if (alt1.location=-2, alt1.anonymity=1),
if (alt2.location=-2, alt2.anonymity=1)
;model(neverdisclosed):
U(alt1) =
?ATTRIBUTES--------------
a1.effects[0|0|0] * location[-2,-1,1,2] +
a2.effects[0] * anonymity[-1,1] +
a3.effects[0] * admin[-1,1] +
a4.effects[0] * disclosure[-1,1] +
a5.effects[0] * testtype [-1,1] +
a6.effects[0|0|0] * cost[-2,-1,1,2] +
?COVARIATES--------------
C1[0]*evertold.covar[0]
/
U(alt2) =
?ATTRIBUTES--------------
a1.effects[0|0|0] * location[-2,-1,1,2] +
a2.effects[0] * anonymity[-1,1] +
a3.effects[0] * admin[-1,1] +
a4.effects[0] * disclosure[-1,1] +
a5.effects[0] * testtype [-1,1] +
a6.effects[0|0|0] * cost[-2,-1,1,2] +
?COVARIATES--------------
C1[0]*evertold.covar[0] +
$
;model(disclosed):
U(alt1) =
?ATTRIBUTES--------------
a1.effects[0|0|0] * location[-2,-1,1,2] +
a2.effects[0] * anonymity[-1,1] +
a3.effects[0] * admin[-1,1] +
a4.effects[0] * disclosure[-1,1] +
a5.effects[0] * testtype [-1,1] +
a6.effects[0|0|0] * cost[-2,-1,1,2] +
?COVARIATES--------------
C1[0]*evertold.covar[1] +
/
U(alt2) =
?ATTRIBUTES--------------
a1.effects[0|0|0] * location[-2,-1,1,2] +
a2.effects[0] * anonymity[-1,1] +
a3.effects[0] * admin[-1,1] +
a4.effects[0] * disclosure[-1,1] +
a5.effects[0] * testtype [-1,1] +
a6.effects[0|0|0] * cost[-2,-1,1,2] +
?COVARIATES--------------
C1[0]*evertold.covar[1] +
$
-
Michiel Bliemer
- Posts: 2057
- Joined: Tue Mar 31, 2009 4:13 pm
Re: Specifying constraints for multiple models
Apologies for the late reply.
Conditional constraints (specified by ;cond) are not compatible with multiple designs (see page 220 of the Ngene user manual). Other constraints (;require or ;reject) should be compatible. This is because the ;cond command ties the constraints to specific individual attribute levels in order to allow attribute level balance. This also means that if different designs have different levels this becomes more tedious and is not supported in Ngene.
Michiel
Conditional constraints (specified by ;cond) are not compatible with multiple designs (see page 220 of the Ngene user manual). Other constraints (;require or ;reject) should be compatible. This is because the ;cond command ties the constraints to specific individual attribute levels in order to allow attribute level balance. This also means that if different designs have different levels this becomes more tedious and is not supported in Ngene.
Michiel