Statistics::Lmoments
use Statistics::Lmoments qw(:all);
my @x = (..data here..);
# data needs to be sorted from smallest to largest
@x = sort {$a<=>$b} @x;
# calculate the "unbiased" first 5 L-moments
$xmom = sam('lmu',\@x, 5); foreach (@distributions) { next if /^KAP/; my $para = pel($_,$xmom); # @$para is now the estimated parameter vector # for the specified distribution my $x = 100; my $F = cdf($_,$x,$para); # $F is now the value of the cdf at 100 for this distribution }
This module is a thin wrapper around J. R. M. Hosking's FORTRAN library. For more information please see lmoments.ps in this distribution.
Ari Jolma https://github.com/ajolma
https://github.com/ajolma/Statistics-Lmoments
To install Statistics::Lmoments, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Statistics::Lmoments
CPAN shell
perl -MCPAN -e shell install Statistics::Lmoments
For more information on module installation, please visit the detailed CPAN module installation guide.