# ExoticStatistics: Exotic Statistical Methods Decorator In distr6: The Complete R6 Probability Distributions Interface

## Description

This decorator adds methods for more complex statistical methods including p-norms, survival and hazard functions and anti-derivatives. If possible analytical expressions are exploited, otherwise numerical ones are used with a message.

## Details

Decorator objects add functionality to the given Distribution object by copying methods in the decorator environment to the chosen Distribution environment.

All methods implemented in decorators try to exploit analytical results where possible, otherwise numerical results are used with a message.

## Super class

distr6::DistributionDecorator -> ExoticStatistics

## Methods

#### Public methods

Inherited methods

#### Method cdfAntiDeriv()

The cdf anti-derivative is defined by

acdf(a, b) = \int_a^b F_X(x) dx

where X is the distribution, F_X is the cdf of the distribution X and a, b are the lower and upper limits of integration.

##### Arguments
lower

(numeric(1)
Lower bounds of integral.

upper

(numeric(1)
Upper bounds of integral.

#### Method survival()

The survival function is defined by

S_X(x) = P(X ≥ x) = 1 - F_X(x) = \int_x^∞ f_X(x) dx

where X is the distribution, S_X is the survival function, F_X is the cdf and f_X is the pdf.

##### Arguments
...

(numeric())
Points to evaluate the function at Arguments do not need to be named. The length of each argument corresponds to the number of points to evaluate, the number of arguments corresponds to the number of variables in the distribution. See examples.

log

(logical(1))
If TRUE returns the logarithm of the probabilities. Default is FALSE.

simplify

logical(1)
If TRUE (default) simplifies the return if possible to a numeric, otherwise returns a data.table::data.table.

data

array
Alternative method to specify points to evaluate. If univariate then rows correspond with number of points to evaluate and columns correspond with number of variables to evaluate. In the special case of VectorDistributions of multivariate distributions, then the third dimension corresponds to the distribution in the vector to evaluate.

#### Method cumHazard()

The cumulative hazard function is defined analytically by

H_X(x) = -log(S_X)

where X is the distribution and S_X is the survival function.

##### Arguments
p

(integer(1)) Norm to evaluate.

lower

(numeric(1)
Lower bounds of integral.

upper

(numeric(1)
Upper bounds of integral.

#### Method pdfPNorm()

The p-norm of the pdf is defined by

(\int_a^b |f_X|^p dμ)^{1/p}

where X is the distribution, f_X is the pdf and a, b are the lower and upper limits of integration.

Returns NULL if distribution is not continuous.

##### Arguments
p

(integer(1)) Norm to evaluate.

lower

(numeric(1)
Lower bounds of integral.

upper

(numeric(1)
Upper bounds of integral.

#### Method clone()

The objects of this class are cloneable with this method.

ExoticStatistics$clone(deep = FALSE) ##### Arguments deep Whether to make a deep clone. ## See Also Other decorators: CoreStatistics, FunctionImputation ## Examples  1 2 3 decorate(Exponential$new(), "ExoticStatistics") Exponential$new(decorators = "ExoticStatistics") ExoticStatistics$new()$decorate(Exponential$new()) 

distr6 documentation built on Sept. 6, 2021, 9:10 a.m.