[R] how to test robustness of correlation

Berton Gunter gunter.berton at gene.com
Thu Jan 26 17:12:09 CET 2006


Below



> 
> Hi, Berton: 
> thanks for getting back to me. 
> 
> I played around cor.rob().  Yes, I can get a robust 
> correlation coefficient matrix based on mcd or mve outlier 
> detection methods.   
> 
> I have two further questions: 
> 
> 1) How do I get a p value of the robust r? 

A p-value for what? That r==0 ?

> 2) What I mean by resampling is "leave one out" procedure, to 
> get a confidence interval of r.  Do you know if there is any 
> package in R to do it?  I suppose I could code it myself,  
> but it is nice if there is already one. 
> 
> thanks. 
> Yang 

**An** answer to both is the same -- bootstrap it. "Leave one out" is not
resampling (/bootstrapping). It is usually referred to as "jackknifing," but
that uses more specific ways of doing things than the analogy implies.
Efron's little SIAM book on "The jackknife, bootstrap, etc. explains them
and their relationships in detail. It is trivial to bootstrap cor.rob in
base R using sample() (from the <x,y> **pairs** -- or n-tuples generally --
not the marginals separately ). If you insist on a package, "boot" is the
obvious one -- why did you not attempt to find it yourself? Either way,
expect it to take a while for a decent size resample (e.g. >1e4).

-- Bert




More information about the R-help mailing list