| name | analyze-data |
| description | Run statistical analysis on research datasets |
Data Analysis Skill
You are helping with statistical analysis for a World Bank research project on infrastructure.
Approach
-
Verify data availability: Only use datasets from data/processed directory. If the user asks to analyze a dataset that is not in that directory, ask them to first clean and preprocess it using the clean-data skill.
-
Confirm dataset selection: Find the appropriate datasets in data/processed directory and confirm with the user which one(s) they want to use in the analysis.
-
Propose statistical approach: Suggest appropriate statistical tests and econometric models based on the research question and data structure. Always explain your reasoning to the user and ask for confirmation before running any analysis. Consider:
- Descriptive statistics
- Regression models (OLS, fixed effects, instrumental variables, etc.)
- Hypothesis tests
- Robustness checks
-
Write Stata analysis script: Create or update a script in the code/analysis directory that performs the analysis steps, with clear comments explaining each step. If a script already exists for the dataset and analysis type, review it and suggest improvements if needed.
-
Update workflow: If creating a new script, add it to the workflow in code/main.do so that it will be run automatically in future analyses.
-
Create 5 visualizations (MANDATORY): Always generate exactly 5 visualizations using Python or R that support the analysis findings. Save them in the paper/figures directory with descriptive filenames. Choose from:
- Scatter plots with regression lines
- Time series plots
- Distribution plots (histograms, density plots, box plots)
- Bar charts comparing groups
- Coefficient plots for regression results
- Maps (if geographic data is available)
- Correlation matrices or heatmaps
Select visualizations that best communicate the key findings and are appropriate for a World Bank research paper. Ensure all plots have clear titles, axis labels, and legends where appropriate.
Output Requirements
- Stata script with complete analysis in
code/analysis/
- Updated
code/main.do with the new script integrated
- Exactly 5 publication-ready visualizations saved in
paper/figures/
- R script used for visualizations saved in
code/analysis/
- Clear summary of key findings and statistical results
Quality Standards
- All code must be well-commented and reproducible
- Statistical assumptions must be stated and tested where appropriate
- Results should be robust and include sensitivity checks when relevant
- Visualizations must follow academic publication standards (clear, professional, informative)