TC

terryfyl/claude-statistical-analysis-skill

部署与 DevOps

本页由 AI 翻译,技术细节请以原文为准。 查看原文

25 stars 质量 49 趋势 11MIT

一项Claude代码技能,能将Claude转变为专业的统计顾问。在分析前诊断数据质量和假设,自动选择方法,并输出APA表格+图表+...

概览

一项Claude代码技能,将Claude转变为专业的统计顾问。用户不再盲目运行任何请求的方法,而是——检查数据质量、验证假设,并自动选择合适的统计方法。 当你上传数据集并描述分析需求时,Claude会: 1. (自动) — 样本量、变量类型、缺失模式、分布、离群值 2.— 正态性、方差均质性、多重共线性;假设失效时自动切换方法 3.— 运行适当的统计方法并进行适当控制 4.— 每次分析产生三项交付物: - APA第七版表格(Excel + Markdown)- 发表质量图表(300dpi PNG)- 结果段落准备稿件(英文/中文) Claude Code 会自动检测并激活该技能,当你:- 上传数据文件(.xlsx,.csv,。

概述(AI 翻译)

一项Claude代码技能,能将Claude转变为专业的统计顾问。它不再盲目运行用户请求的方法,而是先诊断,然后分析——检查数据质量,验证假设,并自动选择合适的统计方法。

它的作用

当你上传数据集并描述分析需求时,Claude会:

  1. 数据剖面(自动)——样本量、变量类型、缺失模式、分布、离群值
  2. 假设检查 — 正规性、方差齐次性、多重共线性;假设失效时自动切换方法
  3. 执行分析 — 运行适当的统计方法并配备适当的控制
  4. 产出三重 — 每次分析都会产生三个交付物:
  • APA第七版表格(Excel + Markdown)
  • 出版质量数据(300dpi PNG)
  • 结果段落准备稿件(英文/中文)

支持的方法

复杂度 方法 工作流程
简单 描述性统计量,t检验,卡方,相关性,信度 快速路径(0次确认)

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Claude Statistical Analysis Skill

A Claude Code skill that transforms Claude into a professional statistical consultant. Instead of blindly running whatever method the user requests, it diagnoses first, then analyzes — checking data quality, validating assumptions, and automatically selecting the appropriate statistical method.

What It Does

When you upload a dataset and describe your analysis needs, Claude will:

  1. Data Profile (automatic) — Sample size, variable types, missing patterns, distributions, outliers
  2. Assumption Checking — Normality, homogeneity of variance, multicollinearity; auto-switches methods when assumptions fail
  3. Execute Analysis — Runs the appropriate statistical method with proper controls
  4. Output Triple — Every analysis produces three deliverables:
    • APA 7th edition table (Excel + Markdown)
    • Publication-quality figure (300dpi PNG)
    • Results paragraph ready for manuscript (English/Chinese)

Supported Methods

Complexity Methods Workflow
Simple Descriptive stats, t-test, chi-square, correlation, reliability Fast path (0 confirmations)
Medium Regression, ANOVA, moderation, mediation, ROC/AUC, survival Light path (1 confirmation)
Complex SEM/CFA, HLM, IRT, meta-analysis, RI-CLPM Full path (3-4 confirmations)
Planning Power analysis / sample size calculation Dedicated path (no data needed)

Installation

As a Claude Code Skill

# Copy to your Claude skills directory
cp -r . ~/.claude/skills/statistical-analysis/

Claude Code will automatically detect and activate this skill when you:

  • Upload a data file (.xlsx, .csv, .sav)
  • Say “help me analyze” / “run statistical analysis”
  • Mention a specific method (t-test, regression, SEM, etc.)

R Docker Environment (Optional)

For advanced methods that require R (SEM path diagrams, HLM, IRT):

cd docker/
chmod +x r-stat.sh
./r-stat.sh build    # Build the Docker image (~2GB)
./r-stat.sh test     # Verify installation

Pre-installed R packages: lavaan, lme4, metafor, mirt, psych, tidyverse, semPlot, effectsize, and 30+ more.

Project Structure

.
├── SKILL.md                    # Core skill definition (Claude reads this)
├── references/
│   ├── methods-index.md        # Method selection decision trees
│   ├── code-patterns.md        # Python/R code templates
│   ├── table-formats.md        # APA table format specifications
│   └── full-workflow.md        # Full path detailed workflow
├── docker/
│   ├── Dockerfile              # R environment (rocker/tidyverse + 40 packages)
│   ├── r-stat.sh               # Convenience script for Docker operations
│   ├── README.md               # Docker setup guide
│   └── examples/               # SEM, HLM, meta-analysis R examples
└── assets/
    └── report-template.md      # Analysis report template

Key Design Decisions

“Diagnose Before Analyze”

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add terryfyl/claude-statistical-analysis-skill
新手?先看 mcpskill.org 教程 →