Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: concitional means in regression

From   "Maarten Buis" <>
To   <>
Subject   st: RE: concitional means in regression
Date   Fri, 27 Oct 2006 13:18:48 +0200

The real reason why the regression line is not equal to the conditional means is that 
with regression we usually assume that we that these conditional means lie on a 
straight line. In reality this constraint does not have to be true. Also, we can relax
this assumption by adding the variable as a series of dummies. See the example

*----------------begin example--------------------
sysuse auto, clear
recode rep78 1/2=3
tabstat price, stat(mean) by(rep78)
reg price rep78
adjust, by(rep78)
xi: reg price i.rep78
adjust, by(rep78)
*------------------end example-------


Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z434 

+31 20 5986715

-----Original Message-----
From: []On Behalf Of Blau Blau
Sent: vrijdag 27 oktober 2006 13:01
Subject: st: concitional means in regression


by definition the regression line should go through the conditional means of Y-variable in each X-variable. But when I compute conditional means of Y in each category of X the regression line does not go through these conditional means.

In statistical literature concerning regression I have found this explanation: we  work with sample and therefore we do not have all observations of Y variable in each X-variable, and this is the reason why we do not observe the correspondence among measured conditional means of Y variable and predicted conditional means given by regression line.  

Is this explanation correct and just one possible?


*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index