Learn R Programming

distr6 (version 1.3.2)

ExoticStatistics: Exotic Statistical Methods for Distributions

Description

This decorator adds methods for more complex statistical methods including p-norms, survival and hazard functions and anti-derivatives.

Value

Returns a decorated R6 object inheriting from class SDistribution with the methods listed below added to the SDistribution methods.

Constructor

ExoticStatistics$new(distribution)

Constructor Arguments

Argument Type Details
distribution distribution Distribution to decorate.

Added Methods

Method Name Link
survival(x1, log = FALSE) Survival function survival
hazard(x1, log = FALSE) Hazard function hazard
cumHazard(x1, log = FALSE) Cumulative hazard function cumHazard
cdfAntiDeriv(lower = NULL, upper = NULL)) Anti-derivative of cdf cdfAntiDeriv
survivalAntiDeriv(lower = NULL, upper = NULL) Anti-derivative of survival function survivalAntiDeriv
cdfPNorm(p = 2, lower = NULL, upper = NULL) P-norm of cdf cdfPNorm
pdfPNorm(p = 2, lower = NULL, upper = NULL) P-norm of pdf pdfPNorm
survivalPNorm(p = 2, lower = NULL, upper = NULL) P-norm of survival function survivalPNorm

Details

Decorator objects add functionality to the given Distribution object by copying methods in the decorator environment to the chosen Distribution environment. See the 'Added Methods' section below to find details of the methods that are added to the Distribution. Methods already present in the distribution are not overwritten by the decorator.

Use decorate to decorate a Distribution.

Methods in this decorator may use numerical approximations and therefore better results may be available from analytic computations.

See Also

decorate, listDecorators

Examples

Run this code
# NOT RUN {
x = Exponential$new()
decorate(x, ExoticStatistics)
x$survival(1)

x = Exponential$new(decorators = ExoticStatistics)
x$survival(4)

# }

Run the code above in your browser using DataLab