Install any skill in seconds. Free to start, no credit card required.
Get Started Free →brycewang-stanford/stata-analyst-guide
Stata workflows for publication-ready sociology and social science research
Passed 17 of 23 test cases with the skill, and 15 of 23 without it.
3 fixed14 passed either way5 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
How do I create and open a project-wide log file using Stata's markup log format within a logs directory defined by global macro $logs?
| Checked | Without skill | With skill |
|---|---|---|
| Opens log file using log using "$logs/master_log.smcl", replace syntax. | Missed | Passed |
The instructions your model reads when the skill loads.
Complete Stata workflow for sociology and social science research, from survey data preparation through publication-ready regression tables and visualizations. This skill covers the analytical techniques most commonly used in top sociology journals.
Stata is the dominant statistical software in sociology, political science, demography, and many social science disciplines. Its command-line interface, reproducible do-file workflow, and comprehensive support for survey data, multilevel models, and categorical data analysis make it the tool of choice for researchers working with complex social datasets.
This skill provides ready-to-use Stata code for the most common analytical tasks in social science research: descriptive statistics for diverse variable types, regression modeling with proper controls and robustness checks, interaction effects with meaningful visualizations, and automated production of APA/ASA-formatted tables suitable for direct inclusion in journal manuscripts.
The examples draw on typical social science data structures: individual-level survey data with sampling weights, nested data (individuals within organizations or regions), longitudinal panels, and event-history data. All code follows the conventions expected by reviewers at journals such as the American Sociological Review, American Journal of Sociology, and Social Forces.
* Social science surveys typically require survey weights
svyset psu [pweight=finalweight], strata(stratum)
* Weighted means and proportions
svy: mean income education_years age
svy: proportion race gender marital_status
* Weighted cross-tabulation
svy: tabulate education_cat income_quintile, row se
* Descriptive statistics table for paper
estpost summarize age education_years income ///
children household_size, detail
esttab using "tables/descriptives.tex", ///
cells("mean(fmt(2)) sd(fmt(2)) min max count") ///
label title("Descriptive Statistics") replace
* T-tests with survey weights
svy: mean income, over(gender)
test cases passed, vs 15 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.