Learn R Programming

sasLM (version 1.0.1)

UNIV: Univariate Descriptive Statistics

Description

Returns descriptive statistics of a numeric vector.

Usage

UNIV(y, conf.level = 0.95)

Value

nAll

count of all elements in the input vector

nNA

count of NA elements

nFinite

count of finite numbers

Mean

mean excluding NA

Variance

variance excluding NA

SD

standard deviation excluding NA

CV

coefficient of variation in percent

SEM

standard error of the sample mean, the sample standard deviation divided by the square root of nFinite

LowerCL

lower confidence limit of mean

UpperCL

upper confidence limit of mean

TrimmedMean

trimmed mean with a trimming proportion of 1 - confidence level

Min

minimum value

Q1

first quartile value with quantile type 2, the SAS default

Median

median value

Q3

third quartile value with quantile type 2, the SAS default

Max

maximum value

Range

range of finite numbers, maximum - minimum

IQR

interquartile range with quantile type 2, the SAS default

MAD

median absolute deviation

VarLL

lower confidence limit of variance

VarUL

upper confidence limit of variance

Skewness

skewness

SkewnessSE

standard error of skewness

Kurtosis

kurtosis

KurtosisSE

standard error of kurtosis

GeometricMean

geometric mean, calculated only when all given values are positive.

GeometricCV

geometric coefficient of variation in percent, calculated only when all given values are positive.

Arguments

y

a numeric vector

conf.level

confidence level for confidence limit

Author

Kyun-Seop Bae k@acr.kr

Details

A convenient and comprehensive function for descriptive statistics. NA is removed during the calculation. This is similar to SAS PROC UNIVARIATE.

Examples

Run this code
  UNIV(lh)

Run the code above in your browser using DataLab