Skip to content
R package for variability analysis
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

varian logo

varian is a free, open source R package for variability analysis using Bayesian inference.

It provides a formula interface in R to define a multilevel model for a variable with repeated measures, in addition to standard multilevel features such as fixed effects and a random intercepts/slopes, the residual variance is a random variable by ID. The latent residual variance estimates are then used as predictors in a regression of another outcome.

Build Status CRAN_Status_Badge

Getting Started

At its core, varian uses Stan to estimate the models.



R version 3.3.0 or later is required. You can download the latest version of R here:


Stan and the varian package rely on being able to compile C++ code.

  • For Windows, download and install Rtools at
  • For Mac, make sure you have the latest version of Xcode installed. The installation instructions for rstan provide more details.
  • For Linux, make sure you have a recent version of g++ or clang++.


Install the latest version of the rstan package (should happen automatically from CRAN now). That page also lists more detailed directions for getting the necessary tools installed.

Install varian

You can install:

  • the latest stable release from CRAN

    install.packages("varian", dependencies = TRUE)
  • the latest development version from github


Learn about the theory

See our open access pre-print on the arXiv


You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.