Page 1 of 1

Fixed parameters

Posted: Fri Sep 19, 2025 12:57 am
by djourdain
I am trying to develop a design where people have gains/losses in t0, and gains/losses in t3. and other attributes. I created some attributes Y0gain, Y0loss, Y3gain, Y3loss. Given prospect theory (losses have greater disutility), and time preferences, each will have a common basis (the utility of the attribute) multiplied by a different parameter (to take into account the different scenarios).

Here is the proposed design:

Code: Select all

Design
;alts   = A*, B*, C

;rows   = 24
;block  = 4

;eff = (mnl, d) 
;alg = mfederov(candidates=400) 

;reject:
B.Y0GAIN = 3  and B.Y0LOSS = -3,
B.Y0GAIN = 3  and B.Y0LOSS = -6,
B.Y0GAIN = 6  and B.Y0LOSS = -3,
B.Y0GAIN = 6  and B.Y0LOSS = -6,

C.Y0GAIN = 3  and C.Y0LOSS = -3,
C.Y0GAIN = 3  and C.Y0LOSS = -6,
C.Y0GAIN = 6  and C.Y0LOSS = -3,
C.Y0GAIN = 6  and C.Y0LOSS = -6,

B.Y3GAIN = 3  and B.Y3LOSS = -3,
B.Y3GAIN = 3  and B.Y3LOSS = -6,
B.Y3GAIN = 6  and B.Y3LOSS = -3,
B.Y3GAIN = 6  and B.Y3LOSS = -6,

C.Y3GAIN = 3  and C.Y3LOSS = -3,
C.Y3GAIN = 3  and C.Y3LOSS = -6,
C.Y3GAIN = 6  and C.Y3LOSS = -3,
C.Y3GAIN = 6  and C.Y3LOSS = -6



;model:

U(A) = ASC_Opt[-0.1] + 
         b_WORK[-.01]*WORK.ref[12] +
         b_EXTRLOSS[0.1]*EXTRLOSS.ref[-16]
/

U(B) =  b_Y[0.3] * Y0GAIN[0,3,6] + 
        b_Y * lambda.ref[1.6] * Y0LOSS[0,-3,-6]  +
        b_Y * theta.ref[0.36]* Y3GAIN[0,3,6] +
        b_Y * gamma.ref[0.57] * Y3LOSS[0,-3,-6] +
        b_LEG[.3]*LEG[0,2,4]  +
        b_EXTRLOSS *  EXTRLOSS[-16,-12,-8] + 
        b_WORK * WORK[10,12,14]
/

U(C) =  b_Y * Y0GAIN[0,3,6] + 
        b_Y * lambda.ref[1.6] * Y0LOSS[0,-3,-6]   +
        b_Y * theta.ref[0.36] * Y3GAIN[0,3,6] +
        b_Y * gamma.ref[0.57] * Y3LOSS[0,-3,-6] +
        b_LEG * LEG[0,2,4]  +
        b_EXTRLOSS *  EXTRLOSS[-16,-12,-8] + 
        b_WORK * WORK[10,12,14]

$
It does provide some solution, but when I calculate the utilities myself, they differ from the results given by ngene. In the design results, ngene also provides the following columns: a.gamma*a.y3loss b.gamma*b.y3loss c.gamma*c.y3loss;
I suspect that he is treating my formulation as an interaction (but then, why only for gamma?!)
Choice situation a.work a.extrloss a.gamma a.y3loss b.y0gain b.leg b.extrloss b.work b.lambda b.y0loss b.theta b.y3gain b.gamma b.y3loss c.y0gain c.leg c.extrloss c.work c.lambda c.y0loss c.theta c.y3gain c.gamma c.y3loss Block a.gamma*a.y3loss b.gamma*b.y3loss c.gamma*c.y3loss
1 12 -16 0.57 0 0 2 -8 14 1.6 -6 0.36 0 0.57 -6 3 0 -16 10 1.6 0 0.36 6 0.57 0 3 0 -3.42 0
2 12 -16 0.57 0 3 4 -16 14 1.6 0 0.36 0 0.57 0 0 4 -8 10 1.6 0 0.36 0 0.57 -3 2 0 0 -1.71
3 12 -16 0.57 0 0 2 -8 14 1.6 0 0.36 0 0.57 -3 3 4 -16 10 1.6 0 0.36 0 0.57 0 4 0 -1.71 0
Therefore, my question is: is it correct to treat fixed parameters the way I did? (lambda.ref, theta.ref, gamma.ref) ; any hint / comment regarding the method is welcomed.

Re: Fixed parameters

Posted: Fri Sep 19, 2025 11:32 am
by Michiel Bliemer
I am not entirely sure what you mean with "t0" and "t3" and I am also unsure what you mean with "fixed parameter". Do you mean a fixed variable?

The syntax .ref is meant to be used for pivot designs in combination with .piv. If you want a variable to have a fixed value, you simply write for example:
b_Y * lambda[1.6] * Y0LOSS[0,-3,-6]

where b_Y is a parameter (to be estimated), lambda is a variable with a fixed value, and y0loss is an attribute with 3 levels.

Michiel

Re: Fixed parameters

Posted: Fri Sep 19, 2025 3:53 pm
by djourdain
Thank you for your clarification and apologies for my lack of clarity.
I meant a fixed variable and I corrected the syntax as advised.

However, I still have a problem.
To better understand what was happening, I have simplified the model as followed:

