JointAI: Joint Analysis and Imputation of Incomplete Data

CRAN_Status_Badge Travis-CI Build Status

The package JointAI provides joint analysis and imputation of linear regression models, generalized linear regression models or linear mixed models with incomplete (covariate) data in the Bayesian framework.

The package performs some preprocessing of the data and creates a JAGS model, which will then automatically be passed to JAGS with the help of the R package rjags.

JointAI also provides summary and plotting functions for the output.


You can install JointAI from GitHub with:

# install.packages("devtools")

Main functions

Currently, there are three main functions that perform linear, generalized linear or linear mixed regression:


lm_imp() and glm_imp() use specification similar to their complete data counterparts lm() and glm(), whereas lme_imp() uses similar specification as lme() from the package nlme.

Functions summary(), traceplot(), densityplot() provide a summary of the posterior distribution and its visualization.

gr_crit() and mc_error() provide the Gelman-Rubin diagnostic for convergence and the Monte Carlo error of the MCMC sample, respectively.