*Stata Assignment I Do-file log using "C:\Documents and Settings\Ryan Goodstein\My Documents\UNC\courses\econ400\Stata1.smcl", replace use "C:\Documents and Settings\Ryan Goodstein\My Documents\UNC\courses\econ400\CPSdata.dta", clear drop recnum rename interest_income intinc label variable intinc "Interest Income" gen annhrs = hours*wkslyr gen wage = earnings / annhrs gen agegrp = 1 replace agegrp = 2 if age >= 35 & age <= 44 replace agegrp = 3 if age >= 45 & age <= 54 summarize *min and max value for age is 25 and 54 respectively display (99-37.7406)/10.18125 *max value for hours is 99, is an outlier (z score = 6.017) su earnings, detail *mean value for earnings is 30141.1 *median value is 26026 *90th percentile is 52000 histogram earnings, title("Earnings") *"close" to bell shape but distribution is skewed to the right graph twoway scatter earnings hours, title("Earnings vs Hours") correl earnings hours *both suggest there is a positive relationship between earnings and hours tabulate margrp, su(wage) *married people have highest wage graph bar (mean) wage, over(educgrp) blabel(bar) *bar chart shows that mean wage is increasing in education group graph bar (median) wage, over(educgrp) blabel(bar) table agegrp, contents(mean intinc) *older age groups have more interest income on average su intinc if agegrp == 3, detail *median interest income is much smaller than mean interest income *suggests that distribution of interest income is skewed to the right histogram intinc if agegrp == 3 log close