Regression in Stata
Regression is a useful way to look at how variables fit together to whatever degree of complication you desire. The basic linear regression command in Stata is simply regress [y variable] [x variables], [options]
The regress
command output includes an ANOVA table, but depending on the options you specify, this may not be relevant and migt, in fact, be suppressed. The default is to give nonstandardized coefficients however after running the regression, standardized weights can be obtained by typing in regress, beta
. with no arguments (Stata wisely assumes you want to run the same regression previously specified).
T0he regress command hunts out variables with collinearity (collinearity meaning that their individual line points are the same) and drops them (this is indicating by the word "dropped" next to.
One of the assumptions for linear regression is homoskedasticity, or that all the variables have similar variability. If you believe your data might be heterosekdastic or if your observations includes some within-subjecct data, Stata provides the vce([correction type])
option. The vce
option changes the type of standard error reported and is common to many Stata commands, see the vce tutorial for more information. The regress, vce ()
option can also take hc2
and hc3
type help regress
to learn more about these two options
A regression output has two major parts, an ANOVA table and a table of regression coefficients and a basic output will look as follows.
Additional Regression Topics
- How Stata treats constants
- Postestimation Commands and Options
- Adding Weighting (to Regression)
- Graphing Regression
- Dummy-coding for Regression
- (Checking for) nonlinear regression
- Piecewise Regression