[Limdep Nlogit List] Problem with maximize
William Greene
wgreene at stern.nyu.edu
Wed Jan 9 06:19:21 EST 2008
Bob. Structure it this way.
NAMELIST ; Z = one,agew3,agewsq, etc. $
NAMELIST ; X = one,workw3,agew3, etc. $
CALC ; KZ = Col(Z) ; KX = Col(X) $
MATRIX ; gamma0 = 7.9, 0.003,-0.3, etc. $
MATRIX ; beta0 = the start values, incl. constant $
CALC ; se0= the starting value ; sew0 = the starting value $
MAXIMIZE ; Labels = KZ_G, KX_B, se, sew $
; start = gamma0,beta0,se0,sew0
; fcn = bx = b1’X
| gz = g1’Z
| P1a = sew/(se*se)
| P1b = P1a*(learnw3-bx)
| P1c = gz + P1b
| P2 = 1 - (sew*sew)/(se*se) ? Not always > 0 !
| P3 = sqr(P2)
| PhiA = Phi(P1c/P3)
| ge = (N01((learnw3 - bx)/se))/se
| L1 = log(PhiA+0.00001)
| L2 = log(1.00001-PhiA)
| L3 = log(ge+0.00001)
| divor97*(L1 + L3) + (1-divor97)*(L2 + L3) $
If it goes down, you should be able to find the problem more easily.
Note the warning about possible numerical problems even if it does
compile.
/Bill Greene
----- Original Message -----
From: "Robert Nakosteen" <nakosteen at som.umass.edu>
To: limdep at limdep.itls.usyd.edu.au
Sent: Monday, January 7, 2008 10:05:04 AM (GMT-0500) America/New_York
Subject: [Limdep Nlogit List] Problem with maximize
Greetings all,
The following maximization routine was "test run" with a dummy data file.
Now, with the only changes being a real data file and new variable names,
the program does not run. Here is the program, and the error messages. Any
ideas?
maximize; fcn = bx = b0 + b1*workw3+b2*agew3+b3*agewsq+b4*Profw3+b5*Sal...
| gz = g0 + g1*agew3+g2*agewsq+g3*young+G4*house+G5*learnw3+G6*l
...
| P1a = sew/(se*se)
| P1b = P1a*(learnw3-bx)
| P1c = gz + P1b
| P2 = 1 - (sew*sew)/(se*se)
| P3 = sqr(P2)
| PhiA = Phi(P1c/P3)
| ge = (N01((learnw3 - bx)/se))/se
| L1 = log(PhiA+0.00001)
| L2 = log(1.00001-PhiA)
| L3 = log(ge+0.00001)
| divor97*(L1 + L3) + (1-divor97)*(L2 + L3);
labels = b0,b1,b2,b3,b4,b5,b6,b7,g0,g1,g2,g3,g4,g5,g6,g7,g8,se,sew;
...
start = 7.9,0.003,-0.3,0.003,1.9,1.7,0.8,0.2,.3,-.02,0.0,0.01,-0.12,
...
Error: 759: Name in expr not label,variable,scalar,matrix,list,or FNi.
Error: 588: Error translating function in optimization command.
Error: 589: Error is in LEARNW3-BX
Error: 69: WALD,NLSQ,MAXIMIZE. Cannot translate the listed string
--> Stop$
Thank you in advance.
Robert A. Nakosteen
Professor
Isenberg School of Management
University of Massachusetts/Amherst
Amherst, MA 01003
Telephone: 413-545-5687
FAX: 413-545-3858
Fin-opmgtfaculty mailing list
Fin-opmgtfaculty at som.umass.edu
https://list.umass.edu/mailman/listinfo/fin-opmgtfaculty
_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au
--
Professor William Greene
Department of Economics
Stern School of Business
New York University
44 West 4th St., Rm. 7-78
New York, NY 10012
http://www.stern.nyu.edu/~wgreene
212.998.0876
More information about the Limdep
mailing list