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: theory reg vs. qreg


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: theory reg vs. qreg
Date   Mon, 29 Apr 2013 14:15:01 +0200

On Mon, Apr 29, 2013 at 2:08 PM, Kasal Roman wrote:
> Later I will put it here more detailed but its quite clear that on the
> same dataset with a simple regression we get:
>
> Y1=Y2 when replaced "a2" for "mean(x)" in the equation

Let me give you a simple counter example:

*------------------ begin example ------------------
sysuse auto, clear
reg gear_ratio
reg price mpg
sum mpg, meanonly
di _b[_cons] + r(mean)*_b[mpg]
*------------------- end example -------------------
* (For more on examples I sent to the Statalist see:
* http://www.maartenbuis.nl/example_faq )

I am using the same dataset (auto.dta), but when I replace a2 with the
mean(mpg) I get the mean price, and this (trivially) is not the same
as the mean gear ratio. So your statement is only true if you are
using the same dependent variable. Since you are using different
symbols for the dependent variable in both models we have to assume
you are using different dependent variables, and thus that your
statement is trivially wrong.

-- Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   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