Leeds, Mark (IED)
2007-Oct-03 21:48 UTC
[R] Forcing zero intercept in two predictor case - stat question not R question
When one is doing simple regression and needs to force a zero intercept ( for whatever reason. I realize it's a controversial issue ), then subtracting the means of the left hand side and the right hand side from themselves does the trick. Does anyone know if there is a similar trick when the RHS has two variables ? Thanks. -------------------------------------------------------- This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}
John Fox
2007-Oct-03 22:05 UTC
[R] Forcing zero intercept in two predictor case - stat questionnot R question
Dear Mark, -------------------------------- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox --------------------------------> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Leeds, Mark (IED) > Sent: Wednesday, October 03, 2007 5:49 PM > To: r-help at stat.math.ethz.ch > Subject: [R] Forcing zero intercept in two predictor case - > stat questionnot R question > > When one is doing simple regression and needs to force a zero > intercept ( for whatever reason. I realize it's a > controversial issue ), then subtracting the means of the left > hand side and the right hand side from themselves does the > trick. Does anyone know if there is a similar trick when the > RHS has two variables ? Thanks.Yes, express all three variables as deviations from their means. (This follows from the observation that the LS regression surface goes through the centroid of the variables.) Regards, John
Rolf Turner
2007-Oct-03 22:35 UTC
[R] Forcing zero intercept in two predictor case - stat question not R question
On 4/10/2007, at 9:48 AM, Leeds, Mark (IED) wrote:> When one is doing simple regression and needs to force a zero > intercept > ( for whatever reason. I realize it's a controversial issue ), > then subtracting the means of the left hand side and the right hand > side > from themselves does the trick. Does anyone know if there is a > similar trick when the RHS has two variables ? Thanks.You are suffering from a bit of confusion here. There is a great difference between forcing the intercept to be 0 as in y ~ x1 + x2 - 1, and transforming (centering) the variables involved so that the intercept ***is*** 0. The latter fits exactly the same model as if you fitted it using the original variables (except that it is generally a bit more numerically stable). The former is what is ``controversial'' (i.e. likely to be misguided). cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confidenti...{{dropped}}