Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Provides a reference for Stata syntax, data management, econometric estimation, causal inference, graphics, Mata, and 20+ packages.
83% 100%+17 ptsof test cases passed
Passed 23 of 23 test cases with the skill, and 19 of 23 without it.
3 of 3 safety checks passed
79 agent runs
1 forkA fork is a copy of this skill that someone made so they could edit it for their own use. The original doesn't change.
Stata is the dominant statistical software in economics, political science, public health, and sociology research. This guide provides a comprehensive reference covering core syntax, data management, estimation commands, causal inference methods, graphics, Mata programming, and 20+ community-contributed packages. It is designed as a progressive-disclosure reference: use the section relevant to your current task rather than reading end-to-end.
* Import CSV with variable names in first row
import delimited "data.csv", clear varnames(1)
* Import Excel (specific sheet and cell range)
import excel "workbook.xlsx", sheet("Sheet1") cellrange(A1:Z1000) firstrow clear
* Import Stata format
use "dataset.dta", clear
* Export to CSV
export delimited "output.csv", replace
* Save as Stata format
save "cleaned_data.dta", replace
* Generate new variables
gen log_income = ln(income)
gen age_sq = age^2
gen treatment_post = treatment * post
* Recode and label
recode education (1/12 = 1 "HS or less") (13/16 = 2 "College") (17/20 = 3 "Graduate"), gen(edu_cat)
label variable edu_cat "Education Category"
* String operations
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.