MyNixOS website logo
Description

Estimators and Plots for Gamma and Pareto Tail Detection.

Estimators for two functionals used to detect Gamma, Pareto or Lognormal distributions, as well as distributions exhibiting similar tail behavior, as introduced by Iwashita and Klar (2023) <doi:10.1111/stan.12316> and Klar (2024) <doi:10.1080/00031305.2024.2413081>. One of these functionals, g, originally proposed by Asmussen and Lehtomaa (2017) <doi:10.3390/risks5010010>, distinguishes between log-convex and log-concave tail behavior. Furthermore the characterization of the lognormal distribution is based on the work of Mosimann (1970) <doi:10.2307/2284599>. The package also includes methods for visualizing these estimators and their associated confidence intervals across various threshold values.

Integration of C++ in Tailplots

Tailplots uses the R package Rcpp to integrate C++ code with R. One advantage of Rcpp is its extensive documentation, and many guides are available.

Structure of the Package

Under R/ you’ll find the package’s R code and two additional files, R/zzz.R and R/RcppExports.R. The first file sets the imports for the Tailplots package and can probably be removed now. The second contains the wrapper functions that connect the C++ code to R and shouldn’t be edited by hand (see the workflow below).

In the src/ folder you’ll find the C++ code. The only files that should be edited by hand are gamma.cpp and pareto.cpp; the other files are generated automatically by Rcpp. Any C++ function that you want to export and make available after devtools::load_all() must have the line // [[Rcpp::export]] immediately above the function definition. Include the following at the beginning of each C++ file:

#include <Rcpp.h>
using namespace Rcpp;

The rest is standard C++ code.

Note that the DESCRIPTION file contains:

Imports:
    Rcpp
LinkingTo:
    Rcpp

Workflow

The usual R package workflow described in R Packages (2e)R Packages workflow diagram is supplemented by the command Rcpp::compileAttributes(). To access newly written or modified C++ and R functions from the terminal, run:

Rcpp::compileAttributes()
devtools::load_all()

Everything else remains the same.

Metadata

Version

0.1.1

License

Unknown

Platforms (76)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows