Skip to contents

Refits the model on cumulative case subsets (cases 1-2, then 1-3, ...) with the same prior each refit, tracking how the treatment-effect estimate and its interval change as cases accrue. This is a cumulative-refit variant of the sequential workflow described by Dowdy et al. (2026); the posterior is not literally carried forward as the next prior.

Usage

run_sequential_update(
  data,
  case_var = "case",
  formula_str = NULL,
  family = "gaussian",
  iter = 2000,
  chains = 2
)

Arguments

data

Data frame containing SCD data.

case_var

Name of the case variable.

formula_str

Model formula string; defaults to "outcome ~ phase + (1|case)".

family

Model family (default "gaussian").

iter

Number of sampling iterations.

chains

Number of MCMC chains.

Value

A list with tracking (data frame of cumulative estimates) and final_model.

Examples

if (interactive()) {
run_sequential_update(simulate_scd_data(n_cases = 5))
}