[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CTQP5SP1PNQSCJWZ8F8FYE":3,"skill-same:01M7CTQP5SP1PNQSCJWZ8F8FYE":76},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7CTQP5SP1PNQSCJWZ8F8FYE","statistical-analysis",null,"Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting. Use whenever a user wants to compare groups, test a hypothesis, analyze experimental or survey data, check statistical assumptions, compute required sample sizes, or write up results - even if they never name a specific test. Covers t-tests, ANOVA, chi-square, correlation, regression, non-parametric and Bayesian methods. For low-level model APIs, see the statsmodels and pymc skills.","mrsonord2240\u002Fopenscience-specialists","mrsonord2240","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F76487430?v=4","01M7CTEM40S43GSJZ9A3YCCXZK","Samuel Nord","01M7CTEM4K69JD1GBYNHVJ9ZP4",2,"MIT","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fstatistical-analysis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: statistical-analysis\ndescription: Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting. Use whenever a user wants to compare groups, test a hypothesis, analyze experimental or survey data, check statistical assumptions, compute required sample sizes, or write up results - even if they never name a specific test. Covers t-tests, ANOVA, chi-square, correlation, regression, non-parametric and Bayesian methods. For low-level model APIs, see the statsmodels and pymc skills.\nlicense: MIT license\nmetadata:\n  version: \"1.0.0\"\n---\n\n\n\n# Statistical Analysis\n\n## Overview\n\nConduct hypothesis tests (t-tests, ANOVA, chi-square), regression, correlation, and Bayesian analyses with systematic assumption checking, effect sizes, and APA-style reporting. The goal is an analysis a reviewer could not tear apart: the right test, verified assumptions, honest effect sizes, and a complete write-up.\n\n## When to Use This Skill\n\nUse this skill when:\n- Conducting statistical hypothesis tests (t-tests, ANOVA, chi-square, non-parametric)\n- Performing regression or correlation analyses\n- Running Bayesian statistical analyses\n- Checking statistical assumptions and diagnostics\n- Calculating effect sizes and conducting power analyses\n- Reporting statistical results in APA format\n- Analyzing experimental or observational data for research\n\n---\n\n## Installation\n\nUse **uv** to install the libraries used in this skill. Pin versions in production; unpinned installs are fine for exploration.\n\n```bash\n# Core frequentist stack (Python 3.10+; 3.12+ recommended for latest SciPy\u002FArviZ)\nuv pip install \"pingouin>=0.6\" \"scipy>=1.11\" \"statsmodels>=0.14.6\" pandas matplotlib seaborn\n\n# Bayesian modeling (PyMC 5 + ArviZ)\nuv pip install \"pymc>=5.0\" \"arviz>=1.0\"\n```\n\n**Compatibility notes (verified against pingouin 0.6.1, statsmodels 0.14.6, arviz 1.2, 2026):**\n\n- **Pingouin 0.6.0** renamed output columns to remove special characters: `p_val`, `cohen_d`, `CI95`, `p_unc` (previously `p-val`, `cohen-d`, `CI95%`, `p-unc` in 0.5.x). Examples below use the current names; if stuck on 0.5.x, use the hyphenated forms.\n- **statsmodels + SciPy**: use `statsmodels>=0.14.6` with `scipy>=1.11` to avoid `_lazywhere` import errors on SciPy 1.16+.\n- **ArviZ 1.x**: `az.summary()` now defaults to **89% intervals** (`eti89` columns) and the width parameter is `ci_prob` (not `hdi_prob`). To report a conventional 95% credible interval, pass `az.summary(trace, ci_prob=0.95)`.\n- **One-sided Bayes Factors are gone from Pingouin**: `pg.ttest(..., alternative='greater')` silently drops the `BF10` column, and `pg.bayesfactor_ttest` raises on one-sided alternatives. For one-sided Bayesian tests, use PyMC directly (compute the posterior probability of the directional hypothesis) or JASP\u002FR's BayesFactor.\n\nFor model-specific APIs (OLS, GLM, ARIMA), see the **statsmodels** skill. For PyMC workflows, see the **pymc** skill.\n\n---\n\n## Analysis Workflow\n\nEvery sound analysis follows the same arc. Skipping steps is how analyses end up retracted, so work through them in order and say what you did at each one.\n\n1. **Frame the question before touching the data.** State the hypothesis, the outcome and predictor variables, and the design (independent vs. paired, number of groups). Commit to a planned test now — choosing the test after peeking at results is p-hacking, even when done innocently.\n2. **Inspect the data.** Per group: n, mean, SD, median, missing values. Plot the raw data (histograms or box plots) before any test. Unequal group sizes, missingness, floor\u002Fceiling effects, and outliers all change what test is appropriate — surface them to the user rather than silently working around them.\n3. **Select the test** using the quick reference below, or `references\u002Ftest_selection_guide.md` for designs beyond the basics (counts, time-to-event, reliability, factorial).\n4. **Check assumptions** with `scripts\u002Fassumption_checks.py`. If an assumption fails, switch to the remedial test (table below) and report both the plan and the change.\n5. **Run the test** and always compute the effect size alongside it — a p-value says an effect exists; the effect size says whether anyone should care.\n6. **Report** using the APA templates below, including descriptives, exact statistics, effect sizes with CIs, and the assumption checks performed.\n\nIf the user only needs one step (e.g., \"how many participants do I need?\"), jump straight to that section — but still confirm the design assumptions the calculation rests on.\n\n---\n\n## Test Selection Guide\n\n### Quick Reference: Choosing the Right Test\n\nUse `references\u002Ftest_selection_guide.md` for comprehensive guidance (counts, survival, reliability, factorial designs). Quick reference:\n\n**Comparing Two Groups:**\n- Independent, continuous, normal → Independent t-test\n- Independent, continuous, non-normal → Mann-Whitney U test\n- Paired, continuous, normal → Paired t-test\n- Paired, continuous, non-normal → Wilcoxon signed-rank test\n- Binary outcome → Chi-square or Fisher's exact test\n\n**Comparing 3+ Groups:**\n- Independent, continuous, normal → One-way ANOVA\n- Independent, continuous, non-normal → Kruskal-Wallis test\n- Paired, continuous, normal → Repeated measures ANOVA\n- Paired, continuous, non-normal → Friedman test\n\n**Relationships:**\n- Two continuous variables → Pearson (normal) or Spearman correlation (non-normal)\n- Continuous outcome with predictor(s) → Linear regression\n- Binary outcome with predictor(s) → Logistic regression\n\n**Bayesian Alternatives:**\nAll tests have Bayesian versions providing direct probability statements about hypotheses, Bayes Factors quantifying evidence, and the ability to support the null. See `references\u002Fbayesian_statistics.md`.\n\n---\n\n## Assumption Checking\n\n**Always check assumptions before interpreting test results**, and report the checks — reviewers look for them.\n\nUse the bundled `scripts\u002Fassumption_checks.py` module. Run Python from the skill directory (`skills\u002Fstatistical-analysis\u002F`) or add `scripts\u002F` to `sys.path`:\n\n```python\nfrom assumption_checks import comprehensive_assumption_check\n\n# Outliers + normality (per group) + homogeneity of variance, with plots\nresults = comprehensive_assumption_check(\n    data=df,\n    value_col='score',\n    group_col='group',  # Optional: for group comparisons\n    alpha=0.05\n)\n```\n\nFor targeted checks, import individual functions:\n\n```python\nfrom assumption_checks import (\n    check_normality,                # Shapiro-Wilk + Q-Q plot + histogram\n    check_normality_per_group,\n    check_homogeneity_of_variance,  # Levene's test + box plots\n    check_linearity,                # scatter + residual plot for simple regression\n    check_regression_diagnostics,   # full OLS diagnostics (see Regression below)\n    detect_outliers                 # IQR or z-score methods\n)\n\nresult = check_normality(data=df['score'], name='Test Score', alpha=0.05, plot=True)\nprint(result['interpretation'])\nprint(result['recommendation'])\n```\n\n### What to Do When Assumptions Are Violated\n\n**Normality violated:**\n- Mild violation + n > 30 per group → Proceed with parametric test (robust)\n- Moderate violation → Use non-parametric alternative\n- Severe violation → Transform data or use non-parametric test\n\n**Homogeneity of variance violated:**\n- For t-test → Use Welch's t-test (`pg.ttest` applies it automatically with `correction='auto'`)\n- For ANOVA → Use Welch's ANOVA (`pg.welch_anova`) or Brown-Forsythe\n- For regression → Use robust standard errors or weighted least squares\n\n**Linearity violated (regression):**\n- Add polynomial terms, transform variables, or use non-linear models \u002F GAM\n\nFormal tests get oversensitive as n grows: for n ≥ 100, weigh the Q-Q plot more heavily than the Shapiro-Wilk p-value. See `references\u002Fassumptions_and_diagnostics.md` for comprehensive guidance.\n\n---\n\n## Running Statistical Tests\n\nPrimary libraries:\n- **pingouin**: user-friendly tests that return effect sizes by default — prefer it for standard tests\n- **scipy.stats**: core statistical tests\n- **statsmodels**: regression, diagnostics, power analysis\n- **pymc** + **arviz**: Bayesian modeling and diagnostics\n\n### T-Test with Complete Reporting\n\n```python\nimport pingouin as pg\n\n# correction='auto' applies Welch's correction when variances are unequal\nresult = pg.ttest(group_a, group_b, correction='auto')\n\n# Pingouin >= 0.6 column names\nt_stat = result['T'].values[0]\ndf = result['dof'].values[0]\np_value = result['p_val'].values[0]\ncohens_d = result['cohen_d'].values[0]\nci_lower, ci_upper = result['CI95'].values[0]  # CI for the mean difference\n\nprint(f\"t({df:.0f}) = {t_stat:.2f}, p = {p_value:.3f}, d = {cohens_d:.2f}\")\n```\n\n### ANOVA with Post-Hoc Tests\n\n```python\nimport pingouin as pg\n\naov = pg.anova(dv='score', between='group', data=df, detailed=True)\nprint(aov)\n\n# Effect size: partial eta-squared\neta_p2 = aov['np2'].values[0]\n\n# If significant, conduct post-hoc tests (Tukey HSD controls family-wise error)\nif aov['p_unc'].values[0] \u003C 0.05:\n    posthoc = pg.pairwise_tukey(dv='score', between='group', data=df)\n    print(posthoc)  # includes Hedges' g per pair\n```\n\n### Linear Regression with Diagnostics\n\n```python\nimport statsmodels.api as sm\nfrom assumption_checks import check_regression_diagnostics\n\nX = sm.add_constant(X_predictors)  # Add intercept\nmodel = sm.OLS(y, X).fit()\nprint(model.summary())\n\n# 4-panel residual plot + Shapiro-Wilk, Breusch-Pagan, Durbin-Watson, VIF\ndiag = check_regression_diagnostics(model)\nprint(diag['interpretation'])\nprint(diag['vif'])\n\n# If heteroscedasticity was flagged, report robust standard errors instead\nrobust = model.get_robustcov_results('HC3')\n```\n\n### Bayesian T-Test\n\n```python\nimport pymc as pm\nimport arviz as az\nimport numpy as np\n\nwith pm.Model() as model:\n    # Priors\n    mu1 = pm.Normal('mu_group1', mu=0, sigma=10)\n    mu2 = pm.Normal('mu_group2', mu=0, sigma=10)\n    sigma = pm.HalfNormal('sigma', sigma=10)\n\n    # Likelihood\n    y1 = pm.Normal('y1', mu=mu1, sigma=sigma, observed=group_a)\n    y2 = pm.Normal('y2', mu=mu2, sigma=sigma, observed=group_b)\n\n    # Derived quantity\n    diff = pm.Deterministic('difference', mu1 - mu2)\n\n    trace = pm.sample(2000, tune=1000)\n\n# ArviZ 1.x defaults to 89% intervals; request 95% explicitly for reporting\nprint(az.summary(trace, var_names=['difference'], ci_prob=0.95))\n\n# Direct probability statement (this is what one-sided questions become)\nprob_greater = np.mean(trace.posterior['difference'].values > 0)\nprint(f\"P(mu1 > mu2 | data) = {prob_greater:.3f}\")\n\n# ArviZ 1.x removed az.plot_posterior; use plot_dist (on 0.x, plot_posterior still works)\naz.plot_dist(trace, var_names=['difference'], ci_prob=0.95)\n```\n\nScale priors to the data (e.g., `sigma=10` suits outcomes with SD near 10; use the observed SD as a guide) and state the priors in the report.\n\n---\n\n## Effect Sizes\n\n**Effect sizes quantify magnitude; p-values only indicate existence.** Report one for every test. See `references\u002Feffect_sizes_and_power.md` for the full guide.\n\n### Quick Reference: Common Effect Sizes\n\n| Test | Effect Size | Small | Medium | Large |\n|------|-------------|-------|--------|-------|\n| T-test | Cohen's d | 0.20 | 0.50 | 0.80 |\n| ANOVA | η²_p | 0.01 | 0.06 | 0.14 |\n| Correlation | r | 0.10 | 0.30 | 0.50 |\n| Regression | R² | 0.02 | 0.13 | 0.26 |\n| Chi-square | Cramér's V | 0.07 | 0.21 | 0.35 |\n\nBenchmarks are conventions, not laws — a \"small\" effect can matter enormously (drug side effects) and a \"large\" one can be trivial. Interpret in context.\n\n### Calculating Effect Sizes\n\nPingouin returns effect sizes with its tests (`cohen_d` from `pg.ttest`, `np2` from `pg.anova`, `hedges` from `pg.pairwise_tukey`; `r` from `pg.corr` is already an effect size).\n\n### Confidence Intervals for Effect Sizes\n\nReport a CI for the effect size to show its precision. Use `pg.compute_esci` (note: `pg.compute_effsize_from_t` returns only the point estimate — it does **not** return a CI):\n\n```python\nimport pingouin as pg\n\nd = pg.compute_effsize(group_a, group_b, eftype='cohen')\nci_lower, ci_upper = pg.compute_esci(stat=d, nx=len(group_a), ny=len(group_b),\n                                     eftype='cohen', confidence=0.95)\nprint(f\"d = {d:.2f}, 95% CI [{ci_lower:.2f}, {ci_upper:.2f}]\")\n```\n\n---\n\n## Power Analysis\n\n### A Priori Power Analysis (Study Planning)\n\nDetermine required sample size before data collection:\n\n```python\nfrom statsmodels.stats.power import tt_ind_solve_power, FTestAnovaPower\n\n# T-test: What n per group is needed to detect d = 0.5?\nn_required = tt_ind_solve_power(\n    effect_size=0.5,\n    alpha=0.05,\n    power=0.80,\n    ratio=1.0,\n    alternative='two-sided'\n)\nprint(f\"Required n per group: {n_required:.0f}\")\n\n# One-way ANOVA: What n is needed to detect Cohen's f = 0.25?\n# Notes: the parameter is k_groups; effect_size is Cohen's f (f = sqrt(eta2\u002F(1-eta2)));\n# and solve_power returns the TOTAL sample size, not n per group.\nimport math\nanova_power = FTestAnovaPower()\nn_total = anova_power.solve_power(\n    effect_size=0.25,\n    k_groups=3,\n    alpha=0.05,\n    power=0.80\n)\nprint(f\"Required total N: {math.ceil(n_total)} ({math.ceil(n_total \u002F 3)} per group)\")\n```\n\n### Sensitivity Analysis (Post-Study)\n\nDetermine what effect size the study could detect:\n\n```python\n# With n=50 per group, what effect could we detect at 80% power?\ndetectable_d = tt_ind_solve_power(\n    effect_size=None,  # Solve for this\n    nobs1=50,\n    alpha=0.05,\n    power=0.80,\n    ratio=1.0,\n    alternative='two-sided'\n)\nprint(f\"Study could detect d >= {detectable_d:.2f}\")\n```\n\n**Note**: Post-hoc \"observed power\" (computing power from the observed effect) is circular and misleading — it is a deterministic function of the p-value. If a study is done and someone asks about power, run a sensitivity analysis instead.\n\nSee `references\u002Feffect_sizes_and_power.md` for detailed guidance.\n\n---\n\n## Reporting Results\n\nFollow `references\u002Freporting_standards.md` for APA style. Every report needs:\n\n1. **Descriptive statistics**: M, SD, n for all groups\u002Fvariables\n2. **Test statistics**: Test name, statistic, df, exact p-value (`p = .034`, not `p \u003C .05`; use `p \u003C .001` only below .001)\n3. **Effect sizes**: With confidence intervals\n4. **Assumption checks**: Which tests were run, results, and actions taken\n5. **All planned analyses**: Including non-significant findings — omitting them is cherry-picking\n\n### Example Report Templates\n\n#### Independent T-Test\n\n```\nGroup A (n = 48, M = 75.2, SD = 8.5) scored significantly higher than\nGroup B (n = 52, M = 68.3, SD = 9.2), t(98) = 3.82, p \u003C .001, d = 0.77,\n95% CI [0.36, 1.18], two-tailed. Assumptions of normality (Shapiro-Wilk:\nGroup A W = 0.97, p = .18; Group B W = 0.96, p = .12) and homogeneity\nof variance (Levene's F(1, 98) = 1.23, p = .27) were satisfied.\n```\n\n#### One-Way ANOVA\n\n```\nA one-way ANOVA revealed a significant main effect of treatment condition\non test scores, F(2, 147) = 8.45, p \u003C .001, η²_p = .10. Post hoc\ncomparisons using Tukey's HSD indicated that Condition A (M = 78.2,\nSD = 7.3) scored significantly higher than Condition B (M = 71.5,\nSD = 8.1, p = .002, d = 0.87) and Condition C (M = 70.1, SD = 7.9,\np \u003C .001, d = 1.07). Conditions B and C did not differ significantly\n(p = .52, d = 0.18).\n```\n\n#### Multiple Regression\n\n```\nMultiple linear regression was conducted to predict exam scores from\nstudy hours, prior GPA, and attendance. The overall model was significant,\nF(3, 146) = 45.2, p \u003C .001, R² = .48, adjusted R² = .47. Study hours\n(B = 1.80, SE = 0.31, β = .35, t = 5.78, p \u003C .001, 95% CI [1.18, 2.42])\nand prior GPA (B = 8.52, SE = 1.95, β = .28, t = 4.37, p \u003C .001,\n95% CI [4.66, 12.38]) were significant predictors, while attendance was\nnot (B = 0.15, SE = 0.12, β = .08, t = 1.25, p = .21, 95% CI [-0.09, 0.39]).\nMulticollinearity was not a concern (all VIF \u003C 1.5).\n```\n\n#### Bayesian Analysis\n\n```\nA Bayesian independent samples t-test was conducted using weakly\ninformative priors (Normal(0, 10) for group means). The posterior\ndistribution indicated that Group A scored higher than Group B\n(M_diff = 6.8, 95% credible interval [3.2, 10.4]), with a 99.8%\nposterior probability that Group A's mean exceeded Group B's mean.\nConvergence diagnostics were satisfactory (all R-hat \u003C 1.01, ESS > 1000).\n```\n\nIf a non-parametric test was used, report medians rather than means, the U\u002FW\u002FH statistic, and a rank-based effect size (e.g., rank-biserial correlation, returned by `pg.mwu` as `RBC`).\n\n---\n\n## Bayesian Statistics\n\nConsider Bayesian approaches when:\n- You have prior information to incorporate\n- You want direct probability statements about hypotheses (\"there is a 95% probability the effect lies in this interval\")\n- Sample size is small or data collection is sequential (no correction needed for optional stopping)\n- You need to quantify evidence *for* the null hypothesis\n- The model is complex (hierarchical structure, missing data)\n\nSee `references\u002Fbayesian_statistics.md` for prior specification, Bayes Factors, credible intervals, hierarchical models, and convergence checking (R-hat \u003C 1.01, sufficient ESS, posterior predictive checks).\n\n---\n\n## Bundled Resources\n\n### References (`references\u002F`)\n\n- **test_selection_guide.md**: Decision tree covering group comparisons, relationships, counts, time-to-event, agreement\u002Freliability, and categorical analysis\n- **assumptions_and_diagnostics.md**: Detailed guidance on checking and handling assumption violations\n- **effect_sizes_and_power.md**: Calculating, interpreting, and reporting effect sizes; power analysis\n- **bayesian_statistics.md**: Priors, Bayes Factors, credible intervals, hierarchical models, diagnostics\n- **reporting_standards.md**: APA-style reporting guidelines with worked examples\n\n### Scripts (`scripts\u002F`)\n\n- **assumption_checks.py**: Automated assumption checking with visualizations\n  - `comprehensive_assumption_check()`: outliers + normality + variance homogeneity in one call\n  - `check_normality()`, `check_normality_per_group()`: Shapiro-Wilk with Q-Q plots\n  - `check_homogeneity_of_variance()`: Levene's test with box plots\n  - `check_regression_diagnostics()`: 4-panel residual plots + Shapiro-Wilk, Breusch-Pagan, Durbin-Watson, VIF for fitted OLS models\n  - `check_linearity()`, `detect_outliers()`\n\n---\n\n## Statistical Integrity\n\nThese are the practices that keep an analysis defensible. They matter because the most common statistical failures are not computational errors — they are silent flexibility (testing until something works) and selective reporting.\n\n1. **Distinguish confirmatory from exploratory.** State the planned analysis before running it; label anything discovered along the way as exploratory.\n2. **Don't shop for significance.** If the planned test is non-significant, that is the result. Trying alternative tests, subgroups, or outlier-removal schemes until p \u003C .05 invalidates the p-value.\n3. **Correct for multiple comparisons** when running families of tests (Tukey HSD for post-hoc ANOVA; Holm or Benjamini-Hochberg FDR for other families) and say which correction was used.\n4. **A non-significant result is not evidence of no effect.** With small n, the study may simply have been underpowered — run a sensitivity analysis, or use a Bayesian analysis \u002F equivalence test to actually quantify support for the null.\n5. **Statistical significance is not practical importance.** With large n, trivial effects reach p \u003C .001. Lead the interpretation with the effect size.\n6. **Understand missing data before dropping rows.** Listwise deletion is only safe when data are missing completely at random; otherwise consider multiple imputation and say what was done.\n7. **Make it reproducible.** Set random seeds, report library versions for simulation-based methods, and keep the analysis in a runnable script.\n","# Statistical Analysis\n\n## Overview\n\nConduct hypothesis tests (t-tests, ANOVA, chi-square), regression, correlation, and Bayesian analyses with systematic assumption checking, effect sizes, and APA-style reporting. The goal is an analysis a reviewer could not tear apart: the right test, verified assumptions, honest effect sizes, and a complete write-up.\n\n## When to Use This Skill\n\nUse this skill when:\n- Conducting statistical hypothesis tests (t-tests, ANOVA, chi-square, non-parametric)\n- Performing regression or correlation analyses\n- Running Bayesian statistical analyses\n- Checking statistical assumptions and diagnostics\n- Calculating effect sizes and conducting power analyses\n- Reporting statistical results in APA format\n- Analyzing experimental or observational data for research\n\n---\n\n## Installation\n\nUse **uv** to install the libraries used in this skill. Pin versions in production; unpinned installs are fine for exploration.\n\n```bash\n# Core frequentist stack (Python 3.10+; 3.12+ recommended for latest SciPy\u002FArviZ)\nuv pip install \"pingouin>=0.6\" \"scipy>=1.11\" \"statsmodels>=0.14.6\" pandas matplotlib seaborn\n\n# Bayesian modeling (PyMC 5 + ArviZ)\nuv pip install \"pymc>=5.0\" \"arviz>=1.0\"\n```\n\n**Compatibility notes (verified against pingouin 0.6.1, statsmodels 0.14.6, arviz 1.2, 2026):**\n\n- **Pingouin 0.6.0** renamed output columns to remove special characters: `p_val`, `cohen_d`, `CI95`, `p_unc` (previously `p-val`, `cohen-d`, `CI95%`, `p-unc` in 0.5.x). Examples below use the current names; if stuck on 0.5.x, use the hyphenated forms.\n- **statsmodels + SciPy**: use `statsmodels>=0.14.6` with `scipy>=1.11` to avoid `_lazywhere` import errors on SciPy 1.16+.\n- **ArviZ 1.x**: `az.summary()` now defaults to **89% intervals** (`eti89` columns) and the width parameter is `ci_prob` (not `hdi_prob`). To report a conventional 95% credible interval, pass `az.summary(trace, ci_prob=0.95)`.\n- **One-sided Bayes Factors are gone from Pingouin**: `pg.ttest(..., alternative='greater')` silently drops the `BF10` column, and `pg.bayesfactor_ttest` raises on one-sided alternatives. For one-sided Bayesian tests, use PyMC directly (compute the posterior probability of the directional hypothesis) or JASP\u002FR's BayesFactor.\n\nFor model-specific APIs (OLS, GLM, ARIMA), see the **statsmodels** skill. For PyMC workflows, see the **pymc** skill.\n\n---\n\n## Analysis Workflow\n\nEvery sound analysis follows the same arc. Skipping steps is how analyses end up retracted, so work through them in order and say what you did at each one.\n\n1. **Frame the question before touching the data.** State the hypothesis, the outcome and predictor variables, and the design (independent vs. paired, number of groups). Commit to a planned test now — choosing the test after peeking at results is p-hacking, even when done innocently.\n2. **Inspect the data.** Per group: n, mean, SD, median, missing values. Plot the raw data (histograms or box plots) before any test. Unequal group sizes, missingness, floor\u002Fceiling effects, and outliers all change what test is appropriate — surface them to the user rather than silently working around them.\n3. **Select the test** using the quick reference below, or `references\u002Ftest_selection_guide.md` for designs beyond the basics (counts, time-to-event, reliability, factorial).\n4. **Check assumptions** with `scripts\u002Fassumption_checks.py`. If an assumption fails, switch to the remedial test (table below) and report both the plan and the change.\n5. **Run the test** and always compute the effect size alongside it — a p-value says an effect exists; the effect size says whether anyone should care.\n6. **Report** using the APA templates below, including descriptives, exact statistics, effect sizes with CIs, and the assumption checks performed.\n\nIf the user only needs one step (e.g., \"how many participants do I need?\"), jump straight to that section — but still confirm the design assumptions the calculation rests on.\n\n---\n\n## Test Selection Guide\n\n### Quick Reference: Choosing the Right Test\n\nUse `references\u002Ftest_selection_guide.md` for comprehensive guidance (counts, survival, reliability, factorial designs). Quick reference:\n\n**Comparing Two Groups:**\n- Independent, continuous, normal → Independent t-test\n- Independent, continuous, non-normal → Mann-Whitney U test\n- Paired, continuous, normal → Paired t-test\n- Paired, continuous, non-normal → Wilcoxon signed-rank test\n- Binary outcome → Chi-square or Fisher's exact test\n\n**Comparing 3+ Groups:**\n- Independent, continuous, normal → One-way ANOVA\n- Independent, continuous, non-normal → Kruskal-Wallis test\n- Paired, continuous, normal → Repeated measures ANOVA\n- Paired, continuous, non-normal → Friedman test\n\n**Relationships:**\n- Two continuous variables → Pearson (normal) or Spearman correlation (non-normal)\n- Continuous outcome with predictor(s) → Linear regression\n- Binary outcome with predictor(s) → Logistic regression\n\n**Bayesian Alternatives:**\nAll tests have Bayesian versions providing direct probability statements about hypotheses, Bayes Factors quantifying evidence, and the ability to support the null. See `references\u002Fbayesian_statistics.md`.\n\n---\n\n## Assumption Checking\n\n**Always check assumptions before interpreting test results**, and report the checks — reviewers look for them.\n\nUse the bundled `scripts\u002Fassumption_checks.py` module. Run Python from the skill directory (`skills\u002Fstatistical-analysis\u002F`) or add `scripts\u002F` to `sys.path`:\n\n```python\nfrom assumption_checks import comprehensive_assumption_check\n\n# Outliers + normality (per group) + homogeneity of variance, with plots\nresults = comprehensive_assumption_check(\n    data=df,\n    value_col='score',\n    group_col='group',  # Optional: for group comparisons\n    alpha=0.05\n)\n```\n\nFor targeted checks, import individual functions:\n\n```python\nfrom assumption_checks import (\n    check_normality,                # Shapiro-Wilk + Q-Q plot + histogram\n    check_normality_per_group,\n    check_homogeneity_of_variance,  # Levene's test + box plots\n    check_linearity,                # scatter + residual plot for simple regression\n    check_regression_diagnostics,   # full OLS diagnostics (see Regression below)\n    detect_outliers                 # IQR or z-score methods\n)\n\nresult = check_normality(data=df['score'], name='Test Score', alpha=0.05, plot=True)\nprint(result['interpretation'])\nprint(result['recommendation'])\n```\n\n### What to Do When Assumptions Are Violated\n\n**Normality violated:**\n- Mild violation + n > 30 per group → Proceed with parametric test (robust)\n- Moderate violation → Use non-parametric alternative\n- Severe violation → Transform data or use non-parametric test\n\n**Homogeneity of variance violated:**\n- For t-test → Use Welch's t-test (`pg.ttest` applies it automatically with `correction='auto'`)\n- For ANOVA → Use Welch's ANOVA (`pg.welch_anova`) or Brown-Forsythe\n- For regression → Use robust standard errors or weighted least squares\n\n**Linearity violated (regression):**\n- Add polynomial terms, transform variables, or use non-linear models \u002F GAM\n\nFormal tests get oversensitive as n grows: for n ≥ 100, weigh the Q-Q plot more heavily than the Shapiro-Wilk p-value. See `references\u002Fassumptions_and_diagnostics.md` for comprehensive guidance.\n\n---\n\n## Running Statistical Tests\n\nPrimary libraries:\n- **pingouin**: user-friendly tests that return effect sizes by default — prefer it for standard tests\n- **scipy.stats**: core statistical tests\n- **statsmodels**: regression, diagnostics, power analysis\n- **pymc** + **arviz**: Bayesian modeling and diagnostics\n\n### T-Test with Complete Reporting\n\n```python\nimport pingouin as pg\n\n# correction='auto' applies Welch's correction when variances are unequal\nresult = pg.ttest(group_a, group_b, correction='auto')\n\n# Pingouin >= 0.6 column names\nt_stat = result['T'].values[0]\ndf = result['dof'].values[0]\np_value = result['p_val'].values[0]\ncohens_d = result['cohen_d'].values[0]\nci_lower, ci_upper = result['CI95'].values[0]  # CI for the mean difference\n\nprint(f\"t({df:.0f}) = {t_stat:.2f}, p = {p_value:.3f}, d = {cohens_d:.2f}\")\n```\n\n### ANOVA with Post-Hoc Tests\n\n```python\nimport pingouin as pg\n\naov = pg.anova(dv='score', between='group', data=df, detailed=True)\nprint(aov)\n\n# Effect size: partial eta-squared\neta_p2 = aov['np2'].values[0]\n\n# If significant, conduct post-hoc tests (Tukey HSD controls family-wise error)\nif aov['p_unc'].values[0] \u003C 0.05:\n    posthoc = pg.pairwise_tukey(dv='score', between='group', data=df)\n    print(posthoc)  # includes Hedges' g per pair\n```\n\n### Linear Regression with Diagnostics\n\n```python\nimport statsmodels.api as sm\nfrom assumption_checks import check_regression_diagnostics\n\nX = sm.add_constant(X_predictors)  # Add intercept\nmodel = sm.OLS(y, X).fit()\nprint(model.summary())\n\n# 4-panel residual plot + Shapiro-Wilk, Breusch-Pagan, Durbin-Watson, VIF\ndiag = check_regression_diagnostics(model)\nprint(diag['interpretation'])\nprint(diag['vif'])\n\n# If heteroscedasticity was flagged, report robust standard errors instead\nrobust = model.get_robustcov_results('HC3')\n```\n\n### Bayesian T-Test\n\n```python\nimport pymc as pm\nimport arviz as az\nimport numpy as np\n\nwith pm.Model() as model:\n    # Priors\n    mu1 = pm.Normal('mu_group1', mu=0, sigma=10)\n    mu2 = pm.Normal('mu_group2', mu=0, sigma=10)\n    sigma = pm.HalfNormal('sigma', sigma=10)\n\n    # Likelihood\n    y1 = pm.Normal('y1', mu=mu1, sigma=sigma, observed=group_a)\n    y2 = pm.Normal('y2', mu=mu2, sigma=sigma, observed=group_b)\n\n    # Derived quantity\n    diff = pm.Deterministic('difference', mu1 - mu2)\n\n    trace = pm.sample(2000, tune=1000)\n\n# ArviZ 1.x defaults to 89% intervals; request 95% explicitly for reporting\nprint(az.summary(trace, var_names=['difference'], ci_prob=0.95))\n\n# Direct probability statement (this is what one-sided questions become)\nprob_greater = np.mean(trace.posterior['difference'].values > 0)\nprint(f\"P(mu1 > mu2 | data) = {prob_greater:.3f}\")\n\n# ArviZ 1.x removed az.plot_posterior; use plot_dist (on 0.x, plot_posterior still works)\naz.plot_dist(trace, var_names=['difference'], ci_prob=0.95)\n```\n\nScale priors to the data (e.g., `sigma=10` suits outcomes with SD near 10; use the observed SD as a guide) and state the priors in the report.\n\n---\n\n## Effect Sizes\n\n**Effect sizes quantify magnitude; p-values only indicate existence.** Report one for every test. See `references\u002Feffect_sizes_and_power.md` for the full guide.\n\n### Quick Reference: Common Effect Sizes\n\n| Test | Effect Size | Small | Medium | Large |\n|------|-------------|-------|--------|-------|\n| T-test | Cohen's d | 0.20 | 0.50 | 0.80 |\n| ANOVA | η²_p | 0.01 | 0.06 | 0.14 |\n| Correlation | r | 0.10 | 0.30 | 0.50 |\n| Regression | R² | 0.02 | 0.13 | 0.26 |\n| Chi-square | Cramér's V | 0.07 | 0.21 | 0.35 |\n\nBenchmarks are conventions, not laws — a \"small\" effect can matter enormously (drug side effects) and a \"large\" one can be trivial. Interpret in context.\n\n### Calculating Effect Sizes\n\nPingouin returns effect sizes with its tests (`cohen_d` from `pg.ttest`, `np2` from `pg.anova`, `hedges` from `pg.pairwise_tukey`; `r` from `pg.corr` is already an effect size).\n\n### Confidence Intervals for Effect Sizes\n\nReport a CI for the effect size to show its precision. Use `pg.compute_esci` (note: `pg.compute_effsize_from_t` returns only the point estimate — it does **not** return a CI):\n\n```python\nimport pingouin as pg\n\nd = pg.compute_effsize(group_a, group_b, eftype='cohen')\nci_lower, ci_upper = pg.compute_esci(stat=d, nx=len(group_a), ny=len(group_b),\n                                     eftype='cohen', confidence=0.95)\nprint(f\"d = {d:.2f}, 95% CI [{ci_lower:.2f}, {ci_upper:.2f}]\")\n```\n\n---\n\n## Power Analysis\n\n### A Priori Power Analysis (Study Planning)\n\nDetermine required sample size before data collection:\n\n```python\nfrom statsmodels.stats.power import tt_ind_solve_power, FTestAnovaPower\n\n# T-test: What n per group is needed to detect d = 0.5?\nn_required = tt_ind_solve_power(\n    effect_size=0.5,\n    alpha=0.05,\n    power=0.80,\n    ratio=1.0,\n    alternative='two-sided'\n)\nprint(f\"Required n per group: {n_required:.0f}\")\n\n# One-way ANOVA: What n is needed to detect Cohen's f = 0.25?\n# Notes: the parameter is k_groups; effect_size is Cohen's f (f = sqrt(eta2\u002F(1-eta2)));\n# and solve_power returns the TOTAL sample size, not n per group.\nimport math\nanova_power = FTestAnovaPower()\nn_total = anova_power.solve_power(\n    effect_size=0.25,\n    k_groups=3,\n    alpha=0.05,\n    power=0.80\n)\nprint(f\"Required total N: {math.ceil(n_total)} ({math.ceil(n_total \u002F 3)} per group)\")\n```\n\n### Sensitivity Analysis (Post-Study)\n\nDetermine what effect size the study could detect:\n\n```python\n# With n=50 per group, what effect could we detect at 80% power?\ndetectable_d = tt_ind_solve_power(\n    effect_size=None,  # Solve for this\n    nobs1=50,\n    alpha=0.05,\n    power=0.80,\n    ratio=1.0,\n    alternative='two-sided'\n)\nprint(f\"Study could detect d >= {detectable_d:.2f}\")\n```\n\n**Note**: Post-hoc \"observed power\" (computing power from the observed effect) is circular and misleading — it is a deterministic function of the p-value. If a study is done and someone asks about power, run a sensitivity analysis instead.\n\nSee `references\u002Feffect_sizes_and_power.md` for detailed guidance.\n\n---\n\n## Reporting Results\n\nFollow `references\u002Freporting_standards.md` for APA style. Every report needs:\n\n1. **Descriptive statistics**: M, SD, n for all groups\u002Fvariables\n2. **Test statistics**: Test name, statistic, df, exact p-value (`p = .034`, not `p \u003C .05`; use `p \u003C .001` only below .001)\n3. **Effect sizes**: With confidence intervals\n4. **Assumption checks**: Which tests were run, results, and actions taken\n5. **All planned analyses**: Including non-significant findings — omitting them is cherry-picking\n\n### Example Report Templates\n\n#### Independent T-Test\n\n```\nGroup A (n = 48, M = 75.2, SD = 8.5) scored significantly higher than\nGroup B (n = 52, M = 68.3, SD = 9.2), t(98) = 3.82, p \u003C .001, d = 0.77,\n95% CI [0.36, 1.18], two-tailed. Assumptions of normality (Shapiro-Wilk:\nGroup A W = 0.97, p = .18; Group B W = 0.96, p = .12) and homogeneity\nof variance (Levene's F(1, 98) = 1.23, p = .27) were satisfied.\n```\n\n#### One-Way ANOVA\n\n```\nA one-way ANOVA revealed a significant main effect of treatment condition\non test scores, F(2, 147) = 8.45, p \u003C .001, η²_p = .10. Post hoc\ncomparisons using Tukey's HSD indicated that Condition A (M = 78.2,\nSD = 7.3) scored significantly higher than Condition B (M = 71.5,\nSD = 8.1, p = .002, d = 0.87) and Condition C (M = 70.1, SD = 7.9,\np \u003C .001, d = 1.07). Conditions B and C did not differ significantly\n(p = .52, d = 0.18).\n```\n\n#### Multiple Regression\n\n```\nMultiple linear regression was conducted to predict exam scores from\nstudy hours, prior GPA, and attendance. The overall model was significant,\nF(3, 146) = 45.2, p \u003C .001, R² = .48, adjusted R² = .47. Study hours\n(B = 1.80, SE = 0.31, β = .35, t = 5.78, p \u003C .001, 95% CI [1.18, 2.42])\nand prior GPA (B = 8.52, SE = 1.95, β = .28, t = 4.37, p \u003C .001,\n95% CI [4.66, 12.38]) were significant predictors, while attendance was\nnot (B = 0.15, SE = 0.12, β = .08, t = 1.25, p = .21, 95% CI [-0.09, 0.39]).\nMulticollinearity was not a concern (all VIF \u003C 1.5).\n```\n\n#### Bayesian Analysis\n\n```\nA Bayesian independent samples t-test was conducted using weakly\ninformative priors (Normal(0, 10) for group means). The posterior\ndistribution indicated that Group A scored higher than Group B\n(M_diff = 6.8, 95% credible interval [3.2, 10.4]), with a 99.8%\nposterior probability that Group A's mean exceeded Group B's mean.\nConvergence diagnostics were satisfactory (all R-hat \u003C 1.01, ESS > 1000).\n```\n\nIf a non-parametric test was used, report medians rather than means, the U\u002FW\u002FH statistic, and a rank-based effect size (e.g., rank-biserial correlation, returned by `pg.mwu` as `RBC`).\n\n---\n\n## Bayesian Statistics\n\nConsider Bayesian approaches when:\n- You have prior information to incorporate\n- You want direct probability statements about hypotheses (\"there is a 95% probability the effect lies in this interval\")\n- Sample size is small or data collection is sequential (no correction needed for optional stopping)\n- You need to quantify evidence *for* the null hypothesis\n- The model is complex (hierarchical structure, missing data)\n\nSee `references\u002Fbayesian_statistics.md` for prior specification, Bayes Factors, credible intervals, hierarchical models, and convergence checking (R-hat \u003C 1.01, sufficient ESS, posterior predictive checks).\n\n---\n\n## Bundled Resources\n\n### References (`references\u002F`)\n\n- **test_selection_guide.md**: Decision tree covering group comparisons, relationships, counts, time-to-event, agreement\u002Freliability, and categorical analysis\n- **assumptions_and_diagnostics.md**: Detailed guidance on checking and handling assumption violations\n- **effect_sizes_and_power.md**: Calculating, interpreting, and reporting effect sizes; power analysis\n- **bayesian_statistics.md**: Priors, Bayes Factors, credible intervals, hierarchical models, diagnostics\n- **reporting_standards.md**: APA-style reporting guidelines with worked examples\n\n### Scripts (`scripts\u002F`)\n\n- **assumption_checks.py**: Automated assumption checking with visualizations\n  - `comprehensive_assumption_check()`: outliers + normality + variance homogeneity in one call\n  - `check_normality()`, `check_normality_per_group()`: Shapiro-Wilk with Q-Q plots\n  - `check_homogeneity_of_variance()`: Levene's test with box plots\n  - `check_regression_diagnostics()`: 4-panel residual plots + Shapiro-Wilk, Breusch-Pagan, Durbin-Watson, VIF for fitted OLS models\n  - `check_linearity()`, `detect_outliers()`\n\n---\n\n## Statistical Integrity\n\nThese are the practices that keep an analysis defensible. They matter because the most common statistical failures are not computational errors — they are silent flexibility (testing until something works) and selective reporting.\n\n1. **Distinguish confirmatory from exploratory.** State the planned analysis before running it; label anything discovered along the way as exploratory.\n2. **Don't shop for significance.** If the planned test is non-significant, that is the result. Trying alternative tests, subgroups, or outlier-removal schemes until p \u003C .05 invalidates the p-value.\n3. **Correct for multiple comparisons** when running families of tests (Tukey HSD for post-hoc ANOVA; Holm or Benjamini-Hochberg FDR for other families) and say which correction was used.\n4. **A non-significant result is not evidence of no effect.** With small n, the study may simply have been underpowered — run a sensitivity analysis, or use a Bayesian analysis \u002F equivalence test to actually quantify support for the null.\n5. **Statistical significance is not practical importance.** With large n, trivial effects reach p \u003C .001. Lead the interpretation with the effect size.\n6. **Understand missing data before dropping rows.** Listwise deletion is only safe when data are missing completely at random; otherwise consider multiple imputation and say what was done.\n7. **Make it reproducible.** Set random seeds, report library versions for simulation-based methods, and keep the analysis in a runnable script.\n",{"name":5,"license":24,"metadata":25,"description":7},"MIT license",{"version":26},"1.0.0","main","e0956dc9606356ab78468936b502e55a365282e2","specialist-src\u002Fpublished-skills\u002Fstatistical-analysis",0,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists","https:\u002F\u002Fgithub.com\u002Fmrsonord2240","2026-10-12 03:19:04",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add mrsonord2240\u002Fopenscience-specialists --skill statistical-analysis",{"tool":40,"command":41},"bunx","bunx skills add mrsonord2240\u002Fopenscience-specialists --skill statistical-analysis",{"tool":43,"command":44},"pnpm","pnpm dlx skills add mrsonord2240\u002Fopenscience-specialists --skill statistical-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fstatistical-analysis\u002FSKILL.md",true,[48,54,58,62,66,70],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fassumptions_and_diagnostics.md","REFERENCE","参考文档",12350,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fstatistical-analysis\u002Freferences\u002Fassumptions_and_diagnostics.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fbayesian_statistics.md",20655,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fstatistical-analysis\u002Freferences\u002Fbayesian_statistics.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Feffect_sizes_and_power.md",18413,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fstatistical-analysis\u002Freferences\u002Feffect_sizes_and_power.md",{"path":63,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Freporting_standards.md",20239,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fstatistical-analysis\u002Freferences\u002Freporting_standards.md",{"path":67,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Ftest_selection_guide.md",5077,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fstatistical-analysis\u002Freferences\u002Ftest_selection_guide.md",{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"scripts\u002Fassumption_checks.py","SCRIPT","脚本",20282,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fstatistical-analysis\u002Fscripts\u002Fassumption_checks.py",[77,85,92,99,106,113],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7CW36A6QAGWFE2C008M1XPG","bio-workflows-metabolomics-pipeline","Orchestrates the untargeted LC-MS metabolomics pipeline end-to-end (xcms 4.x feature extraction, QC\u002Fdrift\u002Fnormalization, confidence-stratified annotation, permutation-validated statistics, background-aware pathway mapping), naming what each stage decides and where it silently fails. Use when running a full LC-MS metabolomics study from raw mzML to enriched pathways and needing the honest handoffs between stages. Each stage defers to its component skill for parameters and traps; for stable-isotope flux (a separate branch, not this untargeted flow) see metabolomics\u002Fisotope-tracing.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-workflows-metabolomics-pipeline\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7CW2Y18623NA2S1Y30FRQW1","bio-metabolomics-xcms-preprocessing","Programmatic untargeted LC-MS feature extraction in R with the modern xcms 4.x MsExperiment\u002FXcmsExperiment API, taking raw mzML to a feature table via CentWave peak detection, retention-time alignment, peak-density correspondence, gap-filling, CAMERA redundancy collapse, and built-in QC feature filtering. Use when converting centroided LC-MS runs into a features-by-samples matrix and deciding centWave\u002Fgrouping\u002Falignment parameters. For drift correction and QC\u002FCV filtering execution see metabolomics\u002Fnormalization-qc; for metabolite identification see metabolomics\u002Fmetabolite-annotation; for the MS-DIAL GUI alternative with MS2Dec deconvolution see metabolomics\u002Fmsdial-preprocessing; for downstream statistics see metabolomics\u002Fstatistical-analysis.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-xcms-preprocessing\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7CW2M364HVWPNQEKE2WP4PP","bio-metabolomics-statistical-analysis","Decision-grade statistical analysis for metabolomics intensity tables. Covers transformation and scaling (Pareto vs unit-variance as a hidden hypothesis), unsupervised structure (PCA\u002FHCA for QC), permutation-validated PLS-DA\u002FOPLS-DA (R2 vs Q2, double CV, VIP as heuristic), univariate testing (Welch\u002FMann-Whitney\u002FANOVA\u002FLMM with covariate adjustment), and dependence-aware multiple testing. Use when testing which metabolites differ, building or validating a discriminant model, choosing a scaling, or correcting many correlated tests. For sample-wise normalization\u002Fdrift correction see metabolomics\u002Fnormalization-qc; for ML classifiers and selection-inside-CV leakage see machine-learning\u002Fbiomarker-discovery and machine-learning\u002Fmodel-validation; for pathway interpretation see metabolomics\u002Fpathway-mapping; for design\u002Fpower\u002Fmultiplicity regime see experimental-design\u002Fmultiple-testing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-statistical-analysis\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7CW2BCBF851WYE03Z8XPEDQ","bio-metabolomics-pathway-mapping","Maps metabolomics results to biological pathways via over-representation (ORA), metabolite-set enrichment (MSEA\u002FQEA), mummichog\u002FPSEA on raw m\u002Fz peaks, and network-diffusion enrichment (FELLA), with correct background-set construction and honest interpretive ceilings. Use when interpreting differential metabolites or an untargeted LC-MS feature table in pathway context, choosing ORA vs MSEA vs mummichog vs topology, or setting the reference\u002Fbackground set. For annotation confidence levels feeding ORA see metabolomics\u002Fmetabolite-annotation; for gene-set concepts see pathway-analysis\u002Fgo-enrichment and pathway-analysis\u002Fgsea; for joint gene+metabolite pathways see multi-omics-integration\u002Fmofa-integration.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-pathway-mapping\u002FSKILL.md",[],[],{"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":81,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7CW21NSZMCPMF7D9CHJM718","bio-metabolomics-normalization-qc","Designs QC, corrects signal drift, removes batch effects, filters features, normalizes samples, and imputes missing values for untargeted LC-MS\u002FGC-MS metabolomics, framing each step as a measurement model that can create or erase biological signal. Use when processing a peak\u002Ffeature table before statistical analysis, choosing a drift-correction or sample-normalization method, deciding QC RSD vs D-ratio filtering, or handling left-censored missing values. The feature table is produced by metabolomics\u002Fxcms-preprocessing or metabolomics\u002Fmsdial-preprocessing; transformation\u002Fscaling for modeling defers to metabolomics\u002Fstatistical-analysis; cross-study design issues link to experimental-design\u002Fbatch-design.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-normalization-qc\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7CW1SWVM0NYHVE6Q7MA3G7R","bio-metabolomics-msdial-preprocessing","Runs the MS-DIAL preprocessing workflow (peak picking, MS2Dec spectral deconvolution, alignment, gap-filling) and imports the alignment-result table into R or Python with honest filtering. Use when preprocessing LC-MS DDA\u002FDIA (SWATH) or GC-MS raw data with MS-DIAL, deciding MS-DIAL vs XCMS, configuring the MSDIALCUI console run, or parsing an MS-DIAL export into a clean feature matrix. For programmatic R peak detection and the feature-table-as-artifact framing see metabolomics\u002Fxcms-preprocessing; for lipid annotation mode see metabolomics\u002Flipidomics; for MSI-level confidence honesty see metabolomics\u002Fmetabolite-annotation; for drift correction and QC see metabolomics\u002Fnormalization-qc.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-msdial-preprocessing\u002FSKILL.md",[],[]]