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

st: Nonlinear Least Squares and Fixed Effects


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


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/



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