**************************************************** **************************************************** * These commands tell STATA where to log your results **************************************************** **************************************************** log using "C:\Users\warre046\Desktop\SOC 4881 Data File.log", replace log on **************************************************** **************************************************** * These commands read the data into STATA **************************************************** **************************************************** use "C:\Users\warre046\Desktop\SOC 4881 Data File.dta", replace ****************************************************************************************************************** ****************************************************************************************************************** * These commands produce frequency distributions of education and race for the entire sample ****************************************************************************************************************** ****************************************************************************************************************** tab ed_credential tab race ****************************************************************************************************************** ****************************************************************************************************************** * These commands produce frequency distributions separately by race ****************************************************************************************************************** ****************************************************************************************************************** * For Whites tab ed_credential if race==1 tab ed_credential if race==2 ****************************************************************************************************************** ****************************************************************************************************************** * These commands produce histograms of wages and education (in years) for the entire sample for continuous variables ****************************************************************************************************************** ****************************************************************************************************************** hist wages graph export "C:\Users\warre046\Desktop\Graph1.png", as(png) replace hist ed_years graph export "C:\Users\warre046\Desktop\Graph2.png", as(png) replace ****************************************************************************************************************** ****************************************************************************************************************** * These commands produce measures of central tendency and spread of wages and education (in years) for the entire sample ****************************************************************************************************************** ****************************************************************************************************************** tabstat wages, stat(mean sd min p25 median p75 max n) tabstat ed_years, stat(mean sd min p25 median p75 max n) ****************************************************************************************************************** ****************************************************************************************************************** * These commands produce measures of central tendency and spread of wages and education (in years) separately by race ****************************************************************************************************************** ****************************************************************************************************************** *For Whites tabstat wages if race==1, stat(mean sd min p25 median p75 max n) tabstat ed_years if race==1, stat(mean sd min p25 median p75 max n) *For Women tabstat wages if race==2, stat(mean sd min p25 median p75 max n) tabstat ed_years if race==2, stat(mean sd min p25 median p75 max n) ****************************************************************************************************************** ****************************************************************************************************************** * These commands produce cross-tabulations of categorical variables, in this case race and education ****************************************************************************************************************** ****************************************************************************************************************** tab race ed_credential ****************************************************************************************************************** ****************************************************************************************************************** * These commands produce correlations between two continuous variables ****************************************************************************************************************** ****************************************************************************************************************** correlate ed_years wages ****************************************************************************************************************** ****************************************************************************************************************** * These commands produce linear regressions of one continuous variable on another (in this case, of wages on education) ****************************************************************************************************************** ****************************************************************************************************************** regress wages ed_years ****************************************************************************************************************** ****************************************************************************************************************** * These commands produce within-sibling pair regressions of one continuous variable on another (in this case, of wages on education) ****************************************************************************************************************** ****************************************************************************************************************** * The first command tells Stata that "serial_1920" identifies unique pairs of brothers in households xtset serial_1920 * The next actually does the "within-brother pair" regression (of wage son education) xtreg wages ed_years, fe log off log close