Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: areg with no constant?


From   Hawal Shamon <hawalshamon@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
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: nschwart@umich.edu
> Date: Mon, 11 Jun 2012 16:12:43 -0400
> Subject: st: areg with no constant?
> To: statalist@hsphsun2.harvard.edu
>
> 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index