Skip to main content
QUICK REVIEW

[Paper Review] JointAI: Joint Analysis and Imputation of Incomplete Data in R

Nicole S. Erler, Dimitris Rizopoulos|EUR Research Repository (Erasmus University Rotterdam)|Jul 25, 2019
Statistical Methods and Bayesian InferenceMathematics25 references5 citations
TL;DR

JointAI is an R package that enables joint Bayesian analysis and multiple imputation for incomplete data using a fully compatible joint modeling framework. It overcomes issues of uncongeniality in standard imputation by simultaneously modeling outcomes and covariates, supporting complex models like non-linear effects, interactions, survival, and multilevel data with consistent inference.

ABSTRACT

Missing data occur in many types of studies and typically complicate the analysis. Multiple imputation, either using joint modelling or the more flexible fully conditional specification approach, are popular and work well in standard settings. In settings involving non-linear associations or interactions, however, incompatibility of the imputation model with the analysis model is an issue often resulting in bias. Similarly, complex outcomes such as longitudinal or survival outcomes cannot be adequately handled by standard implementations. In this paper, we introduce the R package JointAI, which utilizes the Bayesian framework to perform simultaneous analysis and imputation in regression models with incomplete covariates. Using a fully Bayesian joint modelling approach it overcomes the issue of uncongeniality while retaining the attractive flexibility of fully conditional specification multiple imputation by specifying the joint distribution of analysis and imputation models as a sequence of univariate models that can be adapted to the type of variable. JointAI provides functions for Bayesian inference with generalized linear and generalized linear mixed models and extensions thereof as well as survival models and joint models for longitudinal and survival data, that take arguments analogous to corresponding well known functions for the analysis of complete data from base R and other packages. Usage and features of JointAI are described and illustrated using various examples and the theoretical background is outlined.

Motivation & Objective

  • Address the problem of uncongeniality in multiple imputation, where imputation and analysis models are incompatible, especially in complex models with non-linear effects or interactions.
  • Provide a unified framework for handling incomplete covariates in complex outcome models such as longitudinal, survival, and multilevel data.
  • Overcome limitations of standard multiple imputation (e.g., FCS and joint modeling) that assume linearity and struggle with non-linear associations or complex outcomes.
  • Enable consistent Bayesian inference by integrating imputation and analysis within a single joint model, ensuring compatibility between imputation and analysis models.
  • Facilitate user-friendly implementation in R by mirroring familiar base R and lme4-style syntax for regression models with incomplete data.

Proposed method

  • Uses a fully Bayesian joint modeling approach to specify the joint distribution of all variables (outcomes and covariates) as a sequence of univariate conditional models.
  • Imputes missing values by sampling from the full-conditional distributions derived from the joint model, ensuring compatibility with the analysis model.
  • Supports various outcome types including Gaussian, binomial, Poisson, Weibull, Cox proportional hazards, and joint models for longitudinal and survival data.
  • Handles non-linear effects via splines, polynomials, and transformations (e.g., log, exp) by modeling the transformed variables directly in the joint model.
  • Allows flexible specification of imputation models through the use of distributions such as normal, log-normal, gamma, and others via the 'models' argument.
  • Enables truncation of distributions (e.g., for log-transformed variables) to respect mathematical constraints (e.g., log(x) only defined for x > 0), using the 'trunc' argument.
Figure 1: Distribution of the variables in the \code NHANES data (with percentage of missing values given for incomplete variables).
Figure 1: Distribution of the variables in the \code NHANES data (with percentage of missing values given for incomplete variables).

Experimental results

Research questions

  • RQ1How can joint modeling in a Bayesian framework improve the compatibility between imputation and analysis models in the presence of non-linear effects and interactions?
  • RQ2To what extent does JointAI outperform standard multiple imputation methods (e.g., MICE or joint modeling with multivariate normality) in settings with complex outcomes like survival or longitudinal data?
  • RQ3Can JointAI effectively handle missing data in covariates when the analysis model includes transformations, splines, or interactions without introducing bias?
  • RQ4How does the use of auxiliary variables, such as functions of observed variables, improve imputation accuracy in complex models?
  • RQ5What is the performance of JointAI in real-world datasets with high-dimensional or non-regularly distributed covariates, such as NHANES data?

Key findings

  • JointAI successfully handles missing data in complex models, including non-linear effects, interactions, and multilevel structures, without requiring model incompatibility.
  • The package supports a wide range of models—linear, generalized linear, mixed-effects, survival, and joint models for longitudinal and survival data—using a consistent interface.
  • Imputation models are automatically adapted to variable types and constraints, such as truncating distributions for log-transformed variables to avoid invalid mathematical operations.
  • The use of auxiliary variables, such as quadratic terms (e.g., I(WC^2)), improves imputation accuracy by incorporating relevant information into the imputation process.
  • Functions like ilogit can be defined in R to match JAGS syntax, enabling seamless use of non-standard transformations in model formulas.
  • The package ensures that when a function of a variable (e.g., log(uricacid)) is used in the analysis, the main effect (e.g., uricacid) is automatically included as a predictor in the imputation model, preserving model compatibility.
Figure 2: Missing data pattern of the \code NHANES data.
Figure 2: Missing data pattern of the \code NHANES data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.