t1lmoments: Trimmed L-moments

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

View source: R/Lmoments.R

Description

Calculates sample trimmed L-moments with trimming parameter 1.

Usage

1
2
t1lmoments(data, rmax = 4)
t1lmoments_calc(data, rmax = 4)

Arguments

data

matrix or data frame.

rmax

maximum order of trimmed L-moments.

Value

array of trimmed L-moments (trimming parameter = 1) up to order 4 containing a row for each variable in data.

Note

Functions link{Lmoments} and link{Lcoefs} calculate trimmed L-moments if you specify trim = c(1, 1). t1lmoments_calc is an internal C++ function called by t1lmoments. The direct use of this function is not recommended.

Author(s)

Juha Karvanen juha.karvanen@iki.fi, Santeri Karppinen

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.

Elamir, E. A., Seheult, A. H. 2003. Trimmed L-moments, Computational Statistics & Data Analysis 43, 299–314.

See Also

Lmoments for L-moments, and dcauchypoly and t1lmom2cauchypoly4 for the Cauchy-polynomial quantile mixture

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Generates 500 random variables from the Cauchy-polynomial quantile mixture, 
#calculates the trimmed L-moments,
#estimates parameters via trimmed L-moments and 
#plots the true pdf and the estimated pdf together with the histogram of the data.
true_params<-t1lmom2cauchypoly4(c(0,1,0.075,0.343));
x<-rcauchypoly(500,true_params);
t1lmom<-t1lmoments(x);
estim_params<-t1lmom2cauchypoly4(t1lmom);
plotpoints<-seq(-10,10,by=0.01);
histpoints<-c(seq(min(x)-1,-20,length.out=50),seq(-10,10,by=0.5),seq(20,max(x)+1,length.out=50));
hist(x,breaks=histpoints,freq=FALSE,xlim=c(-10,10));
lines(plotpoints,dcauchypoly(plotpoints,estim_params),col='red');
lines(plotpoints,dcauchypoly(plotpoints,true_params),col='blue');

Example output



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