| rv_histogram | R Documentation |
rv_histogram distribution in OOP way.
Use quantile to fit the histogram
min[double] min value for the estimation
max[double] max value for the estimation
tol[double] numerical tolerance
new()Create a new rv_histogram object.
rv_histogram$new(...)
...If a param 'Y' is given, the fit method is called with '...'.
A new 'rv_histogram' object.
rvs()Generation sample from the histogram
rv_histogram$rvs(n)
n[integer] Number of samples drawn
A vector of samples
density()Density function
rv_histogram$density(x)
x[vector] Values to compute the density
density
logdensity()Log density function
rv_histogram$logdensity(x)
x[vector] Values to compute the log-density
the log density
cdf()Cumulative Distribution Function
rv_histogram$cdf(q)
q[vector] Quantiles to compute the CDF
cdf values
icdf()Inverse of Cumulative Distribution Function
rv_histogram$icdf(p)
p[vector] Probabilities to compute the CDF
icdf values
sf()Survival Function
rv_histogram$sf(q)
q[vector] Quantiles to compute the SF
sf values
isf()Inverse of Survival Function
rv_histogram$isf(p)
p[vector] Probabilities to compute the SF
isf values
fit()Fit method for the histograms
rv_histogram$fit(Y, bins = as.integer(1000))
Y[vector] Dataset to infer the histogram
bins[vector or integer] bins values
'self'
clone()The objects of this class are cloneable with this method.
rv_histogram$clone(deep = FALSE)
deepWhether to make a deep clone.
## Generate sample
X = numeric(10000)
X[1:5000] = stats::rnorm( n = 5000 , mean = 2 , sd = 1 )
X[5000:10000] = stats::rexp( n = 5000 , rate = 1 )
## And fit it
rvX = rv_histogram$new()
rvX$fit(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.