JointAI1.1.0 package

Joint Analysis and Imputation of Incomplete Data

add_samples

Continue sampling from an object of class JointAI

all_vars

Extract names of variables from several objects

check_formula_list

Ensure object is a (list of) formula(s)

check_full_blockdiag

Replace a full with a block-diagonal variance covariance matrix

check_groups_vary_within_lvl

Check if a grouping variable varies within another grouping variable

check_na_groupings

Check for missing values in grouping variables

check_rd_vcov_list

First validation for rd_vcov

check_rd_vcov

Check / create the random effects variance-covariance matrix specifica...

check_redundant_lvls

Check for unnecessary grouping levels

check_vars_in_data

Check that all variables in formulas are in the data

choose_default_model

Choose default analysis model based on outcome and data level

clean_names

Replace ":" with "_" in a string

clean_survname

Convert a survival outcome to a model name

combine_formula_lists

Combine fixed and random effects formulas

combine_formulas

Combine a fixed and random effects formula

compare_data_structure

Compare the structure of two data.frames

convert_variables

Convert variables

cross_corr

Cross-correlation of MCMC samples

get_datlvls

Determine grouping level of data

get_family

Identify the family from the covariate model type

get_grouping_levels

Get grouping levels

get_groups

Get grouping information

get_listelement

Get an element of a list, return a default value if it does not exist

get_MIdat

Extract multiple imputed datasets from an object of class JointAI

get_missinfo

Obtain a summary of the missing values involved in an object of class ...

get_Mlist

Re-create the full Mlist from a "JointAI" object

get_modeltype

Identify the general model type from the covariate model type

get_nranef

Extract the number of random effects

get_resp_mat

Identify the data matrix containing a given response variable

paste_linpred

Write a linear predictor

paste_scale

Create the scaling in a data element of a linear predictor

paste_scaling

Wrap a data element of a linear predictor in scaling syntax

prep_arglist

Prepare list of arguments for model_imp()

rd_terms_by_grouping

Extract terms by grouping variables from a formula

rd_vcov

Extract the random effects variance covariance matrix

reformat_difftime

Set all elements of a difftime object to the same, largest meaningfu...

remove_formula_grouping

Remove grouping part from (random effects) formula

remove_grouping

Remove grouping part from (random effects) formulas

remove_lhs

Remove the left hand side of a (list of) formula(s)

replace_nan_with_na

Replace NaN values with NA

residuals.JointAI

Extract residuals from an object of class JointAI

resolve_family_obj

Resolve family object

paste_coef

Write the coefficient part of a linear predictor

paste_data

Write the data element of a linear predictor

varname_to_modelframe

Create data.frame from variable term and data

add_linebreaks

Add line breaks to a linear predictor string

auto_corr

Autocorrelation of MCMC samples

bs

B-Spline Basis for Polynomial Splines

check_classes

Check classes of all variables used in the model

check_data

Run all data related checks

check_duplicate_groupings

Check for duplicate grouping levels

check_fixed_random

Check whether fixed or formula contains a random effects specification

factor_to_integer

Convert a factor to an integer representation

default_hyperpars

Get the default values for hyper-parameters

densplot

Plot the posterior density from object of class JointAI

difftime_df

Converts a difftime object to a data.frame

drop_levels

Check for empty factor levels

duration_obj

Create a duration object

expand_rd_vcov_full

Expand rd_vcov using variable names in case "full" is used

extract_fixef_formula

Extract fixed effects formula from lme4-type formula

extract_grouping

Extract grouping variables from a (list of) formula(s)

extract_lhs_string

Extract the left hand side of a formula

extract_lhs_varnames

Extract variable names from the left-hand side of a formula

extract_ranef_formula

Extract random effects formula from lme4-type formula

extract_state

Return the current state of a 'JointAI' model

GR_crit

Gelman-Rubin criterion for convergence

hc_rdslope_info

Get info on main effects in a rd slope structure for a level and sub-m...

hc_rdslope_interact

Get info on the interactions with random slopes for a given level and ...

internal_clean_survname

Convert a survival outcome to a model name

JointAI

JointAI: Joint Analysis and Imputation of Incomplete Data

JointAIObject

Fitted object of class 'JointAI'

paste_analysis_type

Paste analysis type with family information

list_models

List model details

MC_error

Calculate and plot the Monte Carlo error

md_pattern

Missing data pattern

merge_call_args

Merge call arguments with default formals

model_imp

Joint Analysis and Imputation of incomplete data

normalize_formula_args

Normalize formula arguments in arglist

ns

Generate a Basis Matrix for Natural Cubic Splines

parameters

Parameter names of an JointAI object

PBC

PBC data

plot_all

Visualize the distribution of all variables in the dataset

plot_imp_distr

Plot the distribution of observed and imputed values

plot.JointAI

Plot an object object inheriting from class 'JointAI'

predDF

Create a new data frame for prediction

predict.JointAI

Predict values from an object of class JointAI

set_refcat

Specify reference categories for all categorical covariates in the mod...

sharedParams

Parameters used by several functions in JointAI

split_formula_list

Split a list of formulas into fixed and random effects parts.

sum_duration

Calculate the sum of the computational duration of a JointAI object

summary.JointAI

Summarize the results from an object of class JointAI

Surv

Create a Survival Object

traceplot

Create traceplots for a MCMC sample

two_value_to_factor

Convert two-value vectors to factors

Joint analysis and imputation of incomplete data in the Bayesian framework, using (generalized) linear (mixed) models and extensions there of, survival models, or joint models for longitudinal and survival data, as described in Erler, Rizopoulos and Lesaffre (2021) <doi:10.18637/jss.v100.i20>. Incomplete covariates, if present, are automatically imputed. The package performs some preprocessing of the data and creates a 'JAGS' model, which will then automatically be passed to 'JAGS' <https://mcmc-jags.sourceforge.io/> with the help of the package 'rjags'.

  • Maintainer: Nicole S. Erler
  • License: GPL (>= 2)
  • Last published: 2026-01-30