Learn R Programming

gamlss.util (version 4.2-7)

flexDist: Non-parametric pdf from limited information data

Description

This is an attempt to create a distribution function if the only existing information is the quantiles or expectiles of the distribution.

Usage

flexDist(quantiles = list(values=c(-1.96,0,1.96), prob=c(0.05, .50, 0.95)), 
         expectiles = list(), lambda = 10, 
         kappa = 10, delta = 1e-07, order = 3, n.iter = 200, 
         plot = TRUE, no.inter = 100, lower = NULL, 
         upper = NULL, perc.quant = 0.3, ...)

Arguments

Value

Returns a list with componentspdfthe hights of the fitted pdf, the sum of it multiplied by the Dx should add up to 1 i.e. sum(object$pdf*diff(object$x)[1])cdfthe fitted cdfxthe values of x where the discretise distribution is definedpFunthe cdf of the fitted non-parametric distributionqFunthe inverse cdf function of the fitted non-parametric distributionrFuna function to generate a random sample from the fitted non-parametric distribution

References

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.

See Also

histSmo

Examples

Run this code
# 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)#

Run the code above in your browser using DataLab