Spline | R Documentation |
Random generation and distribution function for the spline of the basis from Lefevre and Loisel (2013), and mixtures of splines.
rSpline(n=1, supp, k)
dSpline(supp, k)
rmixSpline(n=1, supp, k,prob)
dmixSpline(supp, k, prob)
supp |
Support of the spline, or vector of the supports of the splines for the mixture of splines |
n |
Number of random values to return |
k |
Degree of monotony |
prob |
Vector of probabilities for the mixture of splines |
See BaseNorm for details on the spline basis.
rSpline and rmixSpline generates random deviates from the splines and mixtures of splines.
dSpline and dmixSpline gives the distribution function.
Jade Giguelay
Giguelay, J., (2016), Estimation of a discrete distribution under k-monotony constraint, in revision, (arXiv:1608.06541)
Lefevre C., Loisel S. (2013) <DOI:10.1239/jap/1378401239> On multiply monotone distributions, continuous or discrete, with applications, Journal of Applied Probability, 50, 827–847.
pEmp
x=rSpline(n=100, 20, 3)
p=dSpline(20, 3)
xmix=rmixSpline(n=100, c(5, 20), 3, c(0.5, 0.5))
pmix=dmixSpline(c(5, 20), 3, c(0.5, 0.5))
par(mfrow=c(1, 2))
hist(x, freq=FALSE)
lines(p, col="red")
hist(xmix, freq=FALSE)
lines(pmix, col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.