Page 1 of 1

Set up the same constant

PostPosted: Fri Nov 03, 2023 12:51 pm
by yanyanyun
Dear Michiel,

I have looked at a couple of other posts on this forum about including Asc, but I am still a little confused. I appreciate your kind advice for my two questions below.

(Q1) I noticed that with the opt-out design, we need to set up the same constant for alt1 and alt2. My question is, does b0[0] equal to b0 when we need to set up the same constant for alt1 and alt2? Please see my syntax below.
Code: Select all
Design
;alts = packageA*, packageB*, neither
;rows = 24
;block = 3
;eff = (mnl,d)
;model:
U(packageA) =  b0[0] +
                        b1.dummy[0|0|0] * MA[0,1,2,3] +
                        b2.dummy[0|0|0] * MM[30,70,150,110] +
                        b3.dummy[0|0|0] * CC[0.5,4.5,6.5,2.5] +
                        b4.dummy[0] * OO[0, 1] +
                        b5[0] * Price[5,15,25,35] /

U(packageB) =  b0 +
                       b1 * MA +
                       b2 * MM +
                       b3 * CC +
                       b4 * OO +
                       b5 * Price
$


(Q2) So, are the two designs below the same, and both are correct?

(1)
Design
;alts = A*, B*, neither
.
U(A) = b0[0] + ...
U(B) = b0[0] + ...
.
. $

(2)
Design
;alts = A*, B*, neither
.
U(A) = b0[0] + ...
U(B) = b0 + ...
.
. $

Thank you so much!

Best regards,
Yan

Re: Set up the same constant

PostPosted: Fri Nov 03, 2023 8:15 pm
by Michiel Bliemer
b0[0] and b0 is the same, as Ngene automatically assigns a zero prior to a coefficient if it is not defined.
For packageA and packageB you simply need to use the same constant, so b0 and b0. The following are all the same and you can choose:
U(A) = b0 + ... /
U(B) = b0 + ...
or
U(A) = b0[0] + ... /
U(B) = b0[0] + ...
or
U(A) = b0[0] + ... /
U(B) = b0 + ...

Michiel