Giter VIP home page Giter VIP logo

rtails's Introduction

rtails: Simulate heavy-tailed deviations

Installation

install.packages("remotes")
remotes::install_github("sebpardo/rtails")

Introduction to rtails

The rtails package provides functions to easily obtain heavy-tailed multiplicative random deviates (i.e., positive only, centered around 1). While its primary aim is to simulate heavy-tailed recruitment deviations, these functions could also be used for other applications as well.

The heavy-tailed random deviates are generated using four distributions:

  • Normal mixture (i.e. normal with sporadic wider normal draws): rnorm_tails()
  • Pareto: rpareto_tails()
  • Student-t: rst_tails()
  • Generalized Extreme Variance: rgev_tails()

Where possible, functions are analytically bias-corrected around a mean of 1 by default. However, this correction is not always applicable (e.g. Student-t and GEV). We therefore also allow all functions to be bias corrected using the drawn sample mean (sample_bias_correct). All functions also take a seed argument so that different parameterizations of each distribution using a given seed can be more directly comparable.

We also provide the mutate_tails() function that converts an existing set of normal random deviates into deviates with a Student-t or Pareto distribution, and allows for bootstrapping.

Lastly, the plot_tails() function allows for easy visualization of the generated random deviates.

See the vignette for more details.

rtails's People

Contributors

seananderson avatar sebpardo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.