Running a Regression Analysis Using Stata
Running a regression analysis is a basic procedure in STATA. It is not particularly difficult.
We will use the Presidential Approval data set from last years final for this analysis. Presapp.dta
The steps we will follow will be:
- Examine the correlation matrix for the data
- Run the regression analysis
- Examine the tests of significance and goodness-of-fit statistics
Examine the correlation matrix for the data
Correlations are easy to obtain. Get a correlation matrix of the entire data set with the following command
cor year-cpi
Which looks like this
The format is straightforward. Regress dependentVar IndependentVars
regress approval unemrate
A multiple regression analysis can be performed by simply adding more variables.
regress approval unemrate cpi
Examine the tests of significance and goodness-of-fit statistics
We can construct a table with these results. Note that tables should minimize jargon and eliminate extraneous information.
Variable Model I Model II Unemployment Rate -.597 1.659 (.646) (.892) CPI - -.217* - (.061) Constant 58.059 55.896* (3.814) (3.75) Goodness-of-Fit r2 .006 .085 adj r2 -.001 .072
The numbers in parentheses are standard errors. * = p< .05.