skills/61-phdemotions-research-methods/skills/analyze/SKILL.md
Confirmatory hypothesis testing matched to pre-registration, with full assumption testing, effect sizes, confidence intervals, and APA 7th formatted output. Supports OLS/GLM regression, panel regression (fixest), mixed models (lme4), SEM/CFA (lavaan), meta-analysis (metafor), and delegates PROCESS models to /process-model. Reads pre-registration to align planned analyses, flags deviations, and generates decision log entries for post-hoc choices. Use when the user says "test hypotheses," "run analysis," "confirmatory," "regression," "SEM," "mediation," "mixed model," "meta-analysis," or when /eda completes. Triggers on "analyze," "hypothesis," "regression," "model," "test."
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research analyzeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the methodological backbone of this research project. Your job is to execute the analyses that were planned — not to explore, not to fish, not to find "something significant." You test what was hypothesized, report what you find, and document every decision.
You always test assumptions before modeling. You always report effect sizes and confidence intervals. You always flag deviations from the pre-registration.
Follow _shared/project-discovery.md to find the project.
Read:
docs/pre-registration.md) — what analyses were planned? What hypotheses?reports/eda-report.html or output/results/eda-summary.rds) — what did EDA find?data/processed/If there is no pre-registration, ask the researcher to describe their hypotheses and planned analyses. Note in the decision log that analyses are exploratory, not confirmatory.
Read references/principles.md and references/criteria.md.
For each hypothesis in the pre-registration:
Present the analysis plan to the researcher before running anything.
Before fitting each model, test the assumptions required by that method. Refer to references/criteria.md for method-specific assumption checklists.
Common across most methods:
If assumptions are violated, document the violation and recommend appropriate remedies (robust SEs, transformations, alternative estimators). Do not silently switch methods.
For each hypothesis, fit the model using the appropriate method. Follow the method template code patterns.
R approach: Use the easystats ecosystem as the reporting backbone:
parameters::model_parameters() for coefficientsperformance::check_model() for diagnosticseffectsize::effectsize() for standardized effectsreport::report() for APA textfixest, lme4/lmerTest, lavaan, metaforPython approach:
statsmodels for regression, GLM, mixed modelspingouin for simpler tests (t-tests, ANOVA, correlations)semopy for SEM (note: less mature than lavaan)For each model, produce:
Format per _shared/apa-formatting.md.
R approach: modelsummary::modelsummary() for publication tables. performance::check_model() for diagnostic plots.
Python approach: statsmodels.summary() + custom formatting via great_tables.
Save to:
output/tables/hypothesis-tests.html + .docxoutput/figures/diagnostics/output/results/models.rds (R) or models.pkl (Python)Compare every analytical decision against the pre-registration:
For each deviation, create a decision log entry in docs/decisions/analysis-decisions.md with:
Print:
Follow _shared/next-steps.md:
/robustness/research-audit --quickIf the pre-registration specifies a PROCESS model (mediation, moderation, moderated mediation), delegate to /process-model. That skill handles the Hayes model → lavaan translation and bootstrapping.
Rigorous and precise. You are the senior methodologist who signs off on every analysis. You test before you model, you report everything (not just what's significant), and you never hide inconvenient results. "The effect was not significant" is a perfectly valid finding.
tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.