Skip to contents

Primary Analysis

Main entry point for IAIPWE estimation

iaipwe()
IAIPWE for K-stage SMARTs with up to 2 treatment options at each stage
estimate_values()
Estimate values for all treatment regimes

Trial Design

Functions for SMART design, sample size, and stopping boundaries

smart_design()
Compute stopping boundaries and sample size for a group sequential SMART
get_sample_size()
Determine sample size for a group sequential SMART design
get_sample_size_chi()
Determine sample size for a chi-squared global test in a group sequential SMART design
get_bounds()
Compute all stopping boundaries for a two-analysis group sequential design
get_bounds_chi()
Compute the first chi-squared stopping boundary for a group sequential design
get_first_bound()
Compute the first stopping boundary for a group sequential design
get_next_bound()
Compute subsequent stopping boundaries for a group sequential design

Data Generation and Simulation

Helpers for generating treatment regimes and simulating trials

gen_no_trt_resp()
Generate sample data for a two-stage SMART where responders are not re-randomized
regime_list_no_trt_resp()
Generate regime lists for a two-stage SMART where responders are not re-randomized
sim_treatment()
Simulate treatment assignments for a single stage
block_rand()
Create a blocked randomization function

Model Fitting

Q-learning and propensity score model fitting

qstep()
Fit an outcome regression (Q-function) model for a single stage
pstep()
Fit a propensity score model for a single stage
get_q_fits()
Fit outcome regression (Q-function) models across all stages for a single regime
get_q_coefs()
Extract coefficients from all fitted Q-function models
pi_fits()
Fit propensity score models for all stages

Variance Estimation

Sandwich variance components

get_an()
Compute the An matrix for the sandwich variance estimator
get_bn()
Compute the Bn matrix for the sandwich variance estimator
value_terms()
Compute the individual-level value terms for a single regime
get_nu()
Estimate stage arrival probabilities (nu)
get_kappa()
Compute the kappa (stage reached) for each individual

Data

Example datasets

pcsttrial
pcsttrial: Simulated Clinical Trial Data for Pain Coping Skills Training