[Limdep Nlogit List] Krinsky-Robb Query plus

William Greene wgreene at stern.nyu.edu
Sun Mar 9 10:32:45 EST 2008


Try this:

Skip$ 
?==============================================
? Simple model
?==============================================
BLOGIT; LHS=WTP;RHS=ONE,BID$
WALD;Start=b;Var=varb;Labels=b1,b2;Fn1=(-b1/b2)
;K&R;Pts=5000$
?===================================================
? Expanded Model - this is generic. For a different 
? model, just change the nameist and the vector c.
? vector c must have the same number of elements as X.
?===================================================
Skip$
NAMELIST ; X=ONE,TRIPSJ,NIGHTSJ,TRIPSAT,BCHQUAL,REEFQUAL,AGE,GENDER $ (not in list),BID
MATRIX   ; c = 
[1/2.16455696/8.56962025/4.67088608/4.44725738/3.47468354/40.4177215/.49367089] $
BLOGIT   ; LHS=WTP;RHS=X, BID$  (BID is the last item in the list.)
CALC     ; K = col(X) ; b_bid = b((k+1)) $
MATRIX   ; beta=b(1:K) $   
CALC; list; welfare= - beta'c / b_bid $ (function for my welfare calculation)
WALD     ; start = b ; var = varb ; labels = k_beta,beta_bid
         ; fn1 = - beta1'c / beta_bid ; k&r ; pts=500$


/Bill Greene

----- Original Message -----
From: "Peter Edwards" <pedwards at UDel.Edu>
To: "Limdep and Nlogit Mailing List" <limdep at limdep.itls.usyd.edu.au>
Sent: Friday, March 7, 2008 7:06:50 PM (GMT-0500) America/New_York
Subject: [Limdep Nlogit List] Krinsky-Robb Query plus

Hello Limdep listers

Again I need some help with what for most should be quite simple.

I would like to run a Krinsky-Robb procedure on a for a set of discrete data (DC CV data). (See below).  With some help I managed to run the K&R for the basic model.

However I am not sure how to input the correct "start" values for the Wald command.
Basic Model (This works fine)

Skip$ 

BLOGIT; LHS=WTP;RHS=ONE,BID$
WALD;Start=b;Var=varb;Labels=b1,b2;Fn1=(-b1/b2)
;K&R;Pts=5000$
 
Expanded Model - this is generic. For a different model, just
change the nameist and the values in c.

Skip$
NAMELIST ; X=ONE,TRIPSJ,NIGHTSJ,TRIPSAT,BCHQUAL,REEFQUAL,AGE,GENDER $ (not in list),BID
MATRIX   ; c = 
[1/2.16455696/8.56962025/4.67088608/4.44725738/3.47468354/40.4177215/.49367089] $
BLOGIT   ; LHS=WTP;RHS=X, BID$
CALC     ; K = col(X) ; b_bid = b((k+1)) $
MATRIX   ; beta=b(1:K) $   
CALC; list; welfare= - beta'c / b_bid $ (function for my welfare calculation)
WALD     ; start = b ; var = varb ; labels = k_beta,beta_bid
         ; fn1 = - beta1'c / beta_bid ; k&r ; pts=500$


So  I am not sure how to se up the code for the Wald expression. Particularly with respect to the number of "Start" values.

I have tried a number of options but basically keep getting the following error message.

Error 242: NLSQ:Wrong number of start values - need one for each label

I am also wondering if there is an easier  way to set up the welfare calculation function. 
Right now I have to manually input the Mean values for the RHS coefficients. (other things did not work).

(I still can't figure out how to plot the CDF and PDF but I'll keep poring thru the manual)

Sorry for seeming so helpless



PETER

++++++++++++++++++++++++++++++++
Peter E.T. Edwards
PhD. Candidate (Marine Policy)
University of Delaware
Graduate College of Marine Studies
Room 312 Robinson Hall
Newark, DE 19716
http://www.ocean.udel.edu/


_______________________________________________
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