Stata Basics Flashcards
How to import excel spreadsheet in stata
File, import, excel spreadsheet, then click import first row as variable name (as first row of workshop 1 has all the variables we use e.g consumption (dependent) , income etc)
How to analyse data
//analyse
How to get summary of statistics on variables e.g use consumption and income
Type
Sum consumption income
How to see how 2 variables are correlated
Type
Pwcorr consumption income (or 2 variables you look for)
Remember it is important to choose import first row as variable name, so the programme has identified the variables in order to analyse
How to do a graph plot of 2 variables (use consumption and income)
Type
Twoway (line consumption year) (line income year)
How to do a scatter plot of the 2 variables
Scatter consumption income
How to estimate a regression function (parameters)1
Type
Reg consumption income