rbmi1.2.6 package

Reference Based Multiple Imputation

add_class

Add a class

adjust_trajectories

Adjust trajectories due to the intercurrent event (ICE)

adjust_trajectories_single

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

analyse

Analyse Multiple Imputed Datasets

ancova

Analysis of Covariance

ancova_single

Implements an Analysis of Covariance (ANCOVA)

apply_delta

Applies delta adjustment

as_analysis

Construct an analysis object

as_ascii_table

as_ascii_table

as_class

Set Class

as_cropped_char

as_cropped_char

as_dataframe

Convert object to dataframe

as_draws

Creates a draws object

as_imputation

Create an imputation object

as_indices

Convert indicator to index

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.

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

do_not_run

Do not run this function

draws

Fit the base imputation model and get parameter estimates

encap_get_mmrm_sample

Encapsulate get_mmrm_sample

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

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

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_cluster

Create cluster

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

get_ests_bmlmi

Von Hippel and Bartlett pooling of BMLMI method

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

Determine patients missingness group

get_pattern_groups_unique

Get Pattern Summary

get_pool_components

Expected Pool Components

get_visit_distribution_parameters

Derive visit distribution parameters

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

Create imputed datasets

impute_data_individual

Impute data for a single subject

impute_internal

Create imputed datasets

impute_outcome

Sample outcome value

invert

invert

invert_indexes

Invert and derive indexes

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

method

Set the multiple imputation methodology

parametric_ci

Calculate parametric confidence intervals

pool

Pool analysis results obtained from the imputed datasets

pool_bootstrap_normal

Bootstrap Pooling via normal approximation

pool_bootstrap_percentile

Bootstrap Pooling via Percentiles

pool_internal

Internal Pool Methods

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

random_effects_expr

Construct random effects formula

rbmi-package

rbmi: Reference Based Multiple Imputation

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

sample_ids

Sample Patient Ids

sample_list

Create and validate a sample_list object

sample_mvnorm

Sample random values from the multivariate normal distribution

sample_single

Create object of sample_single class

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.analysis

Validate analysis objects

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

validate_analyse_pars

Validate analysis results

validate_datalong

Validate a longdata object

validate_strategies

Validate user specified strategies

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: 2023-11-24