Pextinct: Cumulative probability of extinction at the end of the...

View source: R/Pext.R

PextinctR Documentation

Cumulative probability of extinction at the end of the simulation

Description

Calculates the cumulative probability of extinction and statistically compares each scenario

Usage

Pextinct(
  data,
  project,
  scenario,
  ST = FALSE,
  save2disk = TRUE,
  dir_out = "DataAnalysis/Pextinct"
)

Arguments

data

The long format of run (lrun, the second element) of the output from collate_run

project

The Vortex project name

scenario

The ST Vortex scenario name or the scenario that should be used as baseline if simulations were not conducted with the ST module

ST

Whether files are from sensitivity analysis (TRUE), or not (FALSE, default)

save2disk

Whether to save the output to disk, default: TRUE

dir_out

The local path to store the output. Default: DataAnalysis/Pairwise

Details

Pextinct calculates the cumulative probability of extinction by calculating the proportion of runs in which a population goes extinct for each scenario.

Pextinct then compares each scenario by calculating the strictly standardised mean difference (SSMD, Zhang 2007) and reports this statistic with its associated p values. Raw data are also reported.

Value

A list with two elements, a table (data.table) with the mean Probability of extinction and its SD, the SSMD and its associated p-value for each scenario and population, and a table (data.table) with each iteration where extinction is coded as one (and zero for no extinction)

References

Zhang, X. D. 2007. A pair of new statistical parameters for quality control in RNA interference high-throughput screening assays. Genomics 89:552-561.

Examples

# Using Pacioni et al. example data. See ?pac.run.lhs for more details.
data(pac.run.lhs)
Pext <- Pextinct(pac.run.lhs[[2]], project='Pacioni_et_al',
  scenario='ST_Classic', ST=TRUE, save2disk=FALSE,
  dir_out='DataAnalysis/Pextinct')

carlopacioni/vortexR documentation built on May 6, 2022, 12:07 p.m.