Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Nonlinear Least Squares and Fixed Effects


From   "Mark Schaffer" <M.E.Schaffer@hw.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Nonlinear Least Squares and Fixed Effects
Date   Tue, 20 Apr 2004 16:09:48 +0100

Larry,

Is your estimation going to be consistent?  Sometimes, with fixed 
effects models, the incidental parameters problem makes the estimator 
inconsistent.

Bill Greene has a short paper about this on his website that also has 
some useful reading:

http://www.stern.nyu.edu/~wgreene/fixedeffects.doc

In your first example, it looks like you might be able to de-mean the 
data by hand to wipe out the fixed effects and then do a constrained 
linear estimation with -cnsreg-.  

Hope this helps.

--Mark

Subject:        	st: Nonlinear Least Squares and Fixed Effects
Date sent:      	Mon, 19 Apr 2004 13:28:34 -0700
From:           	"Chavis, Larry Wilson" <chavis_larry@gsb.stanford.edu>
To:             	<statalist@hsphsun2.harvard.edu>
Send reply to:  	statalist@hsphsun2.harvard.edu

> 
> 
> Hi,
>  
> I am working with panel data and I am trying to impose some nonlinear constraints on an equation with a large number of fixed effects.  So far I have been unsuccessful and I have a couple of questions in this regard.  Any advice you could provide would be greatly appreciated.
>  
>  
> 1) For one specification I have run the following linear regression -xtreg lnunit dummy1 dummy2 dummy3 week2-week104, fe i(id)-.  Basically I have about 8,000 products (id's) that I have data on for 104 weeks.  I would also like to estimate this while constraining the coefficients on dummy1 
dummy2 and dummy3 in a nonlinear fashion (i.e. _b[dummy1] = (_b[dummy2]^2) / _b[dummy3].  I am able to test the restriction post-estimation using -testnl-, but I would like to incorporate the restrictions into the regression.  Any ideas?
>  
>  
> 2) Similarly I could aggregate the data by country so that the panel data now represents 43 countries over 104 weeks.  Now the data is a manageable size to use the -nl- command and set up the regression using -nlfcns-.  The only problem is that I am not sure how to set up the fixed effects 
dummies in the equation.  The only thing I can think of is to us the brute force method and just type in something like - '1' = $B1 * week1 + $B2 * week2 + $B3 week3 + ......-.  This seems a little cumbersome since I have over 140 fixed effect dummies.  I would also have to type a similarly long 
list to declare and initialize the parameters. I thought of using -for num- to declare and initialize the sequence of variables, but I am still stuck when it comes to the actual equation.  Is there something akin to a summation sign that I could use in this situation?
>  
>  
> Thanks,
> Larry Chavis 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/


Prof. Mark E. Schaffer
Director
Centre for Economic Reform and Transformation
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS  UK
44-131-451-3494 direct
44-131-451-3008 fax
44-131-451-3485 CERT administrator
http://www.som.hw.ac.uk/cert
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index