No BSD License  

Highlights from
lmom.m

5.0

5.0 | 2 ratings Rate this file 11 Downloads (last 30 days) File Size: 809 Bytes File ID: #5874

lmom.m

by Kobus Bekker

 

14 Sep 2004 (Updated 15 Sep 2004)

Calculates any number of l-moments.

| Watch this File

File Information
Description

This m-file calculates any number of l-moments for given data vector X. It uses probability weighted moments (can actually edit the file to give any number of pwm's) and the coefficients of the shifted Legendre polynomial to calculate the l-moments.

MATLAB release MATLAB 6.5 (R13)
Other requirements FILE REQUIRED: % LegendreShiftPoly.m by Peter Roche, 12-08-2004. This file is available on the Matlab File Exchange. Thanks to Peter for his work.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
12 Apr 2006 Steven Gray

Fast and very useful.

25 Nov 2010 Anand Anand

I generated 1000 random nos from normal distribution(5,0.2)..i tried lmom(x)...the first three moments are right but the 4 moment kurtosis comes around 0.0137 while L4 for a normal dist is 0.1226...What is causing this discrepancy?

21 Apr 2011 Luca

ok, I found it

21 Apr 2011 Luca  
26 Apr 2011 Luca

I tried this code:
x = randn(100000,1);
L = lmom(x,4)
L =
    0.0038 0.5650 0.0005 0.0685

In fact L4 != 0.1226 !!!

but you can evaluate:
T4 = L4/L2 = 0.1213

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
statistics Kobus Bekker 22 Oct 2008 07:31:27
probability Kobus Bekker 22 Oct 2008 07:31:27
lmoments Kobus Bekker 22 Oct 2008 07:31:27
vector Kobus Bekker 22 Oct 2008 07:31:27
data Kobus Bekker 22 Oct 2008 07:31:27
calculates Kobus Bekker 22 Oct 2008 07:31:27
vector Halil KARAHAN 09 Dec 2009 06:52:16

Contact us at files@mathworks.com