Jo.res | R Documentation |
This function allows the replication of the results presented in Lagat et al. (2021a). Executing
Jo.res()
therefore gives these outputs that are saved as .RDS
files in msco
. If the codes that
produced these (saved) outcomes are desired, the codes below are made available.
Jo.res()
Returns all the results presented in Lagat et al. (2021a). To replicate these results, execute the following code:
RNGkind(sample.kind = "Rejection") set.seed(39) my.path <- system.file("extdata/myCSVs", package = "msco") setwd(my.path) my.files <- gtools::mixedsort(list.files(path = my.path, pattern = ".csv")) Lag.res <- msco::mJo.eng(my.files, algo = "sim2", metric = "raw", Archetypes = FALSE, AICs = FALSE, Delta_AIC = FALSE, datf.Delta_AIC = TRUE, param_hist = TRUE, params = FALSE, my.r2 = FALSE, my.r2.s = TRUE, best.mod2 = TRUE, best.mod3 = TRUE, params_c.i = TRUE );Lag.res
Caveat: The above code can take approximately 8 minutes to execute. It took 8.210296 minutes to run
(and output results) on a 64 bit system with 32 GB RAM and i7-11800H @
2.30GHz processor.
Fig. 3 can be replicated using:
grDevices::dev.new() msco:::nullmod_archs()
Fig. S1 can be replicated using:
my.path <- system.file("extdata/myCSVs", package = "msco") setwd(my.path) my.files <- gtools::mixedsort(list.files(path = my.path, pattern = ".csv")) grDevices::dev.new() msco:::richness.variances(my.files)
The function Jo.res is not for general use. We included it in this package to help the readers of Lagat et al. (2021a) paper, who may want to get a deeper understanding of how the results presented in this paper were arrived at. It also allows deeper scrutiny of Lagat et al. (2021a)'s findings.
Lagat, V. K., Latombe, G. and Hui, C. (2021a). A multi-species co-occurrence
index to avoid type II errors in null model testing. DOI: <To be added>
.
## Not run:
ms.res <- msco::Jo.res()
ms.res$r2.s
ms.res$best.mod2
ms.res$best.mod3
ms.res$params_c.i
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.