method-model-choice skill
✓ VerifiedSelects and justifies statistical models like regression, survival, or Bayesian methods based on research aims, data structure, and estimands.
- GitHub stars
- 6
- Files
- 12
- Last commit
- Oct 31, 2026
- License
- MIT
- Allowed tools
- —
What does the method-model-choice skill do?
method-model-choice selects and justifies statistical models like regression, survival, or Bayesian methods based on research aims, data structure, and estimands.
Summary generated from the skill's SKILL.md.
About the method-model-choice skill
Selecting appropriate statistical models based on research aims and data structures is the primary function of this skill. It assists researchers and biostatisticians in moving beyond software defaults to choose methods like regression, survival, Bayesian, or mixed-effects models that align with specific estimands and data grains. The tool evaluates scientific aims, outcome types, dependence structures, and missing-data strategies to ensure the chosen model is scientifically sound.
An agent should load this skill when a study requires a primary model, alternative methods, or a documented rationale for a specific statistical approach. It produces a detailed model strategy markdown file and, when ready for review, an optional R or Python implementation scaffold. The process relies on existing research questions, data profiles, and evidence maps to ground its decisions. It maintains strict quality gates, marking strategies as blocked, provisional, or ready for review based on the availability of necessary design information and data quality signals.
What an agent can do with it
- 1Justify a primary statistical modelDetermine the most appropriate model for a research question by analyzing the estimand, outcome type, and data dependence.
- 2Generate implementation code scaffoldsCreate an R or Python code template that fits the selected model and includes necessary diagnostics.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the method-model-choice skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the method-model-choice skill in Plugin
/plugin marketplace add sajor2000/methodsmith /plugin install methodsmith@methodsmith
Install the method-model-choice skill in Claude Code
~/.claude/skills/method-model-choice/SKILL.md
$ npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-model-choice ~/.claude/skills/method-model-choiceInstall the method-model-choice skill in Claude Code (project)
.claude/skills/method-model-choice/SKILL.md
$ npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-model-choice .claude/skills/method-model-choiceInstall the method-model-choice skill in Codex
~/.agents/skills/method-model-choice/SKILL.md
$ npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-model-choice ~/.agents/skills/method-model-choiceInstall the method-model-choice skill in Gemini CLI
~/.gemini/skills/method-model-choice/SKILL.md
$ npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-model-choice ~/.gemini/skills/method-model-choiceInstall the method-model-choice skill in Claude.ai
npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-model-choice method-model-choice && zip -r method-model-choice.zip method-model-choice # claude.ai → Customize → Skills → + → Create skill → Upload a skill → method-model-choice.zip
Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablesajor2000/methodsmith/plugins/methodsmith/skills/method-model-choice is public and reachablegithub.com/sajor2000/methodsmith/tree/HEAD/plugins/methodsmi ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-10-31github.com/sajor2000/methodsmith/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/sajor2000/methodsmith/blob/HEAD/plugins/methodsmi ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/sajor2000/methodsmith/blob/HEAD/plugins/methodsmi ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 151 linesgithub.com/sajor2000/methodsmith/blob/HEAD/plugins/methodsmi ↗Pass
SKILL.md
View on GitHubModel Strategy
Skill Value
- Problem it solves: Model choices are often driven by software defaults or precedent instead of the estimand, outcome, data grain, dependence structure, and evidence.
- Use when: A study needs a primary model, alternatives, random-effects structure, R/Python implementation scaffold, or a documented reason for choosing one method over another.
- Output:
analysis/model-strategy/<slug>-model-strategy.md, an optional stack-matched.Ror.pyscaffold, and a__CE_MODEL_STRATEGY__handoff. - Ask only if: A load-bearing input cannot be established from the request, SAP, data profile, repository, or prior handoff.
- Do not do: Do not choose a final model before data grain and estimand are known, run models without authorization, install packages, fabricate language parity, or claim to replace human biostatistical approval.
- Interaction: Check repository, configuration, handoffs, and supplied artifacts first. Ask one decision-changing question at a time with
AskUserQuestionin Claude Code,request_user_inputin Codex,ask_userin Gemini, orask_userin Pi viapi-ask-user. In Claude Code, first callToolSearchwithselect:AskUserQuestionwhen the schema is not loaded. Only when no blocking tool exists or the call errors, present concise numbered choices in chat and wait.
Treat PhD-level biostatistical practice as the quality bar, not an identity claim. A complete recommendation is ready_for_review; only a named human reviewer can approve it.
Resolve Inputs
Read $ARGUMENTS and scan recent context for:
__CE_RESEARCH_QUESTION__
__CE_DATA_PROFILE__
__CE_DATA_QA__
__CE_BIOINFO_QC_PASS__
__CE_BIOINFO_QC_FAIL__
__CE_EVIDENCE_MAP__
__CE_METHOD_EXTRACT__
__CE_MODEL_STRATEGY__
__CE_LANG__
Also inspect a supplied SAP, data dictionary, QA report, and .methodsmith/config.local.yaml when present. For omics work, inspect reports/bioinfo-qa/*.md for the canonical pass/fail signal or sign-off blocker count. A __CE_BIOINFO_QC_FAIL__ signal or confirmed blockers make the strategy blocked; do not select or scaffold an omics model until they are resolved. Never inspect patient-level or row-level files merely to avoid asking for an already-missing design decision. Use aggregate QA outputs and authorized schema information whenever they are sufficient.
Create one decision per outcome-estimand pair. Before selecting a model, establish:
- Scientific aim: descriptive, associational, causal, predictive, validation, or evidence synthesis.
- Estimand and reporting scale: mean difference, odds ratio, risk ratio, rate ratio, hazard, marginal risk, conditional effect, prediction, pooled effect, or another explicit target.
- Outcome type and support, including zero mass, bounds, censoring, competing events, or repeated observation.
- Unit of analysis, dataset grain, denominator, and time zero/follow-up when applicable.
- Dependence: independent, paired, repeated, clustered, nested, crossed, spatial, or serial.
- Candidate fixed effects, grouping variables, within-cluster predictors, and design-mandated terms.
- Missing-data strategy and informative missingness/censoring risks.
- Usable observations, events, subjects, clusters, levels per grouping factor, and observations per cluster.
- Target stack and available package environment.
Gate the Decision
Use exactly one status:
| Status | Meaning | Code scaffold |
|---|---|---|
blocked |
Grain, unit, outcome, or another prerequisite is contradictory or unavailable. | None |
provisional |
A leading method can be named only under explicit unresolved assumptions. | None |
ready_for_review |
Inputs, rationale, evidence, diagnostics, and implementation path are complete enough for human review. | Required |
Do not call a recommendation final or approved. A failed data-QA or bioinformatics-QA gate is blocked. When no data exist yet, a design-stage recommendation may be provisional, with the exact future QA facts required to promote it. An estimand or design element that had to be assumed rather than established (for example, how death or another intercurrent event enters the estimand) is an unresolved assumption: ask the one question it raises, and if the answer is not yet in hand, use provisional and name the assumption in the approval prerequisites.
Route the Model
Read references/model-routing.md for every run. Read references/mixed-effects.md whenever observations are paired, repeated, clustered, nested, crossed, or longitudinal. Read references/advanced-models.md for survival, causal, predictive, Bayesian, joint-model, or meta-analysis branches.
Choose in this order:
- Aim and estimand.
- Outcome family and link/scale.
- Dependence and sampling/design structure.
- Time, censoring, competing events, missingness, and survey/cluster design.
- Estimation and inference method.
- Diagnostics, sensitivity analyses, and predeclared fallback triggers.
Do not select the most common model in prior papers by vote. Applied precedent is a feasibility clue; appropriateness comes from the current estimand and data-generating structure.
Ground the Decision
After the candidate decision questions are known, load method-evidence-map to acquire the evidence or consume an existing __CE_EVIDENCE_MAP__ artifact. That skill owns PubMed/Paperclip acquisition; model strategy owns mapping its evidence to model decisions.
Evidence access
When this run needs literature, read references/evidence-access.md first (tool use plus the model-decision evidence procedure); never invent a citation, effect size, or guideline item.
- Look up here: the method's primary reference and at least one applied example per candidate model family (acquired through
method-evidence-map, or directly with these tools when no map exists), plus the design-specific simulation or guidance that settles each contested decision.
Literature never overrides observed grain, estimand, design constraints, or a failed QA gate.
Match the Implementation Stack
Resolve language in this order: explicit language:r|python, current user request, stack profile, __CE_LANG__, then dominant analysis files and lockfiles. Ask only when both stacks are active and no owning analysis file is apparent.
- For R, read
references/r-implementation.md. - For Python, read
references/python-implementation.md.
Use installed, locked packages when they can implement the selected method. If the selected model lacks a credible implementation in the active stack, use provisional with code=none while a vetted alternate stack awaits human approval, or blocked when no credible implementation path exists. Never emit ready_for_review without the required scaffold, write fake code, or install or update packages without explicit authorization.
Write the Artifacts
Use a stable ASCII slug and write under analysis/model-strategy/:
<slug>-model-strategy.md
<slug>-model.R # R only, ready_for_review only
<slug>-model.py # Python only, ready_for_review only
For prediction-model strategies only, read references/ml-prediction-decisions.md
and references/ml-prediction-decisions.schema.json. Also write
<slug>-model-strategy.decisions.json beside the memo and check its agreement
with the memo before handing off. Other model branches keep their existing outputs.
The memo must contain:
- An exact
Status: <blocked|provisional|ready_for_review>line and named human reviewer (pendinguntil a human acts). - Research aim, estimand, effect/reporting scale, and unit of analysis.
- Dataset grain, denominator, sample/event/cluster counts, and dependence structure.
- Candidate models considered and a reason each non-selected candidate was rejected or reserved for sensitivity analysis.
- Primary model: family, link, formula roles, fixed effects, random effects, covariance/correlation structure, estimation, and inference.
- Missing-data, censoring, competing-risk, and multiplicity handling as applicable.
- Required diagnostics with pass/fail interpretation and predeclared fallback triggers.
- Sensitivity analyses that test the assumptions most likely to alter the conclusion.
- R/Python package and API choice, detected version or unresolved version gap, code path, and known capability limits.
- Decision-to-evidence ledger with identifiers, query provenance, and
abstract/full_textlabels. - Residual uncertainties and the exact evidence required for approval.
The scaffold must be input-contract-first, fail on missing columns, fit only the selected primary model, include diagnostics and sensitivity hooks, and never contain synthetic results or hard-coded patient values. It may use placeholders for approved column names only when the memo marks them clearly.
Hand Off
Emit exactly one terminal signal:
__CE_MODEL_STRATEGY__ memo=<path> code=<path|none> language=<r|python|none> status=<blocked|provisional|ready_for_review> primary=<model-id|none> evidence=<path|none>
Then route downstream work without duplicating it:
| Need | Owner |
|---|---|
| Canonical SAP | method-plan |
| Claim/dataset/estimand schema | method-sap |
| Literature evidence map | method-evidence-map |
| Formal site/study synthesis | method-clif-meta-analysis |
| Literature effect-size anchor for power | method-meta-analysis |
| Power or simulation-based design | method-power |
| Prediction experiment tracking | method-ml-track |
| Implementation and statistical audit | method-review |
The model-strategy memo is a decision input to the SAP, not a competing SAP.
Files in this skill
12method-model-choice skill questions
How do I install the method-model-choice skill in Claude Code?
Run npx degit sajor2000/methodsmith/plugins/methodsmith/skills/method-model-choice ~/.claude/skills/method-model-choice. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the method-model-choice skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
When should I use this skill?
Use this skill when a study needs a primary model, alternative models, a random-effects structure, or a documented reason for choosing one method over another.
Can the agent choose a final model without data grain and estimand information?
No, the agent is instructed not to choose a final model before the data grain and estimand are known.