Same contraints across alternatives?

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Same contraints across alternatives?

Postby richarddal » Thu Sep 11, 2014 8:08 am

Hi All
Hoping you can help me out here. I've been playing with the design below for a pilot (hence the odd priors - based on published literature). It will happily produce a design if I run it with the contraint operating in only one of the alternatives (say A), but I need it to apply to both A and B. However, if I try the full syntax below it will not produce a design.

Have I mispecified the constraints here?

Design
;alts = A*, B*
;rows = 60
;block = 5
;eff = (mnl,wtp(wtp1))
;wtp = wtp1(a1,a2,a3,a4/a5)
;alg = swap(stop = noimprov(10000 iterations))
;cond:
if(a.mode=[0,1], a.freq=[1,2,3]),
if(a.mode=2, a.freq=[0,1,2]),
if(b.mode=[0,1], b.freq=[1,2,3]),
if(b.mode=2, b.freq=[0,1,2])
;model:
U(A) = a1.effects[-0.02|-0.01]* mode[0,1,2] + a2.effects[-0.03|-0.02|-0.01]* freq[0,1,2,3] + a3[0.33]* efficacy[2,4,6,7] + a4[-0.01]* safety[1,5,10] + a5[-0.003]*oop[0,500,1000,1500]+ i1[0.01]*mode.dummy[2]*freq.dummy[0] /
U(B) = a1* mode + a2* freq + a3* efficacy + a4* safety + a5*oop + i1*mode.dummy[2]*freq.dummy[0] $

As an aside, in a previous run of this model (without constraining the b alternative), I had inadvertently interacted mode*freq without specifying the levels, and I was surprised when it produced a design. Would that be useable given the effects coded nature of those two attributes?

I'll be most appreciative of any help you can provide.
Cheers
Richard
richarddal
 
Posts: 3
Joined: Wed Jun 18, 2014 3:40 pm

Re: Same contraints across alternatives?

Postby Michiel Bliemer » Thu Sep 11, 2014 9:10 am

This typically happens when a lot of constraints are specified. In your case, freq = 0 can only occur with mode = 2, so this is quite strict. Maybe a design exists, but Ngene finds it hard to find a design using the swapping algorithm that does not violate any constraint.
Michiel Bliemer
 
Posts: 1759
Joined: Tue Mar 31, 2009 4:13 pm

Re: Same contraints across alternatives?

Postby Michiel Bliemer » Thu Sep 11, 2014 9:15 am

To answer your second question, it sounds like you tried to include an interaction effect by treating mode and freq as linear continuous variables, which is perfectly fine from a theoretical point of view, but I am not sure that in your case it would make sense. In that case, the levels for mode and freq will be used that you specified (0,1,2, and 0,1,2,3). If mode is a categorical variable, then it does not make much sense to use it as a linear continuous variable, but if freq is specified as [2,3,4,5] being the frequencies of a train per hour, then this could make sense. Note that the beta parameters are effects coded, not the attribute levels. You can have b*mode*freq, in which case b is a single parameter for the linear effect of mode*freq.
Michiel Bliemer
 
Posts: 1759
Joined: Tue Mar 31, 2009 4:13 pm

Re: Same contraints across alternatives?

Postby richarddal » Thu Sep 11, 2014 11:15 am

Thanks for those replies Michiel, particularly the clarification on the interaction. To expand a little; mode is indeed categorical (not linear), frequency could be treated as either categorical or linear (depending on the scale - it is based on how often something is used).

With respect to the design, would one of the alternative algorithms (as opposed to swapping) have a better chance of producing a design given these constraints?

Otherwise, I might try going back to the use of zero priors (particularly as this is for the pilot phase only).

Cheers
Richard
richarddal
 
Posts: 3
Joined: Wed Jun 18, 2014 3:40 pm

Re: Same contraints across alternatives?

Postby Michiel Bliemer » Thu Sep 11, 2014 6:59 pm

I believe there are several issues with your syntax. The syntax below runs:

Code: Select all
Design
;alts = A*, B*
;rows = 60
;block = 5
;eff = (mnl,wtp(wtp1))
;wtp = wtp1(a1,a2,a3,a4/a5)
;alg = mfederov(candidates = 10000)
;reject:
a.mode = 0 and a.freq = 0,
a.mode = 1 and a.freq = 0,
a.mode = 2 and a.freq = 3,
b.mode = 0 and b.freq = 0,
b.mode = 1 and b.freq = 0,
b.mode = 2 and b.freq = 3
;model:
U(A) = a1.effects[-0.02|-0.01]* mode[0,1,2] + a2.effects[-0.03|-0.02|-0.01]* freq[0,1,2,3] + a3[0.33]* efficacy[2,4,6,7] + a4[-0.01]* safety[1,5,10] + a5[-0.003]*oop[0,500,1000,1500] /
U(B) = a1* mode + a2* freq + a3* efficacy + a4* safety + a5*oop $


I have replaced your conditional constraints with reject constraints and used the modified federov algorithm. Since the candidate set is too large, I have limited the candidate set to 10,000 rows.

Another problem was your interaction effect. The levels for the attribute levels in the interactions are the same for A and B, and therefore i1 cannot be estimated.

Further, your effects coded parameters are very small, and likely not realistic, leading to huge sample size requirements in the Ngene calculations.
Michiel Bliemer
 
Posts: 1759
Joined: Tue Mar 31, 2009 4:13 pm

Re: Same contraints across alternatives?

Postby richarddal » Thu Sep 11, 2014 7:46 pm

Thanks Michiel - that is fantastic. I'd managed to get it to run with the previous syntax by also dropping the interaction, but will run it using your conditions and rejection syntax. I take your point on the small priors and the effect on sample size, but based on a number of other posts etc, I was not overly concerned at this point as this is for a pilot. Once again, many thanks!!
richarddal
 
Posts: 3
Joined: Wed Jun 18, 2014 3:40 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 1 guest