# [R] questions about performing Robust multiple regression using bootstrap

Fox, John jfox at mcmaster.ca
Mon Feb 26 16:47:23 CET 2018

```Dear Faiz,

Bootstrapping R^2 using Boot() is straightforward: Simply write a function that returns R^2, possibly in a vector with the regression coefficients, and use it as the f argument to Boot(). That will get you, e.g., bootstrapped confidence intervals for R^2. (Why you want that is another question.) See the example in ?Boot that shows how to bootstrap the estimated error variance (without the regression coefficients).

On the other hand, bootstrap hypothesis tests aren't entirely straightforward (and you might ask yourself why you need them when you have bootstrap confidence intervals). If memory serves, there's a discussion in the Davison  and Hinkley reference in ?Boot (I don't have a copy of the book at my current location, so I can't check). There's also a brief discussion in Sec. 21.4 of my Applied Regression Analysis and Generalized Linear Models, 3rd ed.

I hope this helps,
John

-----------------------------
John Fox, Professor Emeritus
McMaster University
Web: socialsciences.mcmaster.ca/jfox/

> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of faiz rasool
> Sent: Monday, February 26, 2018 6:30 AM
> To: R-help at r-project.org
> Subject: [R] questions about performing Robust multiple regression using
> bootstrap
>
> Dear list,
>
> I am slightly confused about how I  can do the following in R.
>
> I want to  perform   robust multiple regression. I’ve used the Boot
> function in CAR package to find confidence intervals and standard errors.
> Inadition to these, I want to find the  robust estimates  for the F test and  r-
> square. Finally, I  would like to know the significance levels of bootstrap results.
>
> Below I  explain my question  using commented R code.
>
> [1] reg=lm(a~b+c+d+e) # perform multiple regression.
> [2] library(car) #load the car package.
> [3] bootstrap=Boot(reg) #perform bootstrap using the Boot function in car
> package.
> [4] summary(bootstrap) #show the results of bootstrap.
> [5]now  I would like to type a code that can give me robust estimates  of R-
> square, F tests, and  significance  levels for coefficients and f.
>
>
> Thanks for any help.
>
> Regards,
> Faiz.
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
```