Description Usage Arguments Value Author(s) References See Also Examples
This is an attempt to create a distribution function if the only existing information is the quantiles or expectiles of the distribution.
1 2 3 4 5 |
quantiles |
a list with components |
expectiles |
a list with components |
lambda |
smoothing parameter for the log-pdf |
kappa |
smoothing parameter for log concavity |
delta |
smoothing parameter for ridge penalty |
order |
the order of the penalty for log-pdf |
n.iter |
maximum number of iterations |
plot |
whether to plot the result |
no.inter |
How many discrete probabilities to evaluate |
lower |
the lower value of the x |
upper |
the upper value of the x |
perc.quant |
how far from the quantile should go out to define the limit of x if not set by |
... |
additional arguments |
Returns a list with components
pdf |
the hights of the fitted pdf, the sum of it multiplied by the Dx should add up to 1 i.e. |
cdf |
the fitted cdf |
x |
the values of x where the discretise distribution is defined |
pFun |
the cdf of the fitted non-parametric distribution |
qFun |
the inverse cdf function of the fitted non-parametric distribution |
rFun |
a function to generate a random sample from the fitted non-parametric distribution |
Mikis Stasinopoulos, Paul Eilers, Bob Rigby and Vlasios Voudouris
Eilers, P. H. C., Voudouris, V., Rigby R. A., Stasinopoulos D. M. (2012) Estimation of nonparametric density from sparse summary information, under review.
Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.
Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, http://www.jstatsoft.org/v23/i07.
Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.
1 2 3 4 5 6 7 8 9 | # Normal
r1<-flexDist(quantiles=list(values=qNO(c(0.05, 0.25, 0.5,0.75, 0.95), mu=0,
sigma=1), prob=c( 0.05, 0.25, 0.5,0.75,0.95 )),
no.inter=200, lambda=10, kappa=10, perc.quant=0.3)
# GAMMA
r1<-flexDist(quantiles=list(values=qGA(c(0.05,0.25, 0.5,0.75,0.95), mu=1,
sigma=.8), prob=c(0.05,0.25, 0.5,0.75,0.95)),
expectiles=list(values=1, prob=0.5), lambda=10,
kappa=10, lower=0, upper=5)#
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.