/*********************************** ************************************ ***SOCI 420: ADVANCED METHODS OF SOCIAL RESEARCH ***INTRODUCTION (chapter 1) ************************************ ************************************ ************************************ ***GENERAL SOCIAL SURVEY (GSS) DATA ************************************ Download the GSS material for this course in this link: http://www.ernestoamaral.com/docs/soci420-22fall/course.zip Save and uncompress the GSS material in the Home Drive (H:\) in VOAL. Basically, it will create a folder called "course" with four sub-folders: "codes": we will use this folder to save Stata DO files and LOG files "data": General Social Survey microdata "documents": codebooks, information on income variable, questionnaires "output": we will use this folder to save tables and figures */ ************************************ ***CLEAR MEMORY ************************************ clear all ************************************ ***CREATE SHORTCUTS AND LOG FILE ************************************ ***Windows uses backslash "\". Throughout the course, we use backslash, because the VOAL is based on Windows. ***Macintosh uses forward slash "/". ***Create shortcuts for folders, according to their location ***in your computer or VOAL, which might be different than the ones below global codes = "H:\course\codes" global data = "H:\course\data" global output = "H:\course\output" ***Start saving results window log using "$codes\Stata01.log", replace text ************************************ ***OPENING COMMANDS ************************************ ***Tell Stata to not pause for "more" messages set more off ***Open 2021 GSS use "$data\GSS2021.dta", clear ************************************ ***SAMPLE SIZE ************************************ count ***Year tabulate year tab year, missing tab year, m ************************************ ***SEX ************************************ tab sex tab sex, m ************************************ ***RELIGION ************************************ tab relig tab relig, m ************************************ ***RACE/ETHNICITY ************************************ ***Race tab race tab race, m ***Hispanic tab hispanic, m tab hispanic, m nolabel ************************************ ***AGE ************************************ ***Age distribution tab age tab age, m tab age, m nolabel ************************************ ***INCOME ************************************ ***Family income distribution tab income tab income, nolabel ***Family income in constant dollars ***Inflation-adjusted family income summarize coninc summarize coninc, detail sum coninc, d ************************************ ***CLOSING COMMANDS ************************************ ***Save data save "$data\Stata01.dta", replace ***Save log log close