Learn R Programming

pastecs (version 1.0-2)

stat.desc: Descriptive statistics on a data frame or time series

Description

Compute a table giving various descriptive statistics about the series in a data frame or in a single/multiple time series

Usage

stat.desc(x, basic=TRUE, desc=TRUE, norm=FALSE, p=0.95)

Arguments

x
a data frame or a time series
basic
do we have to return basic statistics (by default, it is TRUE)? These are: the number of values (nbr.val), the number of null values (nbr.null), the number of missing values (nbr.na), the minimal value (min), the maximal value (max), the range (range, tha
desc
do we have to return various descriptive statistics (by default, it is TRUE)? These are: the median (median), the mean (mean), the standard error on the mean (SE.mean), the confidence interval of the mean (CI.mean) at the p level, the varianc
norm
do we have to return normal distribution statistics (by default, it is FALSE)? the skewness coefficient g1 (skewness), its significant criterium (skew.2SE, that is, g1/2.SEg1; if skew.2SE > 1, then skewness is significantly different than zero), kurtosis
p
the probability level to use to calculate the confidence interval on the mean (CI.mean). By default, p=0.95

Value

  • a data frame with the various statistics in rows and with each column correponding to a variable in the data frame, or to a separate time series

See Also

stat.slide, stat.pen

Examples

Run this code
data(marbio)
stat.desc(marbio[,13:16], basic=TRUE, desc=TRUE, norm=TRUE, p=0.95)

Run the code above in your browser using DataLab