* Chapter 6: Descriptive Statistics using Stata . * Import data . insheet using "C:\temp\autism.csv", comma clear **************************. * Descriptive Summary #1 . **************************. tab age tab sicdegp age summarize vsae, detail table age, contents(mean vsae min vsae max vsae) **************************. * Generate Figure 6.1 . **************************. tsset childid age xtline vsae if sicdegp == 1, overlay legend(off) title(SICD Group 1) graph save "C:\temp\figure61_part1.gph", replace xtline vsae if sicdegp == 2, overlay legend(off) title(SICD Group 2) graph save "C:\temp\figure61_part2.gph", replace xtline vsae if sicdegp == 3, overlay legend(off) title(SICD Group 3) graph save "C:\temp\figure61_part3.gph", replace graph combine "C:\temp\figure61_part1.gph" "C:\temp\figure61_part2.gph" "C:\temp\figure61_part3.gph", cols(3) **************************. * Generate Figure 6.2 . **************************. twoway (lowess vsae age if sicdegp == 1) (scatter vsae age if sicdegp == 1), legend(off) xtitle(age) ytitle(vsae) title(SICD Group 1) graph save "C:\temp\figure62_part1.gph", replace twoway (lowess vsae age if sicdegp == 2) (scatter vsae age if sicdegp == 2), legend(off) xtitle(age) ytitle(vsae) title(SICD Group 2) graph save "C:\temp\figure62_part2.gph", replace twoway (lowess vsae age if sicdegp == 3) (scatter vsae age if sicdegp == 3), legend(off) xtitle(age) ytitle(vsae) title(SICD Group 3) graph save "C:\temp\figure62_part3.gph", replace graph combine "C:\temp\figure62_part1.gph" "C:\temp\figure62_part2.gph" "C:\temp\figure62_part3.gph", cols(3)