Including a status quo alternative with dummy coded variable

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Including a status quo alternative with dummy coded variable

Postby Sweicksel » Thu Jun 07, 2012 3:25 am

Hi, this is Scott--

I'm wondering if there's an error in my code or a possible work-around for a problem I've come up against: I've been unable to generate a design including a status quo alternative for a utility function that is comprised of dummy coded variables. When I try to specify levels for the dummy coded variables, I get an error: " Two identically named attributes do not have consistently specified levels: 'programc.conditions', 'programa.conditions' "

Thank you in advance for your help-- here's the syntax I'm using:

Design
; eff=(mnl, wtp(ref1))
; wtp=ref1(conditions, eligibility, place, payment/cost)
; rows = 80
; alts=programA, programB, programC
; model:
U(programA) = conditions.dummy [-.3|-.1]*conditions +
eligibility.dummy [-.4|-.2|-.5|-.1|-.15|-.3] *eligibility +
place.dummy [.1]*place[0,1] +
payment.dummy [.1|.2]*payment +
cost [-0.05]*cost [0, 2, 4, 6, 8, 10]
/
U(programB) = conditions.dummy [-.3|-.1]*conditions +
eligibility.dummy [-.4|-.2|-.5|-.1|-.15|-.3] *eligibility +
place.dummy [.1]*place[0,1] +
payment.dummy [.1|.2]*payment +
cost [-0.05]*cost [0, 2, 4, 6, 8, 10]
/
U(programC)= conditions.dummy [-.3|-.1]*conditions[1] +
eligibility.dummy [-.4|-.2|-.5|-.1|-.15|-.3] *eligibility[3] +
place.dummy [.1]*place[0] +
payment.dummy [.1|.2]*payment[1] +
cost [-0.05]*cost [6]
$
Sweicksel
 
Posts: 1
Joined: Fri Mar 30, 2012 2:24 am

Re: Including a status quo alternative with dummy coded variable

Postby Andrew Collins » Wed Jun 20, 2012 1:53 pm

Hi Scott

Good to hear that it worked well. Here is the response for all to see - my access to the forum was blocked for a while.

First of all, for cost, you will need to give the cost attribute a different name for the program C alternative. Then it can just assume a single level (attributes with the same name across alternatives have to have the same specification of attribute levels).

With the dummy coding it is a bit trickier. Assuming that you wish to enter the generically specified parameters into the program C alternative as well, then all of the dummy parameters and attribute levels must be specified. The easiest way to fix the attribute levels in this context is to set the number of instances of all other attribute levels to zero, and of the attribute level that you are fixing to the number of rows in the design. Below is an example, where I fixed to the first dummy coded attribute level. You can swap around the 80 and 0 as needed. Remember that the base level is the last attribute level specified.

Andrew

Code: Select all
Design
; eff=(mnl, wtp(ref1))
; wtp=ref1(conditions, eligibility, place, payment/cost)
; rows = 80
; alts=programA, programB, programC

; model:
U(programA) = conditions.dummy [-.3|-.1]*conditions[0,1,2] +
eligibility.dummy [-.4|-.2|-.5|-.1|-.15|-.3] *eligibility[0,1,2,3,4,5,6] +
place.dummy [.1]*place[0,1] +
payment.dummy [.1|.2]*payment[0,1,2] +
cost [-0.05]*cost [0, 2, 4, 6, 8, 10]
/
U(programB) = conditions.dummy [-.3|-.1]*conditions[0,1,2] +
eligibility.dummy [-.4|-.2|-.5|-.1|-.15|-.3] *eligibility[0,1,2,3,4,5,6] +
place.dummy [.1]*place[0,1] +
payment.dummy [.1|.2]*payment[0,1,2] +
cost [-0.05]*cost [0, 2, 4, 6, 8, 10]
/
U(programC)= conditions.dummy[-.3|-.1]*conditionsC[0,1,2](80,0,0) +
eligibility.dummy [-.4|-.2|-.5|-.1|-.15|-.3] *eligibilityC[0,1,2,3,4,5,6](80,0,0,0,0,0,0) +
place.dummy [.1]*placeC[0,1](80,0) +
payment.dummy [.1|.2]*paymentC[0,1,2](80,0,0) +
cost [-0.05]*costC[6]
$
Andrew Collins
 
Posts: 78
Joined: Sat Mar 28, 2009 4:48 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 40 guests