Skip to contents

Runs every family in a stress_plan(), assembles the census and the verdict, and keeps the rows by family.

Usage

run_plan(plan, cores = 1L, seed = 1)

Arguments

plan

A stress_plan.

cores

Worker processes; the cluster is started once and shared by every family.

seed

Seed passed to the families that take one, unless the plan sets it.

Value

An object of class stress_result: plan, rows (a list of stress_rows by family), census, verdict, base and elapsed.

Examples

small <- mmrm::fev_data[mmrm::fev_data$USUBJID %in% paste0("PT", 1:60), ]
spec <- stress_spec(small, "FEV1", "USUBJID", "AVISIT", "ARMCD", "PBO", covariates = ~ FEV1_BL,
                    covariance = "cs", method = "Satterthwaite", vcov = "Asymptotic")
plan <- stress_plan(spec, covariance = list(structures = c("cs", "ar1h")),
                    inference = NULL, covariates = NULL, weights = FALSE,
                    loo = list(by = "RACE"), permute = list(n = 9), reference = NULL,
                    estimator = list(estimators = "ancova"), fragility = list(max_k = 1))
res <- run_plan(plan)
res
#> Pre-specified stress test
#> 5 families, 8 rows, 6 counted; 0.0 min
#> Base: estimate 3.48, 95% CI -0.796 to 7.75, p = 0.11 (alpha 0.05)
#> Counted: 3 alternative analyses, 3 deletions; 0 significant, 0 crossed alpha
#> Outside base CI: 0; direction reversed: 0; largest shift: 0.474 base SE
#> Verdict (interval rule): ROBUST over all counted rows; ROBUST over the 6 sensitivity analyses (same estimand; 0 supplementary rows)