Learn R Programming

Probabilistic multi-resolution scanning for cross-sample variation

This package fits the MRS algorithm for comparison across probability distributions. The model is based on a nonparametric process taking the form of a Markov model that transitions between a "null" and an "alternative" state on a multi-resolution partition tree of the sample space. MRS effectively detects and characterizes a variety of underlying differences. These differences can be visualized using several plotting functions.

Install

The development version can be installed from GitHub on Linux, macOS, or Windows:

install.packages("remotes")
remotes::install_github("MaStatLab/MRS")

Use

The main functions and their descriptions are provided in the help files:

ans = mrs(X, G)
ans = andova(X, G, H)
summary(ans)
plot1D(ans)
plot2D(ans)
plotTree(ans)
plot1DSigWindows(ans)

Visual demos

The package includes three reproducible demonstrations of the main workflows:

demo(package = "MRS")

demo("mrs_1d", package = "MRS", ask = FALSE)
demo("mrs_2d", package = "MRS", ask = FALSE)
demo("andova_replicates", package = "MRS", ask = FALSE)

The former standalone scripts in examples/ have been consolidated into these demos. Each workflow now has one purpose:

  • mrs_1d shows a localized difference, its signed effect, and Bayesian-FDR selection.
  • mrs_2d compares the observed grouping with a label-shuffled control before showing multiscale probability, effect, and tree views.
  • andova_replicates compares pooled MRS with both ANDOVA integration methods, uses an explicit baseline, and contrasts nested studies with 4, 10, and 20 replicates to show why pooled analysis can be overconfident.

All simulations use fixed random seeds. The obsolete mrs_nested() examples are represented by the supported andova() workflow, while developer-oriented numerical diagnostics are covered by the automated tests.

Reference

Soriano J. and Ma L. (2017). Probabilistic multi-resolution scanning for two-sample differences. Journal of the Royal Statistical Society: Series B, 79(2), 547-572. https://doi.org/10.1111/rssb.12180

Ma L. and Soriano J. (2018). Analysis of distributional variation through multi-scale Beta-Binomial modeling. Journal of Computational and Graphical Statistics, 27(3), 529-541. https://doi.org/10.1080/10618600.2017.1402774

Copy Link

Version

Install

install.packages('MRS')

Monthly Downloads

169

Version

1.3.2

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Li Ma

Last Published

July 22nd, 2026

Functions in MRS (1.3.2)

andova

Multi Resolution Scanning for one-way ANDOVA using the multi-scale Beta-Binomial model
mrs

Multi Resolution Scanning
plot1DSigWindows

Plot one-dimensional windows selected by Bayesian FDR
print.summary.mrs

Print summary of a mrs object
plot1D

Plot regions of the representative tree in 1D
plotTree

Plot nodes of the representative tree
summary.mrs

Summary of a mrs object
plot2D

Plot regions of the representative tree in 2D