DistrStats2: Estimation of the theoretical Mean, Variance, Skewness and...

Description Usage Arguments Value Examples

View source: R/DistrStats2.R

Description

Estimate the theoretical Mean, Variance, Skewness and Kurtosis coefficients of a distribution function, based on the quantile function.

Usage

1
2
3
4
5
6
7
8
9
DistrStats2(
  qDistr,
  lb = 0,
  ub = 1,
  subdiv = 90000,
  rel.tol = 10^-8,
  abs.tol = 10^-8,
  ...
)

Arguments

qDistr

The quantile function (as a function) of the distribution.

lb

A scalar indicating the lower bound of distribution.

ub

A scalar indicating the upper bound of distribution.

subdiv

A scalar indicating the maximum number of subintervals.

rel.tol

A scalar indicating the relative accuracy requested.

abs.tol

A scalar indicating the absolute accuracy requested.

...

Additional named arguments containing the distribution parameters.

Value

A 4-dimensional vector containing the theoretical Mean, Variance, Skewness and Kurtosis coefficients of the distribution.

Examples

1
2
3
4
5
6
7
## Gamma distribution with shape=0.5 and scale=2
DistrStats2(qDistr = qgamma, shape=1,scale=1, lb = 0,ub = 1)

## Zero-inflated (i.e., mixed) distribution with p0=0.7 and
## continuous part given by Gamma distribution with shape=0.5 and scale=2

DistrStats2(qDistr = function(x) qmixed(x,Distr = qgamma, p0=0.7, shape=1, scale=1),lb = 0,ub=1)

itsoukal/anySim documentation built on May 7, 2020, 11:57 p.m.