Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: number of constraints for cnsreg


From   Christopher Baum <[email protected]>
To   "<[email protected]>" <[email protected]>
Subject   Re: st: number of constraints for cnsreg
Date   Thu, 11 Jul 2013 00:29:57 +0000

<>

> 
> I am trying to run the following constrained regression: 
> 
> cnsreg Y Y_t-1 FE_1 - FE_3000 FE_1xX_t-1 - FE_3000xX_t-1 Z_t-1
> 
> where FE_1-FE_3000 are fixed effects (panel data set with 3000 cross-section units), which I then interact with the variable X_t-1. I have to run this regression twice using one of the following set of constraints each time:
> 
> constraint define 1 FE_1xX_t-1 = 0
> constraint define 2 FE_2xX_t-1 = 0
> ...
> constraint define 3000 FE_3000xX_t-1
> 
> and 
> 
> constraint define 1 FE_2xX_t-1 = FE_1xX_t-1
> constraint define 2 FE_3xX_t-1 = FE_1xX_t-1
> ...
> constraint define 2999 FE_3000xX_t-1 = FE_1xX_t-1
> 
> However, Stata 12.1 only accepts up to 1999 constraints according to the 'constraint define' function. Any ideas of how I could overcome this limitation?



Look at the algebra. The first constrained regression is just

regress  Y Y_t-1 FE_1 - FE_3000  Z_t-1

and the second one, in which you constrain the interactions of all FEs with X to be equal, would seem to be a model in which you just run

regress  Y Y_t-1 FE_1 - FE_3000 X  Z_t-1

You don't need cnsreg to estimate either of these.


Kit


Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                             An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
  An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html
                                                                                                      http://www.crup.com.cn/Item/111779.aspx     


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index