Code: Select all

Design
;alts   = B, C

;rows   = 24
;block  = 4

;eff = (mnl, d) 
;alg = mfederov(candidates=400) 

;reject:
B.Y0GAIN = 3  and B.Y0LOSS = -3,
B.Y0GAIN = 3  and B.Y0LOSS = -6,
B.Y0GAIN = 6  and B.Y0LOSS = -3,
B.Y0GAIN = 6  and B.Y0LOSS = -6,

C.Y0GAIN = 3  and C.Y0LOSS = -3,
C.Y0GAIN = 3  and C.Y0LOSS = -6,
C.Y0GAIN = 6  and C.Y0LOSS = -3,
C.Y0GAIN = 6  and C.Y0LOSS = -6

;model:


U(B) =  b_Y[0.3] * Y0GAIN[0,3,6] + 
        b_Y * lambda[1.6] * Y0LOSS[0,-3,-6] 
/

U(C) =  b_Y * Y0GAIN[0,3,6] + 
        b_Y * lambda * Y0LOSS[0,-3,-6]   

$
Now the variable lambda has a fixed value (1.6);
b_Y will need to be estimated in the DCE but was given an prior of 0.3 here.
The model runs without errors and gives me an output:

Code: Select all

									
Prior	b_y								
Fixed prior value	0.3								
Sp estimates	0.757201								
Sp t-ratios	2.252425								
									
Design									
Choice situation	b.y0gain	b.lambda	b.y0loss	c.y0gain	c.lambda	c.y0loss	Block	b.lambda*b.y0loss	c.lambda*c.y0loss
1	0	1.6	0	0	1.6	-3	4	0	-4.8
2	6	1.6	0	6	1.6	0	2	0	0
3	3	1.6	0	3	1.6	0	2	0	0
4	0	1.6	-3	0	1.6	-6	1	-4.8	-9.6
My concern is that there are columns in the output b.lambda*b.yloss and c.lambda.c.y0loss. At first, I thought there were just intermediate outputs. But when I look at the utilities reported, I am getting

Code: Select all

		
MNL utilities, fixed priors		
Choice situation	b	c
1	0	-1.44
2	0	0
3	0	0
4	-1.44	-2.88
So it looks (at least for the reporting) that the model took into account **only** these last two columns (eg in the first row the utility of c is 0.3 * c.lambda*cY0loss = 0.3 * -4.8 = -1.44 .

Is this only some reporting issues? or is it an issues with the way I wrote the utilities that is not accepted by Ngene?

Re: Fixed parameters

Posted: Fri Sep 19, 2025 5:10 pm
by Michiel Bliemer
I do not see an issue with the first choice task.

In your first choice task you have:
A: y0gain = 0, lambda = 1.6, y0loss = 0
B: y0gain = 0, lambda = 1.6, y0loss = -3

Therefore:
U(A) = 0.3 * 0 + 0.3 * 1.6 * 0 = 0
U(B) = 0.3 * 0 + 0.3 * 1.6 * (-3) = -1.44

So this seems correct to me?

The last two columns are indeed intermediate results, and using those to do the computations would also work:
U(A) = 0.3 * 0 + 0.3 * 0 = 0
U(B) = 0.3 * 0 + 0.3 * (-4.8) = -1.44

But it seems to indeed not work correctly for other choice tasks. My suspicion is that Ngene currently cannot deal with situations where the same parameter (b_Y) is used multiple times in the same utility function. Your choice experiment is very unusual, especially since the model only has a single parameter. When you use a different parameter for the second term (e.g. b_X) then it works fine. So that could be a work around, that you assume different parameters, which should allow you later to estimate a model with two parameters but also with a single parameter.

Michiel

Re: Fixed parameters

Posted: Fri Sep 19, 2025 7:13 pm
by djourdain
Thank you very much for this suggestion. As suggested I'll use different parameters with the priors taking into account the fact they are multiplied by lambda, etc. It should make the model more standard.

Re: Fixed parameters

Posted: Fri Sep 19, 2025 8:17 pm
by Michiel Bliemer
A better idea may actually be to simply use the full factorial. There exist actually only 20 unique choice tasks based on your specified constraints and also taking into account that B and C are generic (by using ;alts = B*, C*), which means avoiding choice tasks where the profiles of B and C are simply swapped. You can generate the full factorial using the script below. The utility function itself is not that important for the full factorial as it simply generates all possible choice tasks without evaluating efficiency.

Code: Select all

Design
;alts   = B*, C*

;rows   = all
;fact
;block  = 2


;reject:
B.Y0GAIN = 3  and B.Y0LOSS = -3,
B.Y0GAIN = 3  and B.Y0LOSS = -6,
B.Y0GAIN = 6  and B.Y0LOSS = -3,
B.Y0GAIN = 6  and B.Y0LOSS = -6,

C.Y0GAIN = 3  and C.Y0LOSS = -3,
C.Y0GAIN = 3  and C.Y0LOSS = -6,
C.Y0GAIN = 6  and C.Y0LOSS = -3,
C.Y0GAIN = 6  and C.Y0LOSS = -6

;model:


U(B) =  b_Y[0.3] * Y0GAIN[0,3,6] + 
        b_Y * lambda[1.6] * Y0LOSS[0,-3,-6] 
/

U(C) =  b_Y * Y0GAIN[0,3,6] + 
        b_Y * lambda * Y0LOSS[0,-3,-6]   

$
Michiel