[R] How to resample matrices to test for the robustness of their correlation

chuck.01 CharlieTheBrown77 at gmail.com
Sat Feb 18 05:57:33 CET 2012


see:
?sample
library(vegan)
?rrarefy

not knowing your data structure, its hard to say. 


camilleislande wrote
> 
> Hello 
> I have several populations where I have morphology and diet for each
> individual. I am interested in the correlation between diet and
> morphological distances. However the number of individuals in each
> population ranges from 22 to 80 individuals. I have looked at the
> correlation diet-morphology for each population and (not surprisingly) the
> correlation coefficientis is highly correlated with the number of
> individuals per population. 
> 
> I would like to resample (without replacement) the populations with 60-80
> individuals and get random samplings of  30 individuals (1000 times). I
> would like to get a correlation coefficient distribution against which to
> test the original value of the correlation. 
> 
> I guess it is possible do this, however I have never written a script in R
> and I am not familiar with resampling techniques at all. Any help with
> coding will be greatly appreciated 
> 
> Thank you
> 


--
View this message in context: http://r.789695.n4.nabble.com/How-to-resample-matrices-to-test-for-the-robustness-of-their-correlation-tp4397915p4399189.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list