stat-fit-glm
Skill4 starsChanged 12 days agoMITView on GitHub
Fit a generalized linear model (Poisson, Binomial, or Gaussian family) for count or non-normally distributed outcome data.
In this repository56 other files it gives its agents.
- bioinformatics-env-setupSkill
- design-thermostable-mutationsSkill
- download-gdcSkill
- download-geoSkill
- download-sraSkill
- source-summarizerSkill
- genome-alignment-qcSkill
- genome-read-alignmentSkill
- genome-variant-annotationSkill
- genome-variant-callingSkill
- genome-variant-filteringSkill
- metagenome-assemblySkill
- metagenome-binningSkill
- metagenome-functional-profilingSkill
- metagenome-host-removalSkill
- metagenome-taxonomic-profilingSkill
- ncbi-eutilities-assistantSkill
- ngs-quality-controlSkill
- ngs-read-preprocessingSkill
- paper-to-briefSkill
- predict-protein-heat-stabilitySkill
- researchSkill
- rnaseq-alignment-qcSkill
- rnaseq-differential-expressionSkill
- rnaseq-functional-enrichmentSkill
- rnaseq-read-alignmentSkill
- rnaseq-read-countingSkill
- rnaseq-transcript-quantificationSkill
- rpsblast-assistantSkill
- scrnaseq-cellranger-countSkill
- scrnaseq-cell-type-annotationSkill
- scrnaseq-clusteringSkill
- scrnaseq-differential-expressionSkill
- scrnaseq-integrationSkill
- scrnaseq-quality-controlSkill
- scrnaseq-trajectory-analysisSkill
- search-enaSkill
- search-geoSkill
- search-gsaSkill
- search-ncbi-datasetsSkill
- search-sraSkill
- stat-analyze-distributionSkill
- stat-assess-data-qualitySkill
- stat-bayesian-estimationSkill
- stat-cluster-samplesSkill
- stat-compare-multiple-groupsSkill
- stat-compare-two-groupsSkill
- stat-fit-linear-modelSkill
- stat-learn-bayesian-networkSkill
- stat-logistic-regressionSkill
- stat-nonlinear-embeddingSkill
- stat-pairwise-correlationSkill
- stat-pcaSkill
- stat-survival-analysisSkill
- structured-intelligence-skill-creatorSkill
- <skill-id>Skill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use cases: RNA-seq count modeling, species abundance counts, clinical event rates
- Very specific: line 25
Check overdispersion: true (default for Poisson)
- Distinctive: line 30
Read data; validate that response variable is compatible with the specified family (non-negative integers for Poisson, 0/1 or proportions …
- Distinctive: line 32
If Poisson: test for overdispersion (dispersion statistic).
- Distinctive: line 36
Write results table (TSV), model summary (text), and diagnostic plots (PDF) to output directory.
- Distinctive: line 52
Does not handle zero-inflated data.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Generalized Linear Model
Use When
- User has count data (e.g., read counts, event counts) requiring Poisson or negative binomial regression
- User has a proportion or binary outcome requiring binomial regression
- User wants a unified framework for regression across different data distributions
- Use cases: RNA-seq count modeling, species abundance counts, clinical event rates
Inputs
- Required:
- Data table (CSV or TSV) with a response variable and one or more predictor columns
- Response variable name
- Predictor variable name(s)
- GLM family:
poisson,binomial, orgaussian
- Optional:
- Link function: default per family (
logfor Poisson,logitfor Binomial,identityfor Gaussian) - Offset variable name (for Poisson rate models, e.g., log library size)
- Check overdispersion:
true(default for Poisson) - Output directory (default:
./glm_output)
- Link function: default per family (
Workflow
- Read data; validate that response variable is compatible with the specified family (non-negative integers for Poisson, 0/1 or proportions for Binomial).
- Fit GLM using the specified family and link function.
- If Poisson: test for overdispersion (dispersion statistic). If overdispersed, automatically refit with quasi-Poisson or negative binomial and report.
- Report for each coefficient: estimate (on link scale), standard error, z-statistic, p-value, exponentiated estimate (rate ratio for log link, odds ratio for logit link) with 95% CI.
- Report model fit: null deviance, residual deviance, AIC, degrees of freedom.
- Generate diagnostic plots: residuals vs. fitted (Pearson residuals), Q-Q plot of deviance residuals.
- Write results table (TSV), model summary (text), and diagnostic plots (PDF) to output directory.
- Report overdispersion finding and family choice justification.
- Save the executable analysis script (
analysis_code.pyoranalysis_code.R) and software version manifest (session_info.txt) used to produce results.
Output Contract
- Coefficient table (TSV): term, estimate, std_error, z_statistic, p_value, exp_estimate, ci_lower, ci_upper
- Model fit summary (TSV): family, link, null_deviance, residual_deviance, aic, df_residual
- Diagnostic plots (PDF)
- Overdispersion test result (Poisson only, printed to stdout)
- Reproducibility artifacts:
analysis_code.pyoranalysis_code.R, plussession_info.txt
Limits
- Negative binomial GLM is preferred over Poisson when count data is overdispersed (common in RNA-seq — use DESeq2 instead for that use case).
- Binomial GLM requires the response to be a proportion [0,1] or a two-column success/failure matrix for aggregated data.
- Does not handle zero-inflated data; use hurdle or zero-inflated models separately.
- Common failure: passing a continuous response with Poisson family — verify data type before running.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

