rv_ratio_histogram | R Documentation |
rv_ratio_histogram distribution in OOP way.
Fit separatly P( X < x | X > 0 ) and P(X=0)
rvXp
[ROOPSD::rv_histogram] Describes P(X < x | X > x0)
x0
[double] location of mass: P( X = x0 )
p0
[double] p0 = P( X = x0 )
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)
q
[vector] Quantiles to compute the SF
sf values
isf()
Inverse of Survival Function
rv_ratio_histogram$isf(p)
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
x0
[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.
## 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 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.