[Limdep Nlogit List] Error 1097 with random parameter logit model

Yang Li yli107 at uncc.edu
Fri Jun 19 04:12:50 AEST 2020


Dear all,

I am new to NLOGIT and trying to fit my data with a random parameter logit
model.

I've used a MNL to filter the significant variables for the next step of
running the ML model and everything went well with 59 variables at the end.

But when I added the FCN command with all 59 parameters in it, this message
"Error 1097: Unusable LHS variable in choice model setup" appeared and the
program told me that all my observations flagged as bad.

My code is:
NLOGIT;
LHS = DECISION;
CHOICES = KA, B, PO, NONE;
MODEL:
U(KA) = KO*ONE + k1*v1 + k3*V3 + k4*V4 + k6*V6 + k7*V7 +
k23*V23 + k24*V24 + k26*V26 + k27*V27 + k28*V28 + k30*V30 +
k31*V31 + k32*V32 + k35*V35 + k38*V38 +
k39*V39 + k40*V40 +
k46*V46 + k47*V47 + k50*V50 + k52*V52 +
k56*V56 + k65*V65/

U(B) = BO*ONE + b1*v1 + b3*V3 + b4*V4 + b6*V6 + b7*V7 +
b23*V23 + b24*V24 + b27*V27 + b28*V28 +
b31*V31 + b32*V32 + b38*V38 +
b39*V39 + b40*V40 +
b46*V46 + b47*V47 +
b55*V55 +
b63*V63 + b65*V65/

U(PO) = PO*ONE + p1*v1 + p3*V3 + p5*V5 + p7*V7 +
p10*V10 + p15*V15 +
p23*V23 + p27*V27 +
p37*V37 +
p39*V39 + p40*V40 + p41*V41 +
p46*V46 + p47*V47 + p50*V50 +
p55*V55 + p67*V67/

U(NONE) = n13*V13;

    OUTPUT = 1;
    MAXIT = 200;
    RPL;
    FCN = K1(N), K3(N), k4(N), K6(N), K7(N), K23(N), k24(N), K26(N), k27(N),
    K28(N), k30(N), k31(N), K32(N), k35(N), K38(N), K39(N), K40(N), K46(N),
    K47(N), k50(N), k52(N), k56(N), k65(N), B1(N), B3(N), b4(N), b6(N),
    B7(N), b23(N), b24(N), b27(N), B28(N), b31(N), B32(N), B38(N), B39(N),
    B40(N), B47(N), b55(N), b63(N), b65(N), P1(N), P3(N), p5(N), P7(N),
    P10(N), P15(N), p23(N), p27(N), P37(N), p39(N), P40(N), p41(N), P46(N),
    p47(N), p50(N), p55(N), p67(N),n13(N);
    PTS = 25;
    HALTON$

All my variables are 0-1 coded and choice invariant. The error will be gone
when I reduce the number of parameters that are put into the FCN command.
And the capability of the NLOGIT with ML model is described with up to 100
random parameters. Since I am able to fit my data with the ML model in SAS,
I am really confused with this error.  Any help would be appreciated and
thanks in advance!

Yang Li


More information about the Limdep mailing list