Description Usage Arguments Value See Also Examples
ffunCreate
creates a density or a distribution of probabilites function from a given set of
data. The resulting function will interpolate the intermediate values using the given aprxf
approximation function.
1 | ffunCreate(x.data, aprxf = dapproxfun, accumulate = FALSE, ...)
|
x.data |
A numeric vector containing the data. |
aprxf |
A function used to create an interpolation function. |
accumulate |
If |
... |
All the other, optional, parameters required by |
Either a denstity or a distribution function from the data. If the parameter accumulate
is
TRUE, the resulting function will be an accumulated density of probabilities function, also known as
a distribution of probabilities function, otherwise, the resulting function will be a density of
probabilities function.
To perform its task, ffunCreate
generates a series of points in the domain and then interpolates
using the interpolation function resulting from applying the given aprxf
approximation function.
1 2 3 4 5 6 7 | X <- log(rgamma(150,5)) # Random data generation
dfun <- ffunCreate(X) # To create a density function from X
dfun(c(0.45, 1.84, 2.3))
plot(dfun, xlim=c(-0.1, 3.0))
pfun <- ffunCreate(X, dsplinefun, accumulate=T) # To create a distribution spline interpolated function
plot(pfun, xlim=c(-0.1, 3.0))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.