Home Comments Thread
New Thread

2 Comments

giscus-bot giscus-bot 2022-12-16 16:01:49
Guest *kin233* @ 2009-03-11 14:29:55 originally posted:

Hi,  

When i have a first look at the least median of square(i never heard about that before), my first impression is that "is it the same as the median regression?"  

However, when i look at the figure 2, i found that they shouldn't be the same ! My eyeball estimation told me that the median regression line should be similar to the OLS!

Then I tried to use the "quantreg" package by Roger Koenker to estimate the median regression line to figure 1 and figure 2.

In figure 1, the median regression line is "similar" to the LMS , while in figure 2, it is "similar" to the OLS!

The median regression is estimated by  Min sum of absolute error, e.g.  Min(b)  sum|yi-xib|

I think the least median of square shouldn't be the same thing right? Would you mind to explain a little bit about LMS or provide some information about the LMS ?

The code to plot the median regression in addition to yours:

#require the quantreg package
library(quantreg)

add this to figure 1 and 2.

abline(rq(y ~ x), col = "green")

yihui yihui 2022-12-16 16:01:51

LMS: minimize median(residual squares)
OLS: minimize sum(residual squares)

Originally posted on 2009-03-11 18:08:27

giscus-bot giscus-bot 2022-12-16 16:01:50
Guest *kin233* @ 2009-03-11 14:33:58 originally posted:

Reference to Median Regression(Quantile Regression)

Koenker, Roger and Gilbert Bassett. 1978. “Regression Quantiles.” Econometrica. January, 46:1, pp. 33–50.

Sign in to join the discussion

Sign in with GitHub