Learn R Programming

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.

Getting Started

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

Prerequisites

R

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

http://www.r-project.org/

Tools

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

  • For Windows, download and install Rtools at http://cran.r-project.org/bin/windows/Rtools/
  • 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 ge++ or clang++.

RStan

Install the latest version of the rstan package, which you can do from CRAN now. That page also lists more detailed directions for getting the necessary tools installed.

```R
install.packages("rstan", dependencies = TRUE)
```

Install varian

You can install:

  • the latest stable release (0.2.2) from CRAN

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

    install.packages("devtools")
    devtools::install_github("ElkhartGroup/varian")

Learn about the theory

See our open access pre-print on the arXiv http://arxiv.org/abs/1411.2961.

More

Copy Link

Version

Install

install.packages('varian')

Monthly Downloads

277

Version

0.2.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

February 28th, 2016

Functions in varian (0.2.2)

param_summary

Calculates summaries for a parameter
parallel_stan

Wrapper for the stan function to parallelize chains
empirical_pvalue

Calculates an empirical p-value based on the data
varian

Variablity Analysis using a Bayesian Variability Model (VM)
stan_inits

Calculate Initial Values for Stan VM Model
res_gamma

Estimates the parameters of a Gamma distribution from SDs
pval_smartformat

nice formatting for p-values
gamma_params

Estimate the parameters for a Gamma distribution
vm_diagnostics

Plot diagnostics from a VM model
simulate_gvm

Simulate a Gamma Variability Model
vmp_plot

Plot the posterior distributions of the focal parameters from a VM model
vm_stan

Create a Stan class VM object
Variability_Measures

Variability Measures