carts0.1.0 package

Simulation-Based Assessment of Covariate Adjustment in Randomized Trials

rnb

Simulate from a negative binomial distribution

sample_covar_parametric_model

Sample from an estimated parametric covariate model

setargs

Set default arguments of a function

carts-package

carts: Simulation-Based Assessment of Covariate Adjustment in Randomiz...

est_glm

Construct estimator for the treatment effect in RCT

est_phreg

Marginal Cox proportional hazards model for the treatment effect in RC...

aggrsurv

Aggregate data in counting process format

append-set-.list

Assignment function to append values to existing list

bisection

Root finding by bisection

covar_add

Add additional covariates to existing list of covariates

covar_bootstrap

Sample from empirical distribution of covariate data

covar_join

Add additional covariates to existing covariate random generator

covar_loggamma

Simulate from a log gamma-gaussian copula distribution

covar_normal

Simulate from multivariate normal distribution

derive_covar_distribution

Derive covariate distribution from covariate data type

est_adj

Construct estimator for the treatment effect in RCT based on covariate...

estimate_covar_model_full_cond

Full conditional covariate simulation model

get_factor_levels

Get levels for factor columns in data.table

optim_sa

Root solver by Stochastic Approximation

outcome_binary

Simulate from binary model given covariates

outcome_continuous

Simulate from continuous outcome model given covariates

outcome_count

Simulate from count model given covariates

outcome_lp

Calculate linear predictor from covariates

outcome_phreg

Outcome model for time-to-event end-points (proportional hazards)

outcome_recurrent

EXPERIMENTAL: Outcome model for recurrent events with terminal events ...

outcome_shared

Outcome model

rmvn

Multivariate normal distribution function

trial.estimates-class

trial.estimates class object

Trial

R6 class for power and sample-size calculations for a clinical trial

Monte Carlo simulation framework for different randomized clinical trial designs with a special emphasis on estimators based on covariate adjustment. The package implements regression-based covariate adjustment (Rosenblum & van der Laan (2010) <doi:10.2202/1557-4679.1138>) and a one-step estimator (Van Lancker et al (2024) <doi:10.48550/arXiv.2404.11150>) for trials with continuous, binary and count outcomes. The estimation of the minimum sample-size required to reach a specified statistical power for a given estimator uses bisection to find an initial rough estimate, followed by stochastic approximation (Robbins-Monro (1951) <doi:10.1214/aoms/1177729586>) to improve the estimate, and finally, a grid search to refine the estimate in the neighborhood of the current best solution.

  • Maintainer: Benedikt Sommer
  • License: Apache License (>= 2)
  • Last published: 2025-11-13