Set up the same constant

This forum is for posts that specifically focus on the Windows desktop version of Ngene (i.e. all version 1.x releases).

Moderators: Andrew Collins, Michiel Bliemer, johnr

Post Reply
yanyanyun
Posts: 3
Joined: Tue Sep 20, 2022 5:11 pm

Set up the same constant

Post 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
Michiel Bliemer
Posts: 2055
Joined: Tue Mar 31, 2009 4:13 pm

Re: Set up the same constant

Post 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
Post Reply