regression-models

regression-models is a skill for Claude Code, Codex from choxos/BiostatAgent. It costs 31 tokens per session (1,001 once invoked), scanned A, original, MIT.

A collection of Bayesian regression models for predicting outcomes from one or more input variables. It includes linear, logistic, Poisson, negative-binomial, and robust regression examples in Stan and JAGS.

In plain words
What is it for?
Use it to create models for numeric outcomes, yes-or-no outcomes, event counts, overdispersed counts, and data with unusual observations.
Why use it?
It provides model structures for continuous, binary, and count data without requiring you to design every equation from scratch. The examples also show how to express priors, likelihoods, and predictions.

Skill for Claude CodeCodex

Part of the bayesian-modeling plugin — 9 skills, 3 commands, 6 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/choxos/biostatagent/regression-models
Any agent
npx skills add choxos/BiostatAgent --skill regression-models
Clone the repo
git clone --depth 1 https://github.com/choxos/BiostatAgent

Made for: Claude Code, Codex.

Or install bayesian-modeling, the plugin that ships this one along with the rest of its 9 skills, 3 commands, 6 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for regression-models

README.md
[![agentmods](https://agentmods.dev/badge/skills/choxos/biostatagent/regression-models.svg)](https://agentmods.dev/skills/choxos/biostatagent/regression-models)
Your own site
<a href="https://agentmods.dev/skills/choxos/biostatagent/regression-models"><img src="https://agentmods.dev/badge/skills/choxos/biostatagent/regression-models.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,001 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00031 $0.01001
Opus 5 $0.00015 $0.00500
Sonnet 5 $0.00006 $0.00200
Haiku 4.5 $0.00003 $0.00100

Measured 5d ago against content hash 3e4867ae4f34, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

regression-models scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/bayesian-modeling/skills/regression-models/SKILL.md · 163 lines

How it starts

The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Regression Models

Linear Regression

Stan

data {
  int<lower=0> N;
  int<lower=0> K;
  matrix[N, K] X;
  vector[N] y;
}
parameters {
  real alpha;
  vector[K] beta;
  real<lower=0> sigma;
}
model {
  alpha ~ normal(0, 10);
  beta ~ normal(0, 5);
  sigma ~ exponential(1);
  y ~ normal(alpha + X * beta, sigma);
}
generated quantities {
  array[N] real y_rep;
  for (n in 1:N)
    y_rep[n] = normal_rng(alpha + X[n] * beta, sigma);
}

JAGS

model {
  for (i in 1:N) {
    y[i] ~ dnorm(mu[i], tau)
    mu[i] <- alpha + inprod(X[i,], beta[])
  }
  alpha ~ dnorm(0, 0.001)
  for (k in 1:K) { beta[k] ~ dnorm(0, 0.001) }
  tau ~ dgamma(0.001, 0.001)
  sigma <- 1/sqrt(tau)
}

Logistic Regression

Stan

data {
  int<lower=0> N;
  int<lower=0> K;
  matrix[N, K] X;
  array[N] int<lower=0,upper=1> y;
}
parameters {
  real alpha;
  vector[K] beta;
}
model {
  alpha ~ normal(0, 2.5);
  beta ~ normal(0, 2.5);
  y ~ bernoulli_logit(alpha + X * beta);
}

JAGS

model {
  for (i in 1:N) {
    y[i] ~ dbern(p[i])
    logit(p[i]) <- alpha + inprod(X[i,], beta[])
  }
  alpha ~ dnorm(0, 0.4)    # SD ≈ 1.58
  for (k in 1:K) { beta[k] ~ dnorm(0, 0.4) }
}

Poisson Regression

Stan

model {
  alpha ~ normal(0, 5);
  beta ~ normal(0, 2.5);
  y ~ poisson_log(alpha + X * beta);
}

JAGS

model {
  for (i in 1:N) {
    y[i] ~ dpois(lambda[i])
    log(lambda[i]) <- alpha + inprod(X[i,], beta[])
  }
}

Negative Binomial (Overdispersed Counts)

Stan

parameters {
  real alpha;
  vector[K] beta;
  real<lower=0> phi;  // Overdispersion
}
model {
  phi ~ exponential(1);
  y ~ neg_binomial_2_log(alpha + X * beta, phi);
}

Robust Regression (Student-t Errors)

Stan

parameters {
  real alpha;
  vector[K] beta;
  real<lower=0> sigma;
  real<lower=1> nu;  // Degrees of freedom
}
model {
  nu ~ gamma(2, 0.1);  // Prior on df
  y ~ student_t(nu, alpha + X * beta, sigma);
}

QR Decomposition (For Correlated Predictors)

Read the full file on GitHub · 163 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 163 lines · 31 tokens per session scan A 3e4867ae4f34

Subscribe to this mod's changes

regression-models is a skill published in the GitHub repository choxos/BiostatAgent (11 stars, last pushed 3mo ago), licensed MIT. It adds 31 tokens to every session and 1,001 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

torch-geometric

PyTorch Geometric (PyG) for graph neural networks — node/link/graph classification, message passing (GCN, GAT, GraphSAGE, GIN), heterogeneous graphs, neighbor sampling, and custom datasets. Use when working with torchgeometric, not for general NetworkX analytics or non-graph PyTorch models.

K-Dense-AI/scientific-agent-skills · 71 tokens

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard…

K-Dense-AI/scientific-agent-skills · 74 tokens

bids

Use this skill when working with Brain Imaging Data Structure (BIDS) datasets: organizing neuroscience and biomedical data (MRI, EEG, MEG, iEEG, PET, microscopy, NIRS, motion capture, EMG, MR spectroscopy, behavioral), querying BIDS layouts, validating compliance, converting DICOM to BIDS, writing metadata sidecars…

K-Dense-AI/scientific-agent-skills · 80 tokens

bulk-rnaseq

End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA enrichment (pathway-enrichment), and…

K-Dense-AI/scientific-agent-skills · 218 tokens

esm

Use when working directly with the esm Python SDK, ESM3 or ESMC model IDs, Forge/Biohub inference clients, or ESMFold2 folding workflows.

K-Dense-AI/scientific-agent-skills · 39 tokens

geniml

Use Geniml for audited local genomic-interval workflows: validate BED and universe contracts, plan Region2Vec or scEmbed runs, inspect model/tokenizer compatibility, and assess consensus universes.

K-Dense-AI/scientific-agent-skills · 43 tokens