How to calculate the checkerboard score (C-score) under a null model by vegan package in R

StackOverflow https://stackoverflow.com/questions/15059797

  •  11-03-2022
  •  | 
  •  

I recently want to follow the checkerboard score under a null model method to calculate the pvalue for co-occurrence analysis as adopted by this paper "Using network analysis to explore co-occurrence patterns in soil microbial communities".

Unfortunately, the usage of commands and arguments of vegan package was not well described in the paper.

I believe there must be some expert of vegan package in R to do such co-occurrence analysis based on checkerboard score under a null model.

Could any one help with the scripts or the commands and arguments I should use to calculate the C-score under a null model in R?

Will this C-score thing return me a matrix of pvalue that I could use to indicate the co-occurrence?

有帮助吗?

解决方案 2

this should give a quick estimate of C-score

library(vegan)
library(bipartite)
C.score(species, normalise=T, FUN=mean, na.rm=T)->cscore.speciesN
C.score(species, normalise=F, FUN=mean, na.rm=T)->cscore.speciesS
cscore.speciesN
cscore.speciesS

其他提示

I guess this may answer your question:

library(vegan)

library(bipartite)

null.model <- oecosimu(species, bipartite::C.score, "swap", burnin=100, thin=10, statistic="evals", nsimul=10000) #where species is you species by sites matrix

print(null.model)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top