Help review my NGENE CODES, And a Question

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Help review my NGENE CODES, And a Question

Postby Ephraimkis » Sun Feb 25, 2024 12:01 am

Dear Ngene Team,
I am new to DCE surveys and this is my first attempt in developing one. I will appreciate your guidance through the 2 questions I have in my submission below.

I am to conduct a survey among informal caregivers in an African country with these 5 attributes (and levels).
1. Setting (0,1)
2. Caregiving tasks (0,1,2)
3. Frequency [Days providing care per week] (0,1)
4. Time spent providing care per day (0,1)
5. Financial support (0,3000,6000, 9000).
I made 48 rows and I am hoping each participant will answer 12 questions/scenarios. Is the codes I wrote below correct?

Code: Select all
Design
;alts = CaregiverA, CaregiverB, Neither
;rows = 48
;eff = (mnl,d)
;block = 4
;model:
U(CaregiverA) = setting.dummy[0] * SETTING[0,1]
                + tasks.dummy[0|0] * TASKS[0,1,2]
                + frequency[-.0001] * FREQUENCY[0,1]
                + time[-.0001] * TIME[0,1]                                       
                + FinancialSupport[.0001] * FINANCIALSUPPORT[0,3000,6000,9000]  ? FinancialSupport in Ug shillings
/
U(CaregiverB) = setting               * SETTING
                + tasks               * TASKS
                + frequency           * FREQUENCY
                + time                * TIME
                + financialsupport    * FINANCIALSUPPORT
/
U(Neither)    = 0
$


There is a second challenge.
There are 2 additional attributes I wanted to include although in a different way because they are dominant.
These attributes are;
Relationship to care recipient (Immediate family member, Other relative)
Expected duration of care provision (Long time, Temporary/short time)

Can I have these 2 additional attributes presented within the 12 scenarios in this way.
In the 1st 4 scenarios questions (1-4), the respondent is asked to imagine the care recipient is an immediate family member requiring care for a long time
The next 4 scenarios questions (5-8), the respondent is asked to imagine the care recipient is an immediate family member requiring care for a temporary period of time
The last 4 scenario questions (8-12), the respondent is asked to imagine the care recipient is a (other) relative requiring care for a temporary period of time
And do the same for the next set of 12 until the 48 rows are completed.

NB: I am excluding other relatives providing care for a long time.

I hope you understand what I mean. Is this possible and if yes, how would I include it in the codes?

Thank you in advance for your kind help
Ephraim
Ephraimkis
 
Posts: 2
Joined: Wed Feb 21, 2024 8:39 am

Re: Help review my NGENE CODES, And a Question

Postby Michiel Bliemer » Sun Feb 25, 2024 9:08 am

Regarding the script:
* Generic alternatives need to be indicated with an asterisk (*)
* Given that many choice tasks have a dominant alternative, according to your chosen priors, it is necessary to switch to the modified Federov algorithm
* Note that the LAST level in Ngene is the base level for dummy coding
* When using (near) zero priors, it is usually a good idea to dummy code all attributes, even the numerical ones, to ensure that all levels appear against all other levels, as otherwise it is most efficient to only compare financial support 0 with 9000 and 3000 with 6000 only.
* Note that with 2 levels b * X[0,1] is the same as b.dummy[0] * X[0,1], so in the script below I simplified the code for relationship and duration dummies

Further, the script looks fine.

Regarding relationship and duration, these are so-called scenario variables, which have the value across all alternatives in each choice task, but vary across choice tasks. Scenario variables can be added in a labelled alternative such as the opt-out alternative as a main effect (which describes the impact of relationship and duration on choosing for a caregiver or not), and as an interaction effect across the two unlabelled alternatives (which describes the impact of relationship and duration on the preferences with respect to the interacted attributes).

Scenario constraints are imposed via the ;require property, and avoiding relative + long time can be done via reject constraints in the script. Note that the design may not provide equal splits of (family, short), (family, long), and (relative, temporary), so please check and possibly make some manual adjustments. Note that it is strictly not necessary to give such equal splits, but I can understand that this may be desirable in the survey.

Code: Select all
Design
;alts = CaregiverA*, CaregiverB*, Neither
;rows = 48
;eff = (mnl,d)
;block = 4
;alg = mfederov
;require:
? scenario variables are the same across all alternatives
CaregiverA.RELATIONSHIP = CaregiverB.RELATIONSHIP,
CaregiverA.RELATIONSHIP = Neither.RELATIONSHIP,
CaregiverA.DURATION = CaregiverB.DURATION,
CaregiverA.DURATION = Neither.DURATION
;reject:
CaregiverA.RELATIONSHIP = 0 and CaregiverA.DURATION = 1,
CaregiverB.RELATIONSHIP = 0 and CaregiverB.DURATION = 1
;model:
U(CaregiverA) = setting.dummy[0]    * SETTING[0,1]
              + tasks.dummy[0|0]    * TASKS[0,1,2]
              + frequency[-.0001]   * FREQUENCY[0,1]
              + time[-.0001]        * TIME[0,1]                                       
              + FinancialSupport.dummy[.01|.02|.03] * FINANCIALSUPPORT[3000,6000,9000,0]  ? FinancialSupport in Ug shillings
              + set_rel             * SETTING.dummy[1] * RELATIONSHIP[0,1] ? 0=relative (base), 1=family member
              + task_rel1           * TASKS.dummy[1] * RELATIONSHIP
              + task_rel2           * TASKS.dummy[2] * RELATIONSHIP
              + freq_rel            * FREQUENCY * RELATIONSHIP
              + time_rel            * TIME * RELATIONSHIP
              + fin_rel             * FINANCIALSUPPORT * RELATIONSHIP
              + set_dur             * SETTING.dummy[1] * DURATION[0,1]     ? 0=temporary (base), 1 = long time
              + task_dur1           * TASKS.dummy[1] * DURATION
              + task_dur2           * TASKS.dummy[2] * DURATION
              + freq_dur            * FREQUENCY * DURATION
              + time_dur            * TIME * DURATION
              + fin_dur             * FINANCIALSUPPORT * DURATION
              /
U(CaregiverB) = setting             * SETTING
              + tasks               * TASKS
              + frequency           * FREQUENCY
              + time                * TIME
              + financialsupport    * FINANCIALSUPPORT
              + set_rel             * SETTING.dummy[1] * RELATIONSHIP
              + task_rel1           * TASKS.dummy[1] * RELATIONSHIP
              + task_rel2           * TASKS.dummy[2] * RELATIONSHIP
              + freq_rel            * FREQUENCY * RELATIONSHIP
              + time_rel            * TIME * RELATIONSHIP
              + fin_rel             * FINANCIALSUPPORT * RELATIONSHIP
              + set_dur             * SETTING.dummy[1] * DURATION
              + task_dur1           * TASKS.dummy[1] * DURATION
              + task_dur2           * TASKS.dummy[2] * DURATION
              + freq_dur            * FREQUENCY * DURATION
              + time_dur            * TIME * DURATION
              + fin_dur             * FINANCIALSUPPORT * DURATION
              /
U(Neither)    = asc_neither[0]
              + relationship        * RELATIONSHIP
              + duration            * DURATION
$


Michiel
Michiel Bliemer
 
Posts: 1730
Joined: Tue Mar 31, 2009 4:13 pm

Re: Help review my NGENE CODES, And a Question

Postby Ephraimkis » Wed Feb 28, 2024 12:52 am

Thank you.
This has been helpful.
Thanks
Ephraim
Ephraimkis
 
Posts: 2
Joined: Wed Feb 21, 2024 8:39 am


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 38 guests