with All Correct Answers 2025-2026
Updated.
use stata as calculator - Answer di or display
help files - Answer help ***
strings - Answer words, make sure to put quotation marks
example: display "hello world"
Check working directory - Answer pwd
change working directory - Answer cd "/Users/nellyzerbib/Desktop/ECON POLI 5/data
sets/week 2"
use college_mobility.dta, replace
how to quickly view variables - Answer use describe command
how to see data - Answer br or browse
to see descriptive statistics, so if binary do this to see the mean and see % true - Answer sum
create command - Answer gen newvar = expression
create binary variables - Answer gen newvar = (var=="othervar")
newvar is new column, rows will be 1 if othervar is true and 0 if not true
, if statement - Answer ex: sum income if age>18
sum mobility_rate if name == "UCSD"
What is a histogram? what is code - Answer distribution of numeric variable
code = histogram varname
what is binning data - Answer divide range into series of intervals
brackets is inclusive and parantheses is exlcuding
[60-70) is 60-69
titles - Answer title("wat")
xtitle
ytitle
example: histogram par_median, frac color(blue%40)
/// title("Distribution of Parental Income") xtitle("Parental Income") ytitle("Fraction of Schools")
what school has the maximum par_median? - Answer sum par_median
*max = 2000
br name if par_median == 2000
what is a unit of observation? - Answer the unit described by the data that one analyzes
so in the college_mobillity, it was instituition