Re: [R] questions about performing Robust multiple regression using bootstrap

2018-02-26 Thread Fox, John
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
Hamilton, Ontario, Canada
Web: socialsciences.mcmaster.ca/jfox/


> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of faiz rasool
> Sent: Monday, February 26, 2018 6:30 AM
> To: R-help@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@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.
__
R-help@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.


Re: [R] questions about performing Robust multiple regression using bootstrap

2018-02-26 Thread Bert Gunter
Although this is superficially a question about R code, it heavily depends
on exactly what you mean by "robust" and "robust tests," which are
statistical issues, not R coding issues. As such, it is off topic here. So
I would suggest that you post on a statistical site like
stats.stackexchange.com instead. While there, I suggest you also ask
whether what you want to do makes any sense (I don't think it does).

Cheers,
Bert



Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Mon, Feb 26, 2018 at 3:30 AM, faiz rasool  wrote:

> 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@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.
>

[[alternative HTML version deleted]]

__
R-help@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.