In this video, we will examine how to run ordinary least squares regressions in Stata. OLS is the most commonly used linear regression method. We use the command "regress" in Stata to estimate the OLS regression models.
**********************************
18. OLS Regression and i. prefix
**********************************
cd "/Users/bobwen/Documents/2022 Youtube Teaching/Introductory Stata/18. OLS/"
capture log close
log using OLS.log, text replace
webuse nlsw88.dta, clear
describe
summarize
set showbaselevels on
*regress wage on grade, age, married, and union
regress wage grade age married union
regress wage grade age i.married i.union, baselevels
regress wage grade age i.married i.union
tabulate race
regress wage grade age i.married i.union i.race
regress wage grade age i.married i.union ib2.race
log close
#regress #i. #baselevels