*Foundations of Econometrics, Fall 2015, Prepared by Dr. I-Ming Chiu
*Accompany 367_Handout02.pdf

*Use a text editor, please save the body of the text below as a Stata do file, e.g., 367_HD01.do.

***
cd “C:\the path of your working directory”
insheet using “StudentSurvey.csv”, clear
log using 367_HD02.smcl
describe
codebook gender smoke
*categorical (nominal), ordinal, and interval variable
summarize gender
summarize height
summarize height, detail
tabulate gender
tabulate award
*use “search” and “help”
help describe
*data type: string (str) vs. numeric (byte, int, long, float, and double)
hist(height)
hist(gender)
encode gender, gen(gender2)
hist(gender2)
tabulate gender2
tabulate gender2, nolabel
log close
exit
***