R language Access Menu

Title Text Both  

Robust regression using robustbase package

The function ltsReg of robustbase package can also be used for this purpose: 

Code:

> library(robustbase)
> mod = ltsReg(bwt~., bwdf)
> summary(mod)

Call:
ltsReg.formula(formula = bwt ~ ., data = bwdf)

Residuals (from reweighted LS):
       Min         1Q     Median         3Q        Max 
-1359.4317  -433.6613     0.3035   425.9867  1231.7515 

Coefficients:
          Estimate Std. Error t value             Pr(>|t|)    
Intercept 3075.325    295.856  10.395 < 0.0000000000000002 ***
age        -12.302      9.480  -1.298             0.196080    
lwt          4.923      1.632   3.016             0.002944 ** 
race2     -522.196    140.295  -3.722             0.000266 ***
race3     -322.416    108.716  -2.966             0.003442 ** 
smoke1    -382.934     99.977  -3.830             0.000178 ***
ptl       -159.639    103.410  -1.544             0.124457    
ht1       -612.800    189.161  -3.240             0.001433 ** 
ui1       -492.352    133.020  -3.701             0.000287 ***
ftv         10.121     43.713   0.232             0.817177    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 607.4 on 175 degrees of freedom
Multiple R-Squared: 0.2942,     Adjusted R-squared: 0.2579 
F-statistic: 8.104 on 9 and 175 DF,  p-value: 0.000000000516 


References:
Peter Rousseeuw, Christophe Croux, Valentin Todorov, Andreas Ruckstuhl, Matias Salibian-Barrera, Tobias Verbeke, Manuel Koller, Martin Maechler (2015). robustbase: Basic Robust Statistics. R package version 0.92-4. URL http://CRAN.R-project.org/package=robustbase
 


    Comments & Feedback