Skip to contents

Overview

The mutolabr R package provides convenient functions frequently used in mutolab. This package includes functions to:

  • Conduct frequentist and Bayesian t-tests with effect size estimation (t_test_all).
  • Perform correlation tests or partial correlation tests using frequentist and Bayesian methods for all variables in a given dataset (cor_test_all, pcor_test_all).
  • Perform contrast tests using frequentist method (contrast_test).
  • Compute summary statistics for a single variable, including the highest density interval (hdi), mode (mode_stat), population variance (var_desc), and population standard deviation (sd_desc).
  • Calculate the probability of direction (pd) from MCMC samples of a posterior distribution.
  • Retrieve a list of currently loaded R packages along with their versions (loaded_packages_version).

Installation

You can install mutolabr from GitHub using devtools:

# Install devtools if not already installed
if (!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools")

# Install mutolabr
devtools::install_github("mutopsy/mutolabr")

Dependencies

This package requires:
* R (>= 4.1.0)
* dplyr
* tidyr
* BayesFactor
* effectsize * withr

Usage

After installation, you can load this package using the library function.

List of Functions

For details on each function, refer to the function references.

Statistical Tests

  • t_test_all: Perform Frequentist and Bayesian t-tests with Effect Size Estimation [Document]
  • cor_test_all: Perform Correlation Tests with Frequentist and Bayesian Methods [Document]
  • pcor_test_all: Perform Partial Correlation Tests with Frequentist Methods [Document]
  • contrast_test: Perform Contrast Tests with Frequentist Method [Document]
  • trend_test: Perform Trend Analysis using Contrast Test with Frequentist Method [Document]
  • summary_generalTestBF: Summarize Results from generalTestBF (beta version) [Document]
  • rmANOVA_bf: Perform Bayesian Repeated-Measures ANOVA Using generalTestBF [Document]

Compute Summary Statistics

  • summary_stat: Compute Summary Statistics [Document]
  • var_desc: Compute Population Variance [Document]
  • sd_desc: Compute Population Standard Deviation [Document]
  • mode_stat: Compute the Mode of a Distribution [Document]
  • hdi: Compute the Highest Density Interval (HDI) [Document]
  • pdir: Probability of Direction (pd) Calculation [Document]

Others

  • theme_gg0: A Default ggplot2 Theme [Document]

Version History

v1.4.0 (2025-06-22)

v1.3.0 (2025-04-30)

v1.2.1 (2025-03-28)

v1.2.0 (2025-03-27)

v1.1.0 (2025-03-26)

v1.0.0 (2025-02-28)