[Limdep Nlogit List] Problem with NLCONVERT

William Greene wgreene at stern.nyu.edu
Mon Aug 23 04:43:30 AEST 2021


Alessandro: I assume you are using NLOGIT 6.  Superficially, the command
looks correct.  I suggest
you try the following:  Use the command

CLIST ; Convert = choice1,prezzo, vite1, vite_sa1,
             AGRITUR1, BIO1, COMPUTR1, SIT_WEB1,ETA1, SEX1, ANNSTUD1,
              AGR_STU1, PT_MAGG1, PT_MIN1, STRANER1, LAV_INT1, NMEMBR1,
              N0_5_1, N6_13_1 $

to create a labeled list that contains the 19 names.
Then, change the ;Names=... part of your command to

;Names = Convert $

/Bill Greene

On Thu, Aug 19, 2021 at 6:41 AM Alessandro Corsi <alessandro.corsi at unito.it>
wrote:

> I'm trying to convert a OneLine Data Set to a Nlogit format, using
> NLCONVERT.
>
> My original Data Set has 3 dummy variables of the choices (vino, uva,
> coop) from which I create a choice variable with 3 values, after which I
> try to use the NLCONVERT command:
>
> Create;
> if (vino=1) choicei =1;
> if (uva=1)  choicei =2;
> if (coop=1) choicei =3 $
>
> NLCONVERT; Lhs = choicei
> ; Choices = vino1, uva1, coop1
> ; Rhs = PR_M_V,PR_M_U, PR_M_C
> ; Rh2 = vite, vite_sau, AGRITUR, BIO, COMPUTER, SITO_WEB,
> ETA, SEX, ANNISTUD, AGR_STUD, PT_MAGG, PT_MIN, STRANIER,
> LAV_INT, NMEMBR, N0_5, N6_13
> ; Names = choice1,prezzo,
> vite1, vite_sa1, AGRITUR1, BIO1, COMPUTR1, SIT_WEB1,
> ETA1, SEX1, ANNSTUD1, AGR_STU1, PT_MAGG1, PT_MIN1, STRANER1,
> LAV_INT1, NMEMBR1, N0_5_1, N6_13_1 $
>
> I receive the following error message:
>
> Error   1020: Names=List gave  3 names. Needed #lhs+  1+#Rh2= 19
>
> Can anybody suggest what causes the problem?
>
> Many thanks
>
> Alessandro Corsi
>
>
> --
> Questa e-mail è stata controllata per individuare virus con Avast
> antivirus.
> https://protect-au.mimecast.com/s/AvQpCP7LAXfKOr1NkszgKkc?domain=avast.com
>
> _______________________________________________
> Limdep site list
> Limdep at mailman.sydney.edu.au
> https://protect-au.mimecast.com/s/GcX9CQnMBZfk8E1lyFP2uGJ?domain=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/KBHUCROND2uvJkD0zsPFeoD?domain=people.stern.nyu.edu
Email: wgreene at stern.nyu.edu
Editor in Chief: Journal of Productivity Analysis
<https://protect-au.mimecast.com/s/hn1bCVARKgCx7LnkRuJtKyp?domain=springer.com>
<https://protect-au.mimecast.com/s/hn1bCVARKgCx7LnkRuJtKyp?domain=springer.com>
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