[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CZ65YZGJV40F2FZNH04PBS":3,"skill-same:01M6CZ65YZGJV40F2FZNH04PBS":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":25,"linkOnly":26,"markdownContent":27,"markdownBody":28,"frontMatter":29,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M6CZ65YZGJV40F2FZNH04PBS","stat-logistic-regression",null,"Fit a logistic regression model for binary outcomes, report odds ratios and model performance (AUC-ROC, confusion matrix).","Scientific-Tooling\u002Fstructured-intelligence","Scientific-Tooling","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F267453265?v=4","01M6CZ1SE6GGD4F67EAQ0PVX38","Scientific Tooling","01M6CZ1SJKCFVGH10Z3A152K02",4,"MIT","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-logistic-regression\u002FSKILL.md",[],[19,20,21,22,23,24],"regression","stat logistic regression","performance","report","model","outcomes","2026-11-10 10:12:30",false,"---\nname: stat-logistic-regression\ndescription: Fit a logistic regression model for binary outcomes, report odds ratios and model performance (AUC-ROC, confusion matrix).\n---\n\n# Skill: Logistic Regression\n\n## Use When\n\n- User wants to model the probability of a binary outcome (disease\u002Fhealthy, expressed\u002Fnot expressed, responder\u002Fnon-responder)\n- User needs odds ratios and their confidence intervals for each predictor\n- User wants to evaluate model discrimination with AUC-ROC and calibration\n- Common in medical, epidemiological, and genomics classification tasks\n\n## Inputs\n\n- Required:\n  - Data table (CSV or TSV) with a binary outcome column (0\u002F1 or two-level factor) and one or more predictor columns\n  - Outcome variable name\n  - Predictor variable name(s)\n- Optional:\n  - Regularization: `none` (default), `l1` (Lasso), or `l2` (Ridge)\n  - Test set fraction for performance evaluation (default: `0.2`)\n  - Output directory (default: `.\u002Flogit_output`)\n\n## Workflow\n\n1. Read data; validate that outcome column is binary; encode predictors as needed.\n2. Split data into training and test sets (stratified by outcome).\n3. Fit logistic regression on training set:\n   - If `regularization=none`: unpenalized MLE fit for inferential reporting.\n   - If `regularization=l1` or `l2`: cross-validated penalized fit for prediction-focused modeling.\n4. Report coefficients:\n   - Unpenalized model: log-odds estimate, standard error, z-statistic, p-value, odds ratio, 95% CI.\n   - Penalized model: shrunken coefficients and odds ratios; do not report classical p-values\u002Fz-statistics from penalized fit.\n5. Evaluate on test set: compute AUC-ROC, plot ROC curve, compute confusion matrix at 0.5 threshold (accuracy, sensitivity, specificity, PPV, NPV).\n6. Compute Hosmer-Lemeshow goodness-of-fit test for calibration for the unpenalized model; for penalized models, report calibration curve and Brier score.\n7. If regularization is used: report optimal lambda from cross-validation and non-zero coefficients at optimal lambda.\n8. Save the executable analysis script (`analysis_code.py` or `analysis_code.R`) and software version manifest (`session_info.txt`) used to produce results.\n9. Write coefficient table(s), performance metrics (TSV), ROC curve plot (PDF), and calibration plot (PDF) to output directory.\n\n## Output Contract\n\n- Coefficient table (TSV, unpenalized): term, log_odds, std_error, z_statistic, p_value, odds_ratio, ci_lower_or, ci_upper_or\n- Coefficient table (TSV, penalized): term, log_odds, odds_ratio, selected_at_lambda\n- Performance metrics (TSV): auc, accuracy, sensitivity, specificity, ppv, npv, hl_test_p_or_na, brier_score\n- ROC curve (PDF)\n- Confusion matrix (printed to stdout)\n- Reproducibility artifacts: `analysis_code.py` or `analysis_code.R`, plus `session_info.txt`\n\n## Limits\n\n- Assumes independence of observations; does not account for clustering or repeated measures.\n- Requires sufficient events per variable (EPV ≥ 10 recommended) to avoid overfitting.\n- Class imbalance can inflate accuracy; examine sensitivity\u002Fspecificity and AUC.\n- Penalized models are prediction-oriented; classical inferential statistics (standard errors\u002Fp-values) are not directly interpretable from penalized coefficients.\n- Common failure: outcome column with more than two levels — binarize before running.\n","# Skill: Logistic Regression\n\n## Use When\n\n- User wants to model the probability of a binary outcome (disease\u002Fhealthy, expressed\u002Fnot expressed, responder\u002Fnon-responder)\n- User needs odds ratios and their confidence intervals for each predictor\n- User wants to evaluate model discrimination with AUC-ROC and calibration\n- Common in medical, epidemiological, and genomics classification tasks\n\n## Inputs\n\n- Required:\n  - Data table (CSV or TSV) with a binary outcome column (0\u002F1 or two-level factor) and one or more predictor columns\n  - Outcome variable name\n  - Predictor variable name(s)\n- Optional:\n  - Regularization: `none` (default), `l1` (Lasso), or `l2` (Ridge)\n  - Test set fraction for performance evaluation (default: `0.2`)\n  - Output directory (default: `.\u002Flogit_output`)\n\n## Workflow\n\n1. Read data; validate that outcome column is binary; encode predictors as needed.\n2. Split data into training and test sets (stratified by outcome).\n3. Fit logistic regression on training set:\n   - If `regularization=none`: unpenalized MLE fit for inferential reporting.\n   - If `regularization=l1` or `l2`: cross-validated penalized fit for prediction-focused modeling.\n4. Report coefficients:\n   - Unpenalized model: log-odds estimate, standard error, z-statistic, p-value, odds ratio, 95% CI.\n   - Penalized model: shrunken coefficients and odds ratios; do not report classical p-values\u002Fz-statistics from penalized fit.\n5. Evaluate on test set: compute AUC-ROC, plot ROC curve, compute confusion matrix at 0.5 threshold (accuracy, sensitivity, specificity, PPV, NPV).\n6. Compute Hosmer-Lemeshow goodness-of-fit test for calibration for the unpenalized model; for penalized models, report calibration curve and Brier score.\n7. If regularization is used: report optimal lambda from cross-validation and non-zero coefficients at optimal lambda.\n8. Save the executable analysis script (`analysis_code.py` or `analysis_code.R`) and software version manifest (`session_info.txt`) used to produce results.\n9. Write coefficient table(s), performance metrics (TSV), ROC curve plot (PDF), and calibration plot (PDF) to output directory.\n\n## Output Contract\n\n- Coefficient table (TSV, unpenalized): term, log_odds, std_error, z_statistic, p_value, odds_ratio, ci_lower_or, ci_upper_or\n- Coefficient table (TSV, penalized): term, log_odds, odds_ratio, selected_at_lambda\n- Performance metrics (TSV): auc, accuracy, sensitivity, specificity, ppv, npv, hl_test_p_or_na, brier_score\n- ROC curve (PDF)\n- Confusion matrix (printed to stdout)\n- Reproducibility artifacts: `analysis_code.py` or `analysis_code.R`, plus `session_info.txt`\n\n## Limits\n\n- Assumes independence of observations; does not account for clustering or repeated measures.\n- Requires sufficient events per variable (EPV ≥ 10 recommended) to avoid overfitting.\n- Class imbalance can inflate accuracy; examine sensitivity\u002Fspecificity and AUC.\n- Penalized models are prediction-oriented; classical inferential statistics (standard errors\u002Fp-values) are not directly interpretable from penalized coefficients.\n- Common failure: outcome column with more than two levels — binarize before running.\n",{"name":5,"description":7},"main","5118e7fda890e9aa819cb71e003cd243d3a31970","skills\u002Fstat-logistic-regression",1,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence","https:\u002F\u002Fgithub.com\u002FScientific-Tooling","2026-11-03 00:01:40",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Scientific-Tooling\u002Fstructured-intelligence --skill stat-logistic-regression",{"tool":43,"command":44},"bunx","bunx skills add Scientific-Tooling\u002Fstructured-intelligence --skill stat-logistic-regression",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Scientific-Tooling\u002Fstructured-intelligence --skill stat-logistic-regression","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-logistic-regression\u002FSKILL.md",true,[51,57,61],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"agents\u002Fclaude.yaml","REFERENCE","参考文档",336,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-logistic-regression\u002Fagents\u002Fclaude.yaml",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"agents\u002Fopenai.yaml",337,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-logistic-regression\u002Fagents\u002Fopenai.yaml",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"config.yaml",300,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-logistic-regression\u002Fconfig.yaml",[66,94,106,119,133,145],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":77,"publishedAt":25},"01M6CZ6S2C54G03K71G77H22KE","structured-intelligence-skill-creator","Create or update repository skills that conform to local templates, provider metadata requirements, registry rules, and validation workflows.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstructured-intelligence-skill-creator\u002FSKILL.md",[72],{"categoryNo":73,"categoryName":74,"taxonomyType":75,"taxonomyTypeDesc":76},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],"structured intelligence skill creator","structured","intelligence","skill creator","workflows","create","update","registry","validation","metadata","repository","templates","Rules","provider","local","requirements",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":25},"01M6CZ6M3JFN400406T1NPWNER","stat-survival-analysis","Estimate and compare survival functions using Kaplan-Meier curves and log-rank test, with optional Cox proportional hazards regression.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-survival-analysis\u002FSKILL.md",[],[101,102,103,19,104,105],"stat survival analysis","analysis","functions","log","test",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":25},"01M6CZ6G5JPDZASM4DRD9QCTEE","stat-pca","Perform PCA on a numeric data matrix to reduce dimensionality, visualize sample structure, and identify top contributing features.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-pca\u002FSKILL.md",[],[113,114,115,116,117,118],"stat pca","visualize","contributing","data","structure","sample",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":25},"01M6CZ6D9A3N6849BT9VYFSBK5","stat-pairwise-correlation","Compute pairwise correlations and significance tests across all numeric variables, and produce a correlation heatmap.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-pairwise-correlation\u002FSKILL.md",[],[126,127,128,129,130,131,132],"stat pairwise correlation","correlation","produce","heatmap","compute","across","tests",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":25},"01M6CZ69DMF1PDKW83RWARQX6D","stat-nonlinear-embedding","Embed high-dimensional data into 2D using t-SNE or UMAP for exploratory visualization of sample or cell relationships.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-nonlinear-embedding\u002FSKILL.md",[],[140,141,142,143,144,116,118],"stat nonlinear embedding","visualization","cell","exploratory visualization","relationships",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":25},"01M6CZ63JR8A7YR02312EY9AQ4","stat-learn-bayesian-network","Learn the structure and conditional probabilities of a Bayesian network from observational data for causal discovery or dependency modeling.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-learn-bayesian-network\u002FSKILL.md",[],[152,153,154,117,155,156,116,157],"network","learn","stat learn bayesian network","dependency","discovery","modeling"]