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, 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 <>
To   <>
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

> From:
> Date: Mon, 11 Jun 2012 16:12:43 -0400
> Subject: st: areg with no constant?
> To:
> 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:
> *
> *
> *
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index