Learn R Programming

lmomco (version 1.7.3)

lcomoms2: The Sample L-comoments for Two Variables

Description

Compute the sample L-moments for two variable data.frame. The 2 in the function name is to refer to fact that this function operates on only two variables. The length of the variables must be greater than the number of L-comoments requested.

Usage

lcomoms2(DATAFRAME, nmom=3, asdiag=FALSE, opdiag=FALSE, ...)

Arguments

DATAFRAME
A vector of data values.
nmom
The number of moments to compute. Default is 3.
asdiag
Return the diagonal of the matrices. Default is FALSE.
opdiag
Return the opposing diagonal of the matrices. Default is FALSE. This function returns the opposing diagonal from first two to second.
...
Additional arguments to pass.

Value

  • An R list is returned of the first
  • L1Matrix or diagonals of first L-comoment.
  • L2Matrix or diagonals of second L-comoment.
  • T2Matrix or diagonals of L-comoment correlation.
  • T3Matrix or diagonals of L-comoment skew.
  • T4Matrix or diagonals of L-comoment kurtosis.
  • T5Matrix or diagonals of L-comoment Tau5.
  • sourceAn attribute identifying the computational source of the L-comoments: lcomoms2.

References

Serfling, R., and Xiao, P., 2007, A contribution to multivariate L-moments---L-comoment matrices: Journal of Multivariate Analysis, v.~98, pp.~1765--1781.

See Also

Lcomoment.matrix and Lcomoment.coefficients

Examples

Run this code
# Random simulation of standard normal and then combine with
# a random standard exponential distribution
X <- rnorm(200); Y <- X + rexp(200)

z <- lcomoms2(data.frame(X=X, Y=Y))
print(z)


z <- lcomoms2(data.frame(X=X, Y=Y), diag=TRUE)
print(z$T3) # the L-skew values of the margins

z <- lcomoms2(data.frame(X=X, Y=Y), opdiag=TRUE)
print(z$T3) # the L-coskew values

Run the code above in your browser using DataLab