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

st: RE: Nonlinear Least Squares and Fixed Effects

From   "Chavis, Larry Wilson" <[email protected]>
To   <[email protected]>
Subject   st: RE: Nonlinear Least Squares and Fixed Effects
Date   Tue, 20 Apr 2004 10:37:09 -0700


Thanks for your input.  Greene's series of papers on nonlinear models and fixed effects is certainly helpful.  I'll have to go over the paper more carefully, but initially it seems I may be OK in terms of consistency since the data covers a larger number of time periods.  It seems that these models generally get better as T increases (but that is just a first guess).  Greene certainly seems to be optimistic that panel data and nonlinear models can coexist.

As far as the other issues goes, de-meaning would seem to give me more flexibility.  Maybe I could wipe out the fixed effects and then use the -nlfcns- to estimate the nonlinear model.  -cnsreg- is close to what I need but it only accepts linear constraints and I would like to add a nonlinear one.

Thanks again,

Larry Chavis
Ph.D. Student
Stanford Graduate School of Business
[email protected]

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Mark Schaffer
Sent: Tuesday, April 20, 2004 8:10 AM
To: [email protected]
Subject: Re: Nonlinear Least Squares and Fixed Effects


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

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

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.


Subject:        	st: Nonlinear Least Squares and Fixed Effects
Date sent:      	Mon, 19 Apr 2004 13:28:34 -0700
From:           	"Chavis, Larry Wilson" <[email protected]>
To:             	<[email protected]>
Send reply to:  	[email protected]

> 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:
> *
> *
> *

Prof. Mark E. Schaffer
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
*   For searches and help try:

*   For searches and help try:

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