powered by
rv_ratio_histogram distribution in OOP way.
rvXp
[ROOPSD::rv_histogram] Describes P(X < x | X > x0)
x0
[double] location of mass: P( X = x0 )
p0
[double] p0 = P( X = x0 )
rv_ratio_histogram$new()
rv_ratio_histogram$rvs()
rv_ratio_histogram$cdf()
rv_ratio_histogram$icdf()
rv_ratio_histogram$sf()
rv_ratio_histogram$isf()
rv_ratio_histogram$fit()
rv_ratio_histogram$clone()
new()
Create a new rv_ratio_histogram object.
rv_ratio_histogram$new(...)
...
If a param `Y` and `x0` is given, the fit method is called with `...`.
A new `rv_ratio_histogram` object.
rvs()
Generation sample from the histogram
rv_ratio_histogram$rvs(n)
n
[integer] Number of samples drawn
A vector of samples
cdf()
Cumulative Distribution Function
rv_ratio_histogram$cdf(q)
q
[vector] Quantiles to compute the CDF
cdf values
icdf()
Inverse of Cumulative Distribution Function
rv_ratio_histogram$icdf(p)
p
[vector] Probabilities to compute the CDF
icdf values
sf()
Survival Function
rv_ratio_histogram$sf(q)
[vector] Quantiles to compute the SF
sf values
isf()
Inverse of Survival Function
rv_ratio_histogram$isf(p)
[vector] Probabilities to compute the SF
isf values
fit()
Fit method for the histograms
rv_ratio_histogram$fit(Y, x0, bins = as.integer(100))
Y
[vector] Dataset to infer the histogram
[double] Location of mass point
bins
[vector or integer] bins values
`self`
clone()
The objects of this class are cloneable with this method.
rv_ratio_histogram$clone(deep = FALSE)
deep
Whether to make a deep clone.
Fit separatly P( X < x | X > 0 ) and P(X=0)
## Generate sample X = numeric(10000) X[1:2000] = 0 X[2001:10000] = stats::rexp( n = 8000 , rate = 1 ) ## And fit it rvX = rv_ratio_histogram$new() rvX$fit( X , x0 = 0 )
Run the code above in your browser using DataLab