Readme.md

{quantrra}

{quantrra} is a package for reproducible risk assessment developed for the statistical software R.

Installing quantrra

You can install quantrra development version from GitHub using the following code in your R console (make sure you have R > 3.5):

# make sure you have the package devtools installed
devtools::install_github('spablotemporal/quantrra')

Getting started

quantrra was developed for the implementation of stochastic risk assessment models as an open access alternative to software such as @Risk. quantrra provides a set of functions to be used in R, and also offers a more user friendly interface trough shiny that can be accessed using:

quantrra::run_quantrra()

Main usage

The main usage for quantrra is to simulate stochastic events using the function ra_run(), which requires two arguments:

A model file is just a data.frame with rows that represent inputs and outputs of the model. The columns include ID, label, whether the event is input or output, a distribution (for inputs), and a formula (for outputs).

The model file then can created in using the shiny interface, R or other software editors. The idea behind model files is that can be easy to share and modify.

# Load a model file from the package
M <- quantrra::OIRSA_M
# Run the model 5000 times
Mo <- ra_run(m = M, nsim = 5000)
# Visualize the results:
ra_plot_dist(Mo$P)

Other features

quantrra also provides functions to evaluate the model and creating stratified models to estimate regional or strata-specific risk estimation of events. see the package example for more information.



jpablo91/QuantRRA documentation built on July 3, 2024, 10:46 p.m.