当前位置:网站首页>How to perform robust regression in R

How to perform robust regression in R

2022-06-24 18:38:00 Mrrunsen

When there are outliers or influential observations in the dataset we are using , Robust regression is an alternative to ordinary least squares regression .

In order to be in R Performing robust regression in , We can use MASS In bag rlm() function , It uses the following syntax :

The following step-by-step example shows how to R Performs robust regression for a given data set .

The first 1 Step : Create data
First , Let's create a dummy data set to use :

df <- data.frame(x1=c(1, 3, 3, 4, 4, 
原网站

版权声明
本文为[Mrrunsen]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206241324227488.html