简体   繁体   中英

Is it appropriate to calculate r-squared of robust regression using rlm

I am using rlm function from MASS to perform a robust regression. Unlike lm,the summary function does not return a valure for r-squared.

Is therefore appropriate to calculate this using 1 - sum(residual^2)/(sum((Y-mean(Y))^2)?

(apologies for the equation, I could not figure how to write this in a better formatted way)

Robust Linear Regression(rlm) is used instead of Linear Regression(lm) when data has many outliers; also it can be used for detecting influential observations. Robust regression uses Iteratively Reweighted Least Squares(IRLS) for Maximum Likelihood Estimation(MLE) whereas linear regression uses Ordinary Least Squares(OLS), which is the reason R-squared(coefficient of determination) is returned by lm() and not by rlm().

Now coming to the appropriateness, it is not an appropriate measure to assess the fit for robust regression since it involves computing squared loss=sum(residual^2)=sum(predicted values-observed values)^2 in the formula for r-squared. Since robust regression involves dealing with data containing many outliers, the metric will result in absurd value due to large values produced from residuals for outliers which are large and also squared!
This is the reason why absolute loss=(predict-actual) is used to asses fit when outliers are involved.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM