0

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?

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
shuixia100
  • 3
  • 1
  • 4

2 Answers2

2

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)
faceman
  • 1,318
  • 11
  • 20
Bob
  • 21
  • 1
0

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