BiVariAn Description"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

BiVarian Description

BiVariAn is a package designed to facilitate bivariate and multivariate statistical analysis. It includes various functions that enhance conventional workflows by incorporating loops for different types of statistical analyses, such as correlation analysis, two-group comparisons, and multi-group comparisons. Each function automatically performs parametric and non-parametric tests based on the specific situation, allowing for user-defined arguments that can be utilized by the methods within the function. In addition to bivariate analyses, BiVariAn can also automate predictor selection processes according to statistical significance levels based on the p-value. This is achieved through functions such as step_bw_p and step_bw_firth. Furthermore, the package allows for the automated creation of various types of graphs, with user-customizable arguments, including density plots, bar charts, box plots, violin plots, and pie charts. Thus, the automation of extensive processes is streamlined thanks to the functions provided in this package.

library(BiVariAn)

Loading the package

library(BiVariAn)

Render an automatic Shapiro-Wilk's table of a simple dataset

auto_shapiro_raw(cars)

shapiro.test(cars$speed)

Return Shapiro-Wilk's results as a dataframe

auto_shapiro_raw(cars, flextableformat = FALSE)

Render an automatic Shapiro-Wilk's table of a more complex dataset

# Load riskCommunicator to access Framingham dataset
library(riskCommunicator)
# Load dplyr to select specific columns
library(dplyr)
data(cvdd)

For shapiro.test, sample size must be between 3 and 5000

Let's select only 300 observations (arbitrary)

set.seed(081224)
ex_sample<-slice_sample(cvdd, n=300)

Now, let's select specific columns from the database

auto_shapiro_raw(ex_sample %>% select(TOTCHOL, SYSBP, DIABP, BMI, HEARTRTE))

Common use of shapiro.test

shapiro.test(ex_sample$TOTCHOL)

Return the same Shapiro-Wilk's results as a dataframe

auto_shapiro_raw(ex_sample %>% select(TOTCHOL, SYSBP, DIABP, BMI, HEARTRTE), flextableformat = FALSE)


Try the BiVariAn package in your browser

Any scripts or data that you put into this service are public.

BiVariAn documentation built on April 4, 2025, 1:04 a.m.