Title: | Cumulative Descriptive Statistics |
---|---|
Description: | Cumulative descriptive statistics for (arithmetic, geometric, harmonic) mean, median, mode, variance, skewness and kurtosis. |
Authors: | Arturo Erdely and Ian Castillo |
Maintainer: | Arturo Erdely <[email protected]> |
License: | GPL-3 |
Version: | 1.0 |
Built: | 2024-11-07 06:27:29 UTC |
Source: | CRAN |
Cumulative descriptive statistics for (arithmetic, geometric, harmonic) mean, median, mode, variance, skewness and kurtosis.
The DESCRIPTION file:
Package: | cumstats |
Type: | Package |
Title: | Cumulative Descriptive Statistics |
Version: | 1.0 |
Date: | 2017-01-13 |
Author: | Arturo Erdely and Ian Castillo |
Maintainer: | Arturo Erdely <[email protected]> |
Description: | Cumulative descriptive statistics for (arithmetic, geometric, harmonic) mean, median, mode, variance, skewness and kurtosis. |
License: | GPL-3 |
NeedsCompilation: | no |
Packaged: | 2017-01-15 23:19:59 UTC; aerde |
Repository: | CRAN |
Date/Publication: | 2017-01-16 08:13:00 |
Index of help topics:
Mode Statistical Mode cumgmean Cumulative Geometric Mean cumhmean Cumulative Harmonic Mean cumkurt Cumulative Kurtosis cummean Cumulative Arithmetic Mean cummedian Cumulative Median cummode Cumulative Mode cumquant Cumulative Quantile cumskew Cumulative Skewness cumstats-package Cumulative Descriptive Statistics cumvar Cumulative Variance kurtosis Pearson's Measure of Kurtosis skewness Skewness
Cumulative descriptive statistics for (arithmetic, geometric, harmonic) mean, median, mode, variance, skewness and kurtosis.
Arturo Erdely and Ian Castillo
Maintainer: Arturo Erdely <[email protected]>
Returns a vector whose elements are the cumulative geometric mean of the elements of the argument.
cumgmean(x)
cumgmean(x)
x |
a numeric vector. |
A numeric vector of the same length as x
. An NA
value in x
causes the corresponding and following elements of the return value to be NA
.
Arturo Erdely.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
cumgmean(c(9, 1, 4, 0, 3, NA, 8, 5)) z <- cumgmean(rlnorm(10000, 0, 1)) head(z); tail(z)
cumgmean(c(9, 1, 4, 0, 3, NA, 8, 5)) z <- cumgmean(rlnorm(10000, 0, 1)) head(z); tail(z)
Returns a vector whose elements are the cumulative harmonic mean of the elements of the argument.
cumhmean(x)
cumhmean(x)
x |
a numeric vector. |
A numeric vector of the same length as x
. An NA
value in x
causes the corresponding and following elements of the return value to be NA
.
Arturo Erdely.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
cumhmean(c(9, 1, 4, 0, 3, NA, 8, 5))
cumhmean(c(9, 1, 4, 0, 3, NA, 8, 5))
Returns a vector whose elements are the cumulative kurtosis of the elements of the argument.
cumkurt(x)
cumkurt(x)
x |
a numeric vector. |
A numeric vector of the same length as x
. An NA
value in x
causes the corresponding and following elements of the return value to be NA
. The first entry is always NaN
since kurtosis requires at least two different values.
Arturo Erdely.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
cumkurt(c(9, 1, 4, 0, 3, NA, 8, 5))
cumkurt(c(9, 1, 4, 0, 3, NA, 8, 5))
Returns a vector whose elements are the cumulative arithmetic mean of the elements of the argument.
cummean(x)
cummean(x)
x |
a numeric vector. |
A numeric vector of the same length as x
. An NA
value in x
causes the corresponding and following elements of the return value to be NA
.
Arturo Erdely and Ian Castillo.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
cummean(c(9, 1, 4, 0, 3, NA, 8, 5))
cummean(c(9, 1, 4, 0, 3, NA, 8, 5))
Returns a vector whose elements are the cumulative median of the elements of the argument.
cummedian(x)
cummedian(x)
x |
a numeric vector. |
A numeric vector of the same length as x
. An NA
value in x
causes the corresponding and following elements of the return value to be NA
.
Arturo Erdely.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
cummedian(c(9, 1, 4, 0, 3, NA, 8, 5))
cummedian(c(9, 1, 4, 0, 3, NA, 8, 5))
Returns a list whose elements are the cumulative statistical mode(s) of the elements of the argument.
cummode(x)
cummode(x)
x |
a numeric vector. |
A list of the same length as x
with numeric vectors. NA
values are also counted.
Arturo Erdely.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
cummode(c(rep(1, 2), rep(12, 5), rep(44, 3), rep(8, 5), 55)) cummode(c(rep(1, 2), rep(12, 5), rep(44, 3), rep(8, 5), rep(NA, 7), 55)) cummode(runif(5)) cummode(c(rep("a", 2), rep("b", 5), rep("d", 3), rep("e", 5), rep(NA, 5)))
cummode(c(rep(1, 2), rep(12, 5), rep(44, 3), rep(8, 5), 55)) cummode(c(rep(1, 2), rep(12, 5), rep(44, 3), rep(8, 5), rep(NA, 7), 55)) cummode(runif(5)) cummode(c(rep("a", 2), rep("b", 5), rep("d", 3), rep("e", 5), rep(NA, 5)))
Returns a vector whose elements are the cumulative quantile of the elements of the argument.
cumquant(x, p, type = 7)
cumquant(x, p, type = 7)
x |
a numeric vector. |
p |
probability for the desired quantile. |
type |
See |
A numeric vector of the same length as x
. An NA
value in x
causes the corresponding and following elements of the return value to be NA
.
Arturo Erdely.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
y <- c(9, 1, 3, 0, NA, 2, 5) cummedian(y) cumquant(y, 0.5) z <- cumquant(rcauchy(10000), 0.75) head(z); tail(z)
y <- c(9, 1, 3, 0, NA, 2, 5) cummedian(y) cumquant(y, 0.5) z <- cumquant(rcauchy(10000), 0.75) head(z); tail(z)
Returns a vector whose elements are the cumulative skewness of the elements of the argument.
cumskew(x)
cumskew(x)
x |
a numeric vector. |
A numeric vector of the same length as x
. An NA
value in x
causes the corresponding and following elements of the return value to be NA
. The first entry is always NaN
since skewness requires at least two different values.
Arturo Erdely.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
cumskew(c(9, 1, 4, 0, 3, NA, 8, 5))
cumskew(c(9, 1, 4, 0, 3, NA, 8, 5))
Returns a vector whose elements are the cumulative sample variance of the elements of the argument.
cumvar(x)
cumvar(x)
x |
a numeric vector. |
A numeric vector of the same length as x
. An NA
value in x
causes the corresponding and following elements of the return value to be NA
. The first entry is always NA
since sample variance requires at least two values.
Arturo Erdely.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
cumvar(c(9, 1, 4, 0, 3, NA, 8, 5))
cumvar(c(9, 1, 4, 0, 3, NA, 8, 5))
This function computes the estimator of Pearson's measure of kurtosis.
kurtosis(x)
kurtosis(x)
x |
a numeric vector. |
A numeric value of skewness. Returns NA
if x
contains NA
value(s), and NaN
if length(unique(x))==1
is TRUE
.
Adapted by Arturo Erdely from moments
R package by Lukasz Komsta.
Komsta, L. and Novomestky, F. (2015). moments: Moments, cumulants, skewness, kurtosis and related tests. R package version 0.14. https://CRAN.R-project.org/package=moments
kurtosis(c(9, 1, 3, 0))
kurtosis(c(9, 1, 3, 0))
This function computes the statistical mode of given data.
Mode(x)
Mode(x)
x |
a numeric or character vector. |
A list containing the following components:
Values |
of statistical mode(s) found, in the order they appear in |
Frequency |
number of times the mode(s) appear in |
NA
values are also considered.
Ian Castillo.
Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.
Mode(c(rep(1, 2), rep(12, 5), rep(44, 3), rep(8, 5), 55)) Mode(c(rep(1, 2), rep(12, 5), rep(44, 3), rep(8, 5), rep(NA, 7), 55)) Mode(runif(5)) Mode(c(rep("a", 2), rep("b", 5), rep("d", 3), rep("e", 5), rep(NA, 5)))
Mode(c(rep(1, 2), rep(12, 5), rep(44, 3), rep(8, 5), 55)) Mode(c(rep(1, 2), rep(12, 5), rep(44, 3), rep(8, 5), rep(NA, 7), 55)) Mode(runif(5)) Mode(c(rep("a", 2), rep("b", 5), rep("d", 3), rep("e", 5), rep(NA, 5)))
This function computes skewness of given numeric data.
skewness(x)
skewness(x)
x |
a numeric vector. |
A numeric value of skewness. Returns NA
if x
contains NA
value(s), and NaN
if length(unique(x))==1
is TRUE
.
Adapted by Arturo Erdely from moments
R package by Lukasz Komsta.
Komsta, L. and Novomestky, F. (2015). moments: Moments, cumulants, skewness, kurtosis and related tests. R package version 0.14. https://CRAN.R-project.org/package=moments
skewness(c(9, 1, 3, 0))
skewness(c(9, 1, 3, 0))