Install
$ agentstack add skill-choxos-biostatagent-regression-models ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
About
Regression Models
Linear Regression
Stan
data {
int N;
int K;
matrix[N, K] X;
vector[N] y;
}
parameters {
real alpha;
vector[K] beta;
real 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] N;
int K;
matrix[N, K] X;
array[N] int 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]) 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 sigma;
real 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)
transformed data {
matrix[N, K] Q = qr_thin_Q(X) * sqrt(N - 1.0);
matrix[K, K] R = qr_thin_R(X) / sqrt(N - 1.0);
matrix[K, K] R_inv = inverse(R);
}
parameters {
vector[K] theta;
real sigma;
}
model {
y ~ normal(Q * theta, sigma);
}
generated quantities {
vector[K] beta = R_inv * theta;
}
Prior Recommendations
| Parameter | Weakly Informative | Reference | |-----------|-------------------|-----------| | Intercept | normal(0, 10) | Scale of outcome | | Coefficients | normal(0, 2.5) | Gelman et al. | | SD (sigma) | exponential(1) | Half-normal alternative | | Logistic coef | normal(0, 2.5) | ~4 logit units = extreme |
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: choxos
- Source: choxos/BiostatAgent
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.