Specifying constraints for multiple models

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Specifying constraints for multiple models

Postby swpan » Thu Jul 07, 2016 12:36 pm

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] +

$
swpan
 
Posts: 3
Joined: Thu Jul 07, 2016 9:36 am

Re: Specifying constraints for multiple models

Postby swpan » Wed Jul 13, 2016 11:57 am

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] +

$
swpan
 
Posts: 3
Joined: Thu Jul 07, 2016 9:36 am

Re: Specifying constraints for multiple models

Postby Michiel Bliemer » Sun Aug 14, 2016 7:52 am

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
Michiel Bliemer
 
Posts: 1733
Joined: Tue Mar 31, 2009 4:13 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: Google [Bot] and 52 guests