我需要构建一个模型,根据2个预测变量预测响应 . 我使用R作为软件 .

我用给定的R平方值尝试了以下方法:1 . 线性回归 - 0.556 2.决策树回归 - 0.608 3.线性回归(使用cooks距离法去除异常值后) - 0.6068 4.多项式回归(3的幂)没有异常值的数据 - 0.608

当我检查假设时,我看到下图 - we can see that none of the assumptions seem to be fulfilled.

我应该使用一些不同的回归模型吗?我已经确认我正在处理的数据很干净 .

线性回归的输出摘要如下

Call:
lm(formula = Freight ~ TotalWeight + distance, data = data)

Residuals:
     Min       1Q   Median       3Q      Max 
-1104.56   -60.39   -17.69    28.99  2076.90 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 3.286e+01  7.141e+00   4.601 4.49e-06 ***
TotalWeight 9.666e-02  2.246e-03  43.042  < 2e-16 ***
distance    5.235e-05  2.884e-06  18.152  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 165.1 on 1790 degrees of freedom
  (3 observations deleted due to missingness)
Multiple R-squared:  0.5556,    Adjusted R-squared:  0.5551 
F-statistic:  1119 on 2 and 1790 DF,  p-value: < 2.2e-16

如我们所见,两个自变量都具有极小的p值,即它们具有高度相关性 . 95%的置信区间是

2.5 %       97.5 %
(Intercept) 1.885358e+01 4.686585e+01
TotalWeight 9.225246e-02 1.010612e-01
distance    4.669026e-05 5.800235e-05

有没有什么方法可以用来更好地拟合数据 .