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: areg with no constant?


From   Hawal Shamon <[email protected]>
To   <[email protected]>
Subject   RE: st: areg with no constant?
Date   Tue, 12 Jun 2012 10:13:39 +0200

Hi Nate,
time demean the data by hand and estimate using OLS (without a constant). This gives you the FE-estimates as well. 
Example for a bivariate model with vary and varx1:

sort studentid
by studentid: egen mvary = mean(vary)by studentid: egen mvarx1 = mean(varx1)

gen tvary = vary - tvarygen tvarx1 = varx1 - tvarx1
reg tvary tvarx1, noconstant
Best,
Hawal


----------------------------------------
> From: [email protected]
> Date: Mon, 11 Jun 2012 16:12:43 -0400
> Subject: st: areg with no constant?
> To: [email protected]
>
> Dear Stata Users,
>
> I am running a regression that includes fixed effects at the student
> level. I have been using areg and absorbing the variable studentid.
> However, I am now trying to run some interaction results where I want
> to saturate the model and run without a constant. The areg command
> does not seem to accept the noconstant option ("option noconstant not
> allowed"), however when I try to use xi: reg with i.studentid, the
> command takes forever to run and then doesn't work because it
> overloads stata's variable capacity. Does anyone have any advice?
>
> Thanks very much,
> Nate Schwartz
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
 		 	   		  
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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