AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Stc Methodology

skill-choxos-biostatagent-stc-methodology · by choxos

Deep methodology knowledge for STC including outcome regression, effect modifier selection, covariate centering, and comparison with MAIC. Use when conducting or reviewing STC analyses.

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-choxos-biostatagent-stc-methodology

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-choxos-biostatagent-stc-methodology)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Stc Methodology? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

STC Methodology

Comprehensive methodological guidance for conducting rigorous Simulated Treatment Comparisons following NICE DSU TSD 18.

When to Use This Skill

  • Deciding between STC and MAIC
  • Selecting effect modifiers for an STC model
  • Implementing covariate centering on an aggregate target population
  • Reviewing STC code or results
  • Planning Bayesian or frequentist sensitivity analyses

Fundamental Concept

Outcome Regression vs Propensity Weighting

STC approach

  • Fit an outcome regression model in the IPD study.
  • Include treatment and treatment-covariate interactions for relevant effect modifiers.
  • Center covariates on the external aggregate population.
  • Interpret the treatment coefficient as the adjusted effect in that external population.

MAIC approach

  • Reweight IPD to match external aggregate covariate summaries.
  • Estimate the weighted treatment effect in the target population.
  • Use weight diagnostics and effective sample size as core feasibility checks.

Key Equation for a Binary Anchored STC

logit{P(Y = 1)} = beta_0 + beta_trt * Treatment
                + beta_X * X_centered
                + beta_trt_X * Treatment * X_centered

X_centered = X - X_external

With centered covariates, beta_trt estimates the treatment effect in the external population, because X_centered = 0 corresponds to the aggregate target values.

Assumptions

Conditional Constancy of Relative Effects

  • Anchored STC assumes relative effects are constant across populations after adjustment for all relevant effect modifiers.
  • The assumption is not testable with the available data alone.
  • Effect modifiers must be measured in the IPD and reported as compatible aggregate summaries in the external study.

Model Specification

STC additionally assumes that the outcome model is correctly specified:

  • Appropriate link function for the endpoint.
  • Defensible functional forms for continuous covariates.
  • Required treatment-covariate interactions included.
  • No unsupported extrapolation beyond the IPD covariate support.
Trade-off:
STC can be more precise than MAIC if the outcome model is correct.
STC can be biased if the model, functional form, or interactions are wrong.
MAIC avoids specifying an outcome model but can lose precision through low ESS.

Effect Modifier Selection

What Is an Effect Modifier?

A covariate is an effect modifier if the relative treatment effect differs by covariate value. Selection should be based on:

  • Clinical or biological plausibility.
  • Prior studies, subgroup analyses, or mechanism of action.
  • Statistical interaction evidence from IPD as supportive evidence.
  • Availability and compatible definition in aggregate data.
  • Meaningful imbalance between the IPD and target populations.

Interaction p-values alone should not determine the final covariate set. Interaction tests are commonly underpowered, and selection after inspecting many tests can inflate false-positive findings.

Effect Modifier Assessment

candidate_covariates 
  dplyr::mutate(
    age_c = age - agd_targets["age"],
    sex_male_c = sex_male - agd_targets["sex_male"],
    biomarker_pos_c = biomarker_pos - agd_targets["biomarker_pos"]
  )

For centered binary covariates, subtract the external proportion. For categorical covariates with more than two levels, center compatible dummy variables or use another clearly documented parameterization.

Hierarchy

When a treatment-covariate interaction is included, include the corresponding main effects unless there is a strong modeling reason not to. This keeps the model hierarchically well formed and the interaction interpretable.

Anchored vs Unanchored STC

Anchored STC

Setup:
IPD trial: A vs Common
External aggregate trial: B vs Common
Target: A vs B

Steps:
1. Center effect modifiers on the external aggregate population.
2. Fit the IPD outcome model with interactions.
3. Extract A vs Common at the external population.
4. Obtain B vs Common and its uncertainty from aggregate data.
5. Calculate A vs B using Bucher logic on the correct effect scale.

Unanchored STC

Setup:
No common comparator.
Target: direct comparison of absolute outcomes for A vs B.

Additional requirements:
1. Adjust for all prognostic factors, not only effect modifiers.
2. Assume absolute outcomes are transportable after adjustment.
3. Align outcome definitions, follow-up, and analysis populations.

Unanchored STC is high risk and should be avoided when anchored evidence, NMA, or ML-NMR can answer the question.

Frequentist Implementation Pattern

library(dplyr)

ipd_stc 
  mutate(
    age_c = age - agd_targets["age"],
    sex_male_c = sex_male - agd_targets["sex_male"],
    treatment = relevel(factor(treatment), ref = "Placebo")
  )

fit 
  dplyr::mutate(
    age_c = age - agd_targets["age"],
    sex_male_c = sex_male - agd_targets["sex_male"],
    treatment = stats::relevel(factor(treatment), ref = "Placebo")
  )

# 3. Fit outcome regression with interactions.
fit <- stats::glm(
  response ~ treatment * (age_c + sex_male_c),
  data = ipd_stc,
  family = stats::binomial()
)

# 4. Extract adjusted A vs common-comparator effect.
coef_name <- "treatmentDrug A"
log_or_ac <- unname(stats::coef(fit)[coef_name])
se_log_or_ac <- sqrt(stats::vcov(fit)[coef_name, coef_name])

# 5. Combine with external B vs common-comparator estimate.
log_or_ab <- log_or_ac - log_or_bc
se_log_or_ab <- sqrt(se_log_or_ac^2 + se_log_or_bc^2)

Resources

  • NICE DSU TSD 18: Population-adjusted indirect comparisons
  • Phillippo et al. (2016): Methods for population-adjusted indirect comparisons
  • Ishak et al. (2015): STC simulation studies
  • Current documentation for the modeling packages actually used in the analysis

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.