Learn R Programming

saeHB.TF.beta (version 0.2.0)

explore: Exploration of the Data Used for Modeling

Description

Function explore provides an initial exploration of a dataset. It calculate summary statistics for all variables in the provided formula or dataset, visualizes the distribution of the response variable as a histogram density,and boxplot for Coefficient of Variation (CV) / Relative Standard Error (RSE).

Usage

explore(formula, CV = NULL, data, normality = FALSE)

Value

Prints a data frame of summary statistics for the selected variables, including minimum, 1st quartile, median, mean, 3rd quartile, maximum, and number of missing values (NA). Plots are drawn to the current graphics device.

Arguments

formula

Optional formula to specify a response variable (e.g., y ~ x1 + x2).

CV

Coefficient of Variation (CV) or Relative Standard Error (RSE) of the response variable

data

The dataframe to be explored

normality

Logical; if TRUE, the function will additionally check the normality of the response variable and display the result. Defaults to FALSE.

Examples

Run this code
dataBeta$CV <- sqrt(dataBeta$vardir)/dataBeta$y
explore(y~X1+X2, CV = "CV", data = dataBeta)

Run the code above in your browser using DataLab