是否有任何可能的方法可以从稳健回归中获得 95% CI 的回归系数,如在 MASS::rlm 中实现的那样?
# libraries needed
library(MASS)
library(stats)
library(datasets)
# running robust regression
(x <-
MASS::rlm(formula = scale(Sepal.Length) ~ scale(Sepal.Width),
data = iris))
#> Call:
#> rlm(formula = scale(Sepal.Length) ~ scale(Sepal.Width), data = iris)
#> Converged in 5 iterations
#>
#> Coefficients:
#> (Intercept) scale(Sepal.Width)
#> -0.03728607 -0.14343268
#>
#> Degrees of freedom: 150 total; 148 residual
#> Scale estimate: 1.06
# getting confidence interval for the regression coefficient
stats::confint(object = x,
parm = "scale(Sepal.Width)",
level = 0.95)
#> 2.5 % 97.5 %
#> scale(Sepal.Width) NA NA