Dear friends, I try to get started with R and can’t estimate kurtosis of a random sample by using one command. I have installed R 1.6.2. Please help. Max --------------------------------- ur needs [[alternate HTML version deleted]]
E.g., in package e1071. best, -d Mag. David Meyer Wiedner Hauptstrasse 8-10 Vienna University of Technology A-1040 Vienna/AUSTRIA Department of Tel.: (+431) 58801/10772 Statistics and Probability Theory Fax.: (+431) 58801/10798 On Sat, 8 Mar 2003, Shutnik wrote:> Dear friends, > I try to get started with R and can?t estimate kurtosis of a random sample by using one command. I have installed R 1.6.2. Please help. > > Max > > > > > --------------------------------- > > ur needs > > [[alternate HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >
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
IMCEAEX-_O=CSIRO_OU=CMIS_CN=RECIPIENTS_CN=VEN037@csiro.au
2003-Mar-10 04:44 UTC
[R] where is kurtosis??
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 randomsample 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