4
$\begingroup$

I am working on a dataset composed of different sites, where several replications were carried out on each site to measure abundance and biomass of observed species. Each site has its own level of protection. The idea would be to carry out a multivariate analysis to show the possible effect of protection levels on the biomass and abundance indices of the sites, while taking into account possible site and species effects. However, the sampling effort is not the same for each site (6 or 8 replications), which is a problem for my further statistical analysis, as it seems to me that the sampling effort should be the same between sites to avoid any statistical bias.

A short overview of the data (only two of the total number of sites are shown in this table):

table_biomass_abundance_Site_Replicate

site replicate biomass abundance
1.1 1 359.4 31
1.1 2 449.9 52
1.1 3 6326.7 50
1.1 4 290.2 30
1.1 5 323.5 29
1.1 6 569.9 18
10.2 123 6513.7 278
10.2 124 24988.4 338
10.2 125 36618.8 309
10.2 126 2418.6 309
10.2 127 6193.6 309
10.2 128 54410.3 155
10.2 129 11290.6 378
10.2 130 12284.9 347

My idea would be to randomly collect 6 transects per site (to have the same sampling effort per site) and to repeat this sampling a large number of times using a for loop.

 # loop random sampling
split_test_site <- split(table_biomass_abundance_Site_Replicate, 
    table_biomass_abundance_Site_Replicate$site)

table_test <- matrix(ncol = 4)
colnames(table_test) <- c("site", "replicate", "biomass", 
                "abundance")

for (i in 1:100){
for (i in 1:length(split_test_site)) {  
  temp_002 <- as.data.frame(split_test_site[[i]])
  temp_003 <- sample_n(temp_002,6)
  table_test <- rbind(table_test, temp_003)
 }
}

This is how my result looks like, with the loop selecting randomly only 6 out of 8 replications per site :

site replicate biomass abundance
10.2 128 54410.3 155
10.2 123 6513.7 278
10.2 129 11290.6 378
10.2 124 24988.4 338
10.2 130 12284.9 347
10.2 125 36618.8 309

This is however not the result I am hoping for, as I would like to repeat the sampling many times for each site and not just have a single run for each site, which gives me a different total biomass and abundance per site each time I rerun my script due to the different random draws.

Any ideas how I could achieve this?

I hope my approach makes sense and is clear enough.

$\endgroup$
1
  • 2
    $\begingroup$ Please say more about how the differential sampling effort is a problem for further statistical analysis. It would help to edit the question to say more about the further statistical analysis you have in mind, as there might be other ways to accomplish your ultimate goal. $\endgroup$
    – EdM
    Commented Mar 11, 2022 at 15:46

1 Answer 1

2
$\begingroup$

... it seems to me that the sampling effort should be the same between sites to avoid any statistical bias.

Differential sampling effort does have implications for modeling, but statistical bias per se probably isn't a problem. Bias is when the expected value of a statistic used to estimate a parameter of a population is different from the actual parameter value. That probably is not the case in your scenario.

If the 6 or 8 replicates are independent and random, then the expected values of biomass and abundance should be the same whether you base them on 6 or 8 replicates, provided that the underlying statistics themselves aren't biased.* The standard errors of the estimates will be slightly lower with 8 replicates, but the mean/expected values should not be different.

You might need to deal with the correlations of values within each of the sites. Treating sites as random effects in some form of a mixed model would allow you to incorporate all of your data efficiently and fairly into a single model. How best to do that would depend on details of your experimental design, the hypotheses you want to test, and reasonable assumptions based on your understanding of the subject matter.

I wouldn't recommend your subsampling approach. Why your code isn't doing what you intend is off-topic on this site, unless there's an underlying issue related to statistical analysis.


*If the statistic itself is biased in a way that depends on the number of observations, like the plug-in estimate of Shannon entropy used to estimate diversity, then you should deal directly with the bias. For example, there are bias-corrected methods for estimating Shannon entropy that take the number of observations into account.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.