data2normpoly: Estimation of normal-polynomial quantile mixture

Description Usage Arguments Value Author(s) References See Also Examples

Description

Estimates the parameters of normal-polynomial quantile mixture from data or from L-moments

Usage

1
2
3
4

Arguments

data

matrix or data frame

lmom

vector or matrix of L-moments

Value

vector or matrix containing the four or six parameters of normal-polynomial quantile mixture

Author(s)

Juha Karvanen [email protected]

References

Karvanen, J. 2006. Estimation of quantile mixtures via L-moments and trimmed L-moments, Computational Statistics & Data Analysis 51, (2), 947–959. http://www.bsp.brain.riken.jp/publications/2006/karvanen_quantile_mixtures.pdf.

See Also

dnormpoly for L-moments, dnormpoly for the normal-polynomial quantile mixture and data2cauchypoly4 for the estimation of Cauchy-polynomial quantile mixture.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Generates a sample 500 observations from the normal-polynomial quantile mixture, 
#calculates L-moments and their covariance matrix,
#estimates parameters via L-moments and 
#plots the true pdf and the estimated pdf together with the histogram of the data.
true_params<-lmom2normpoly4(c(0,1,0.2,0.05));
x<-rnormpoly(500,true_params);
lmoments<-Lmoments(x);
lmomcov<-Lmomcov(x);
estim_params<-lmom2normpoly4(lmoments);
hist(x,30,freq=FALSE);
plotpoints<-seq(min(x)-1,max(x)+1,by=0.01);
lines(plotpoints,dnormpoly(plotpoints,estim_params),col='red');
lines(plotpoints,dnormpoly(plotpoints,true_params),col='blue');

Example output



Lmoments documentation built on May 2, 2019, 2:04 a.m.