You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/stat-analyze-distribution/SKILL.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,29 +18,35 @@ description: Characterize the distribution of one or more numeric variables with
18
18
- Data table (CSV or TSV) with at least one numeric column
19
19
- Optional:
20
20
- Column(s) to analyze (default: all numeric columns)
21
-
- Normality test method: `shapiro` (default, n < 5000) or `ks` (Kolmogorov-Smirnov, larger samples)
21
+
- Normality test method: `shapiro` (default, n ≤ 5000) or `anderson` (Anderson-Darling, recommended for larger samples)
22
22
- Output directory (default: `./dist_output`)
23
23
24
24
## Workflow
25
25
26
26
1. Read the data file; identify numeric columns to analyze (or use user-specified subset).
27
27
2. For each target column, compute summary statistics: mean, median, standard deviation, variance, min, max, 25th/75th percentiles, skewness, kurtosis.
28
-
3. Run normality test: Shapiro-Wilk (n ≤ 5000) or Kolmogorov-Smirnov (n > 5000). Report test statistic and p-value.
29
-
4. Classify each variable: `normal` (p > 0.05) or `non-normal` (p ≤ 0.05), with note on sample size.
28
+
3. Run normality test:
29
+
- Shapiro-Wilk when n ≤ 5000
30
+
- Anderson-Darling when n > 5000
31
+
Report test statistic, p-value (or significance level where applicable), and sample size.
32
+
4. Classify each variable as `approximately_normal` or `non_normal` using both test output and Q-Q plot inspection (do not classify from hypothesis-test p-value alone).
30
33
5. Generate plots for each variable: histogram with density overlay, Q-Q plot.
31
34
6. If multiple variables, produce a summary table across all variables.
32
35
7. Write summary statistics table (TSV) and plots (PDF) to output directory.
33
-
8. Report which variables appear normally distributed and suggest appropriate downstream tests.
36
+
8. Save an executable analysis script (`analysis_code.py` or `analysis_code.R`) and software version manifest (`session_info.txt`) used to produce results.
37
+
9. Report which variables appear normally distributed and suggest appropriate downstream tests.
Copy file name to clipboardExpand all lines: skills/stat-compare-multiple-groups/SKILL.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ description: Compare a continuous variable across three or more groups using one
25
25
## Workflow
26
26
27
27
1. Read data; validate that group column has three or more levels.
28
-
2. Run normality test (Shapiro-Wilk) and Levene's test for each group.
28
+
2. Run normality tests (Shapiro-Wilk) within each group and run one global Levene's test across groups for homogeneity of variance.
29
29
3. If all groups are normal and variances are approximately equal: one-way ANOVA.
30
30
- If second factor provided: two-way ANOVA with interaction term.
31
31
4. If normality or homogeneity of variance is violated: Kruskal-Wallis test.
@@ -34,15 +34,17 @@ description: Compare a continuous variable across three or more groups using one
34
34
- Kruskal-Wallis: Dunn test with Benjamini-Hochberg correction.
35
35
6. Compute effect size: eta-squared (η²) for ANOVA, epsilon-squared for Kruskal-Wallis.
36
36
7. Generate a box plot with all groups and pairwise significance brackets.
37
-
8. Write results and plot (PDF) to output directory.
38
-
9. Report: omnibus test result, effect size, significant pairwise comparisons.
37
+
8. Save the executable analysis script (`analysis_code.py` or `analysis_code.R`) and software version manifest (`session_info.txt`) used to produce results.
38
+
9. Write results and plot (PDF) to output directory.
39
+
10. Report: omnibus test result, effect size, significant pairwise comparisons.
39
40
40
41
## Output Contract
41
42
42
43
- Omnibus test result (TSV): test, statistic, df, p_value, effect_size, effect_size_type
- Penalized model: shrunken coefficients and odds ratios; do not report classical p-values/z-statistics from penalized fit.
32
36
5. Evaluate on test set: compute AUC-ROC, plot ROC curve, compute confusion matrix at 0.5 threshold (accuracy, sensitivity, specificity, PPV, NPV).
33
-
6. Compute Hosmer-Lemeshow goodness-of-fit test for calibration.
34
-
7. If regularization is used: report optimal lambda from cross-validation, coefficients at optimal lambda.
35
-
8. Write coefficient table (TSV), performance metrics (TSV), ROC curve plot (PDF), and calibration plot (PDF) to output directory.
37
+
6. Compute Hosmer-Lemeshow goodness-of-fit test for calibration for the unpenalized model; for penalized models, report calibration curve and Brier score.
38
+
7. If regularization is used: report optimal lambda from cross-validation and non-zero coefficients at optimal lambda.
39
+
8. Save the executable analysis script (`analysis_code.py` or `analysis_code.R`) and software version manifest (`session_info.txt`) used to produce results.
40
+
9. Write coefficient table(s), performance metrics (TSV), ROC curve plot (PDF), and calibration plot (PDF) to output directory.
- Reproducibility artifacts: `analysis_code.py` or `analysis_code.R`, plus `session_info.txt`
43
50
44
51
## Limits
45
52
46
53
- Assumes independence of observations; does not account for clustering or repeated measures.
47
54
- Requires sufficient events per variable (EPV ≥ 10 recommended) to avoid overfitting.
48
55
- Class imbalance can inflate accuracy; examine sensitivity/specificity and AUC.
56
+
- Penalized models are prediction-oriented; classical inferential statistics (standard errors/p-values) are not directly interpretable from penalized coefficients.
49
57
- Common failure: outcome column with more than two levels — binarize before running.
0 commit comments