libstable4u-package {libstable4u}R Documentation

libstable4u: Fast and accurate evaluation, random number generation and parameter estimation of skew stable distributions.

Description

libstable4u provides functions to work with skew stable distributions in a fast and accurate way [1]. It performs:

Details

Author(s)

Javier Royuela del Val, Federico Simmross Wattenberg and Carlos Alberola López;

Maintainer: Javier Royuela del Val jroyval@lpi.tel.uva.es

References

Examples

# Set alpha, beta, sigma and mu stable parameters in a vector
pars <- c(1.5, 0.9, 1, 0)

# Generate an abscissas axis and probabilities vector
x <- seq(-5, 10, 0.05)
p <- seq(0.01, 0.99, 0.01)

# Calculate pdf, cdf and quantiles
pdf <- stable_pdf(x, pars)
cdf <- stable_cdf(x, pars)
xq  <- stable_q(p, pars)

# Generate random values
set.seed(1)
rnd <- stable_rnd(100, pars)
head(rnd)

# Estimate the parameters of the skew stable distribution given
# the generated sample:

# Using the McCulloch's estimator:
pars_init <- stable_fit_init(rnd)

# Using the Koutrouvelis' estimator, with McCulloch estimation
# as a starting point:
pars_est_K <- stable_fit_koutrouvelis(rnd, pars_init)

# Using maximum likelihood estimator:
pars_est_ML <- stable_fit_mle(rnd, pars_est_K)

# Using modified maximum likelihood estimator (see [1]):
pars_est_ML2 <- stable_fit_mle2d(rnd, pars_est_K)

[Package libstable4u version 1.0.4 Index]