rbmi1.3.1 package

Reference Based Multiple Imputation

add_class

Add a class

as_draws

Creates a draws object

as_imputation

Create an imputation object

as_indices

Convert indicator to index

extract_imputed_df

Extract imputed dataset

extract_imputed_dfs

Extract imputed datasets

extract_params

Extract parameters from a MMRM model

fit_mcmc

Fit the base imputation model using a Bayesian approach

get_ests_bmlmi

Von Hippel and Bartlett pooling of BMLMI method

sample_single

Create object of sample_single class

get_example_data

Simulate a realistic example dataset

get_jackknife_stack

Creates a stack object populated with jackknife samples

get_mmrm_sample

Fit MMRM and returns parameter estimates

get_pattern_groups_unique

Get Pattern Summary

get_pattern_groups

Determine patients missingness group

get_pool_components

Expected Pool Components

get_session_hash

Get session hash

get_stan_model

Get Compiled Stan Object

get_visit_distribution_parameters

Derive visit distribution parameters

pool_internal

Internal Pool Methods

as_dataframe

Convert object to dataframe

sample_list

Create and validate a sample_list object

check_mcmc

Diagnostics of the MCMC

compute_sigma

Compute covariance matrix for some reference-based methods (JR, CIR)

convert_to_imputation_list_df

Convert list of imputation_list_single() objects to an `imputation_l...

d_lagscale

Calculate delta from a lagged scale coefficient

delta_template

Create a delta data.frame template

sample_mvnorm

Sample random values from the multivariate normal distribution

validate.draws

Validate draws object

validate.is_mar

Validate is_mar for a given subject

validate.ivars

Validate inputs for vars

validate

Generic validation method

validate.references

Validate user supplied references

validate.sample_list

Validate sample_list object

validate.sample_single

Validate sample_single object

validate.simul_pars

Validate a simul_pars object

validate.stan_data

Validate a stan_data object

as_class

Set Class

as_cropped_char

as_cropped_char

adjust_trajectories_single

Adjust trajectory of a subject's outcome due to the intercurrent event...

adjust_trajectories

Adjust trajectories due to the intercurrent event (ICE)

analyse

Analyse Multiple Imputed Datasets

ancova_single

Implements an Analysis of Covariance (ANCOVA)

ancova

Analysis of Covariance

apply_delta

Applies delta adjustment

as_analysis

Construct an analysis object

as_ascii_table

as_ascii_table

as_mmrm_df

Creates a "MMRM" ready dataset

as_mmrm_formula

Create MMRM formula

as_model_df

Expand data.frame into a design matrix

as_simple_formula

Creates a simple formula object from a string

as_stan_array

As array

as_strata

Create vector of Stratas

assert_variables_exist

Assert that all variables exist within a dataset

char2fct

Convert character variables to factor

check_ESS

Diagnostics of the MCMC based on ESS

check_hmc_diagn

Diagnostics of the MCMC based on HMC-related measures.

draws

Fit the base imputation model and get parameter estimates

ensure_rstan

Ensure rstan exists

eval_mmrm

Evaluate a call to mmrm

expand

Expand and fill in missing data.frame rows

extract_covariates

Extract Variables from string vector

extract_data_nmar_as_na

Set to NA outcome values that would be MNAR if they were missing (i.e....

extract_draws

Extract draws from a stanfit object

fit_mmrm

Fit a MMRM model

generate_data_single

Generate data for a single group

get_bootstrap_stack

Creates a stack object populated with bootstrapped samples

get_conditional_parameters

Derive conditional multivariate normal parameters

get_delta_template

Get delta utility variables

get_draws_mle

Fit the base imputation model on bootstrap samples

get_ESS

Extract the Effective Sample Size (ESS) from a stanfit object

getStrategies

Get imputation strategies

has_class

Does object have a class ?

ife

if else

imputation_df

Create a valid imputation_df object

imputation_list_df

List of imputations_df

imputation_list_single

A collection of imputation_singles() grouped by a single subjid ID

imputation_single

Create a valid imputation_single object

impute_data_individual

Impute data for a single subject

random_effects_expr

Construct random effects formula

impute_internal

Create imputed datasets

impute_outcome

Sample outcome value

impute

Create imputed datasets

invert_indexes

Invert and derive indexes

invert

invert

is_absent

Is value absent

is_char_fact

Is character or factor

is_char_one

Is single character

is_in_rbmi_development

Is package in development mode?

is_num_char_fact

Is character, factor or numeric

locf

Last Observation Carried Forward

longDataConstructor

R6 Class for Storing / Accessing & Sampling Longitudinal Data

ls_design

Calculate design vector for the lsmeans

lsmeans

Least Square Means

make_rbmi_cluster

Create a rbmi ready cluster

method

Set the multiple imputation methodology

par_lapply

Parallelise Lapply

parametric_ci

Calculate parametric confidence intervals

pool_bootstrap_normal

Bootstrap Pooling via normal approximation

pool_bootstrap_percentile

Bootstrap Pooling via Percentiles

sample_ids

Sample Patient Ids

pool

Pool analysis results obtained from the imputed datasets

prepare_stan_data

Prepare input data to run the Stan model

print.analysis

Print analysis object

print.draws

Print draws object

print.imputation

Print imputation object

progressLogger

R6 Class for printing current sampling progress

pval_percentile

P-value of percentile bootstrap

QR_decomp

QR decomposition

rbmi-package

rbmi: Reference Based Multiple Imputation

rbmi-settings

rbmi settings

record

Capture all Output

recursive_reduce

recursive_reduce

remove_if_all_missing

Remove subjects from dataset if they have no observed values

rubin_df

Barnard and Rubin degrees of freedom adjustment

rubin_rules

Combine estimates using Rubin's rules

scalerConstructor

R6 Class for scaling (and un-scaling) design matrices

set_simul_pars

Set simulation parameters of a study group.

set_vars

Set key variables

simulate_data

Generate data

simulate_dropout

Simulate drop-out

simulate_ice

Simulate intercurrent event

simulate_test_data

Create simulated datasets

sort_by

Sort data.frame

split_dim

Transform array into list of arrays

split_imputations

Split a flat list of imputation_single() into multiple `imputation_d...

Stack

R6 Class for a FIFO stack

str_contains

Does a string contain a substring

strategies

Strategies

string_pad

string_pad

transpose_imputations

Transpose imputations

transpose_results

Transpose results object

transpose_samples

Transpose samples

validate_analyse_pars

Validate analysis results

validate_datalong

Validate a longdata object

validate_strategies

Validate user specified strategies

validate.analysis

Validate analysis objects

Implements standard and reference based multiple imputation methods for continuous longitudinal endpoints (Gower-Page et al. (2022) <doi:10.21105/joss.04251>). In particular, this package supports deterministic conditional mean imputation and jackknifing as described in Wolbers et al. (2022) <doi:10.1002/pst.2234>, Bayesian multiple imputation as described in Carpenter et al. (2013) <doi:10.1080/10543406.2013.834911>, and bootstrapped maximum likelihood imputation as described in von Hippel and Bartlett (2021) <doi: 10.1214/20-STS793>.

  • Maintainer: Craig Gower-Page
  • License: Apache License (>= 2)
  • Last published: 2024-12-11