examine: Perform Descriptive Statistical Analysis

View source: R/examine.r

examineR Documentation

Perform Descriptive Statistical Analysis

Description

Calculates and displays comprehensive descriptive statistics for numeric variables in a dataset. Statistics include measures of central tendency, dispersion, and distribution shape.

Usage

examine(data, x = NULL, all.results = FALSE, ...)

Arguments

data

A data frame or vector containing the variables to analyze

x

Optional. Specific variable(s) to analyze. If NULL, analyzes all numeric variables

all.results

Logical. If TRUE, displays extended set of statistics. Default is FALSE

...

Additional arguments (currently unused)

Details

The function automatically handles missing values and provides standard errors for skewness and kurtosis. Significance of non-normal distribution is indicated with asterisks (*) when the absolute value of skewness or kurtosis divided by their respective standard errors exceeds 2.

Value

Prints a formatted summary for each analyzed variable containing:

  • Basic information: total observations, valid cases, missing cases

  • Basic statistics: mean, trimmed mean, median, standard deviation

  • Distribution measures: skewness, kurtosis (with significance indicators)

  • When all.results=TRUE, additional statistics include:

    • 95

    • Variance

    • Range

    • IQR (Interquartile Range)

Examples

# Examine all numeric variables in a dataset
examine(mtcars)

# Examine specific variables
examine(mtcars, x = mtcars$mpg)

# Get extended statistics
examine(mtcars, all.results = TRUE)


ccamp83/mu documentation built on Nov. 7, 2024, 5:17 p.m.