
Last chance! 50% off unlimited learning
Sale ends in
This decorator adds methods for more complex statistical methods including p-norms, survival and hazard functions and anti-derivatives.
Returns a decorated R6 object inheriting from class SDistribution with the methods listed below added to the SDistribution methods.
ExoticStatistics$new(distribution)
Argument | Type | Details |
distribution |
distribution | Distribution to decorate. |
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 |
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.
# 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