# descr: Descriptive statistics for one or several variables In eatTools: Miscellaneous Functions for the Analysis of Educational Assessments

 descr R Documentation

## Descriptive statistics for one or several variables

### Description

Function computes descriptive statistics for one variable or several variables within a data frame.

### Usage

``descr (variable, na = NA, p.weights = NULL, na.rm = FALSE, verbose=TRUE) ``

### Arguments

 `variable` one variable or a data.frame with several variables `na` optional values with should be considered a missing values `p.weights` optional: vector with individual weights if weighted statistics should be computed `na.rm` logical: should missings be removed prior to estimation? `verbose` logical: Print messages to console?

### Value

a data frame with the following columns

 `N` number of observations `N.valid` number of non-missing observations `Missing` number of missings `Minimum` minimum of numeric variables `Maximum` maximum of numeric variables `Sum` sum of numeric variables `Mean` arithmetic mean of numeric variables `std.err` standard error of the arithmetic mean. Note: for weighted means, standard error is estimated according to Cochran (1977): `sigma_x^2=n/((n-1)*w_s^2)*Sigma(w_i^2*(x_i-x))`. `sig` p value `Median` median of numeric variables `SD` standard deviation of numeric variables `Var` variance of numeric variables

### Author(s)

Sebastian Weirich

### References

Cochran W. G. (1977). Sampling Techniques (3rd Edn). Wiley, New York

### Examples

``````data(mtcars)
descr(mtcars)
``````

eatTools documentation built on May 29, 2024, 6:03 a.m.