stat-assess-data-quality
Assess data quality by reporting missing values, outliers, sample size, and variance structure for each variable in a table.
- License 许可
- MIT
- 最近更新
- 2026-11-03
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- stat-assess-data-quality
- description
- Assess data quality by reporting missing values, outliers, sample size, and variance structure for each variable in a table.
02 资源文件 3
- 参考文档agents/claude.yaml345 B
- 参考文档agents/openai.yaml346 B
- 参考文档config.yaml318 B
03 SKILL.md 正文
Skill: Statistical Data Quality Assessment
Use When
- User wants a quick data quality report before any statistical analysis
- User needs to identify columns with high missingness or extreme outliers
- User wants to understand variance structure and flag zero-variance or near-zero-variance columns
- User is preparing data for modeling and wants a pre-flight check
Inputs
- Required:
- Data table (CSV or TSV)
- Optional:
- Outlier detection method:
iqr(default) orzscore - IQR multiplier for outlier threshold (default:
1.5) - Z-score threshold (default:
3.0) - Output directory (default:
./qc_output)
- Outlier detection method:
Workflow
- Read the data file; record total rows (n) and total columns.
- For each column, report: data type, non-missing count, missing count, missing rate (%).
- For numeric columns: compute mean, SD, min, max; detect outliers using IQR fence or Z-score; report outlier count and outlier rate (%).
- Flag columns with: missing rate > 20%, outlier rate > 5%, zero variance, near-zero variance (coefficient of variation < 0.01).
- Report sample size adequacy: flag if n < 30 (small sample warning).
- Produce a missingness heatmap (rows = samples, columns = variables) if any missing values exist.
- Write a quality report (TSV) and missingness plot (PDF) to output directory.
- Summarize flags: list columns requiring attention and recommended actions (imputation, removal, transformation).
- Save the executable analysis script (
analysis_code.pyoranalysis_code.R) and software version manifest (session_info.txt) used to produce results.
Output Contract
- Quality report table (TSV): column, dtype, n_non_missing, n_missing, missing_rate, n_outliers, outlier_rate, mean, sd, min, max, flags
- Missingness heatmap (PDF, only if missing values present)
- Summary of flagged columns (printed to stdout)
- Reproducibility artifacts:
analysis_code.pyoranalysis_code.R, plussession_info.txt
Limits
- IQR-based outlier detection assumes roughly unimodal distributions; may flag many values in skewed data.
- Does not impute or remove data — assessment only.
- Very large datasets (> 1M rows) may be slow; consider sampling first.
- Common failure: mixed-type columns (e.g., numeric with "N/A" strings) require preprocessing.
04 同仓库更多 Skills
structured-intelligence-skill-creator
Create or update repository skills that conform to local templates, provider metadata requirements, registry rules, and validation workflows.
stat-survival-analysis
Estimate and compare survival functions using Kaplan-Meier curves and log-rank test, with optional Cox proportional hazards regression.
stat-pca
Perform PCA on a numeric data matrix to reduce dimensionality, visualize sample structure, and identify top contributing features.
stat-pairwise-correlation
Compute pairwise correlations and significance tests across all numeric variables, and produce a correlation heatmap.
stat-nonlinear-embedding
Embed high-dimensional data into 2D using t-SNE or UMAP for exploratory visualization of sample or cell relationships.
stat-logistic-regression
Fit a logistic regression model for binary outcomes, report odds ratios and model performance (AUC-ROC, confusion matrix).