[R] where is kurtosis??
IMCEAEX-_O=CSIRO_OU=CMIS_CN=RECIPIENTS_CN=VEN037@csiro.au
IMCEAEX-_O=CSIRO_OU=CMIS_CN=RECIPIENTS_CN=VEN037 at csiro.au
Mon Mar 10 05:44:10 CET 2003
This is the definition also used by the function kurtosis() in e1071, which
is the old Pearsonian definition.
The Fisherian definition uses sample cumulants (or 'k statistics') and
always seemed preferable to me as it does something about the known biases.
Programming the sample cumulant version, though, is just a bit more tricky,
but not exactly difficult.
Has anyone ever bothered to look at providing sample cumulants and their
multivariate generalizations such as Tukey's polykays? The case is not all
that strong as the sampling behaviour of these things is pretty dodgy (and
who has ever had the luxury of a homogeneous, iid sample of any size,
anyway?), but there is a nice historical reason to look at them again, now
and then.
Bill Venables.
-----Original Message-----
From: Ross Ihaka [mailto:ihaka at stat.auckland.ac.nz]
Sent: Sunday, March 09, 2003 9:39 AM
To: Shutnik
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] where is kurtosis??
Shutnik wrote:
> Dear friends,
> I try to get started with R and can’t estimate kurtosis of a random
sample by using one command.
Its probably worth saying that the point of a computing environment like
R is that you can easily extend the environment by defining your own
functions. In the case of kurtosis you could use something like:
kurtosis <- function(x) {
x <- x[!is.na(x)]
sum( (x-mean(x))^4 )/ ((length(x) - 1) * var(x)^2)
}
or
kurtosis <- function(x) {
x <- x[!is.na(x)]
sum( (x-mean(x))^4 )/ ((length(x) - 1) * var(x)^2) - 3
}
--
Ross Ihaka Email: ihaka at stat.auckland.ac.nz
Department of Statistics Phone: (64-9) 373-7599 x 85054
University of Auckland Fax: (64-9) 373-7018
Private Bag 92019, Auckland
New Zealand
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list