[Limdep Nlogit List] Nested Logit Model on NLOGIT

William Greene wgreene at stern.nyu.edu
Mon Jun 22 03:41:53 AEST 2020


(1) Don't use ONE as a name for any components of your model.
(2) You don't want the same constant term in all 4 utility functions.
(3) Just use  ;Tree=0(P03,I03), 1(P47,I47) and drop IVSET. You might
want to use names rather than 0(.) and 1(.).
/Bill Greene

On Thu, Jun 18, 2020 at 5:06 PM Meghna Chakraborty via Limdep <
limdep at mailman.sydney.edu.au> wrote:

> Hi,
> I am trying to develop a nested logit model on NLOGIT with the following
> code. I am getting the following error to begin with and also I am not sure
> if I am defining the utility functions and the ivset correctly. Please
> help.
>
> NLOGIT
> ;Lhs=CRUCode2
> ;Choices=P03,I03,P47,I47
> ;Tree=ChAg47[0(P03,I03), 1(P47,I47)]
> ;Show Tree
> ;Model:
> U(P03)=ONE + DrAg1629*DrAg1629 + DrAg3059*DrAg3059 + DrAgMT60*DrAgMT60 +
> DrGnM*DrGnM + DrRcWht*DrRcWht + DrRcBlck*DrRcBlck + DrRcOth*DrRcOth/
> U(I03)=ONE + DrAg1629*DrAg1629 + DrAg3059*DrAg3059 + DrAgMT60*DrAgMT60 +
> DrGnM*DrGnM + DrRcWht*DrRcWht + DrRcBlck*DrRcBlck + DrRcOth*DrRcOth/
> U(P47)=ONE + DrAg1629*DrAg1629 + DrAg3059*DrAg3059 + DrAgMT60*DrAgMT60 +
> DrGnM*DrGnM + DrRcWht*DrRcWht + DrRcBlck*DrRcBlck + DrRcOth*DrRcOth/
> U(I47)=ONE + DrAg1629*DrAg1629 + DrAg3059*DrAg3059 + DrAgMT60*DrAgMT60 +
> DrGnM*DrGnM + DrRcWht*DrRcWht + DrRcBlck*DrRcBlck + DrRcOth*DrRcOth/
> U(0)=U(P03)+U(I03)/
> U(1)=U(P47)+U(I47)/
> ;ivset:(Tree) = [1] $
>
> Error   1089: Could not interpret string; expected to find number.
>
> Thank you very much!
>
> Best regards
> Meghna
> _______________________________________________
> Limdep site list
> Limdep at mailman.sydney.edu.au
> http://limdep.itls.usyd.edu.au
>
>

-- 
William Greene
Department of Economics, emeritus
Stern School of Business, New York University
44 West 4 St.
New York, NY, 10012
URL: https://protect-au.mimecast.com/s/UOnICvl1rKiMwKzOuQtJ0u?domain=people.stern.nyu.edu
Email: wgreene at stern.nyu.edu
Ph. +1.646.596.3296
Editor in Chief: Journal of Productivity Analysis
Editor in Chief: Foundations and Trends in Econometrics
Associate Editor: Economics Letters
Associate Editor: Journal of Business and Economic Statistics


More information about the Limdep mailing list