[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CZ61CH6CYW4RKR571G7DWT":3,"skill-same:01M6CZ61CH6CYW4RKR571G7DWT":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},"01M6CZ61CH6CYW4RKR571G7DWT","stat-fit-linear-model",null,"Fit a linear regression model, report coefficients and model fit, and generate residual diagnostic plots.","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-fit-linear-model\u002FSKILL.md",[],[19,20,21,22,23,24],"linear","model","stat fit linear model","generate","report","regression","2026-11-10 10:12:30",false,"---\nname: stat-fit-linear-model\ndescription: Fit a linear regression model, report coefficients and model fit, and generate residual diagnostic plots.\n---\n\n# Skill: Linear Regression Modeling\n\n## Use When\n\n- User wants to model the linear relationship between a continuous outcome and one or more predictors\n- User needs coefficient estimates, confidence intervals, and p-values for each predictor\n- User wants to assess model fit (R², adjusted R²) and check regression assumptions\n- Use cases include: gene expression vs. age, protein concentration vs. metabolic rate, any dose-response relationship\n\n## Inputs\n\n- Required:\n  - Data table (CSV or TSV) with a numeric response variable and one or more numeric or categorical predictor columns\n  - Response (outcome) variable name\n  - Predictor variable name(s)\n- Optional:\n  - Interaction terms (e.g., `var1:var2`)\n  - Standardize predictors: `true` or `false` (default: `false`)\n  - Output directory (default: `.\u002Flm_output`)\n\n## Workflow\n\n1. Read data; validate that response and predictor columns exist and are appropriate types.\n2. Encode categorical predictors as dummy variables (reference level = first alphabetical level).\n3. Fit the linear model: `response ~ predictors` using ordinary least squares.\n4. Report for each coefficient: estimate, standard error, t-statistic, p-value, 95% confidence interval.\n5. Report model fit: R², adjusted R², F-statistic, overall p-value, AIC, BIC.\n6. Generate residual diagnostic plots: (a) residuals vs. fitted, (b) Q-Q plot of residuals, (c) scale-location, (d) Cook's distance.\n7. Test regression assumptions: normality of residuals (Shapiro-Wilk), homoscedasticity (Breusch-Pagan), absence of influential points (Cook's distance > 4\u002Fn).\n8. Write results table (TSV), model summary (text), and diagnostic plots (PDF) to output directory.\n9. Save the executable analysis script (`analysis_code.py` or `analysis_code.R`) and software version manifest (`session_info.txt`) used to produce results.\n\n## Output Contract\n\n- Coefficient table (TSV): term, estimate, std_error, t_statistic, p_value, ci_lower, ci_upper\n- Model fit summary (TSV): r_squared, adj_r_squared, f_statistic, f_p_value, aic, bic, n\n- Residual diagnostic plots (PDF, 4-panel)\n- Assumption test results (printed to stdout)\n- Reproducibility artifacts: `analysis_code.py` or `analysis_code.R`, plus `session_info.txt`\n\n## Limits\n\n- Assumes linearity, independence, homoscedasticity, and normality of residuals — check diagnostic plots.\n- Does not handle multicollinearity automatically; check VIF (variance inflation factor) separately if many predictors.\n- Not suitable for count data, binary outcomes, or data with heavy censoring — use `stat-fit-glm` instead.\n- Common failure: near-perfect multicollinearity among predictors causes singular matrix error.\n","# Skill: Linear Regression Modeling\n\n## Use When\n\n- User wants to model the linear relationship between a continuous outcome and one or more predictors\n- User needs coefficient estimates, confidence intervals, and p-values for each predictor\n- User wants to assess model fit (R², adjusted R²) and check regression assumptions\n- Use cases include: gene expression vs. age, protein concentration vs. metabolic rate, any dose-response relationship\n\n## Inputs\n\n- Required:\n  - Data table (CSV or TSV) with a numeric response variable and one or more numeric or categorical predictor columns\n  - Response (outcome) variable name\n  - Predictor variable name(s)\n- Optional:\n  - Interaction terms (e.g., `var1:var2`)\n  - Standardize predictors: `true` or `false` (default: `false`)\n  - Output directory (default: `.\u002Flm_output`)\n\n## Workflow\n\n1. Read data; validate that response and predictor columns exist and are appropriate types.\n2. Encode categorical predictors as dummy variables (reference level = first alphabetical level).\n3. Fit the linear model: `response ~ predictors` using ordinary least squares.\n4. Report for each coefficient: estimate, standard error, t-statistic, p-value, 95% confidence interval.\n5. Report model fit: R², adjusted R², F-statistic, overall p-value, AIC, BIC.\n6. Generate residual diagnostic plots: (a) residuals vs. fitted, (b) Q-Q plot of residuals, (c) scale-location, (d) Cook's distance.\n7. Test regression assumptions: normality of residuals (Shapiro-Wilk), homoscedasticity (Breusch-Pagan), absence of influential points (Cook's distance > 4\u002Fn).\n8. Write results table (TSV), model summary (text), and diagnostic plots (PDF) to output directory.\n9. Save the executable analysis script (`analysis_code.py` or `analysis_code.R`) and software version manifest (`session_info.txt`) used to produce results.\n\n## Output Contract\n\n- Coefficient table (TSV): term, estimate, std_error, t_statistic, p_value, ci_lower, ci_upper\n- Model fit summary (TSV): r_squared, adj_r_squared, f_statistic, f_p_value, aic, bic, n\n- Residual diagnostic plots (PDF, 4-panel)\n- Assumption test results (printed to stdout)\n- Reproducibility artifacts: `analysis_code.py` or `analysis_code.R`, plus `session_info.txt`\n\n## Limits\n\n- Assumes linearity, independence, homoscedasticity, and normality of residuals — check diagnostic plots.\n- Does not handle multicollinearity automatically; check VIF (variance inflation factor) separately if many predictors.\n- Not suitable for count data, binary outcomes, or data with heavy censoring — use `stat-fit-glm` instead.\n- Common failure: near-perfect multicollinearity among predictors causes singular matrix error.\n",{"name":5,"description":7},"main","5118e7fda890e9aa819cb71e003cd243d3a31970","skills\u002Fstat-fit-linear-model",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-fit-linear-model",{"tool":43,"command":44},"bunx","bunx skills add Scientific-Tooling\u002Fstructured-intelligence --skill stat-fit-linear-model",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Scientific-Tooling\u002Fstructured-intelligence --skill stat-fit-linear-model","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-fit-linear-model\u002FSKILL.md",true,[51,57,61],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"agents\u002Fclaude.yaml","REFERENCE","参考文档",354,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-fit-linear-model\u002Fagents\u002Fclaude.yaml",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"agents\u002Fopenai.yaml",355,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-fit-linear-model\u002Fagents\u002Fopenai.yaml",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"config.yaml",287,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-fit-linear-model\u002Fconfig.yaml",[66,89,101,114,128,140],{"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":72,"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",[],[73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88],"structured intelligence skill creator","skill creator","intelligence","structured","create","requirements","workflows","provider","update","registry","local","validation","metadata","repository","templates","Rules",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"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",[],[96,97,24,98,99,100],"analysis","stat survival analysis","log","functions","test",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"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",[],[108,109,110,111,112,113],"stat pca","sample","visualize","contributing","data","structure",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"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",[],[121,122,123,124,125,126,127],"stat pairwise correlation","correlation","produce","heatmap","compute","across","tests",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"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",[],[135,136,112,137,109,138,139],"stat nonlinear embedding","visualization","relationships","cell","exploratory visualization",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":25},"01M6CZ65YZGJV40F2FZNH04PBS","stat-logistic-regression","Fit a logistic regression model for binary outcomes, report odds ratios and model performance (AUC-ROC, confusion matrix).","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-logistic-regression\u002FSKILL.md",[],[24,147,23,20,148,149],"stat logistic regression","outcomes","performance"]