From the course: Introduction to Stata

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Ordinary least squares regression: Solution

Ordinary least squares regression: Solution - Stata Tutorial

From the course: Introduction to Stata

Ordinary least squares regression: Solution

(upbeat music) - [Narrator] Let's have a look at the solutions to our Ordinary Least Squares Regression challenge. I've already loaded up the nlsw88 data here, and our first challenge was to estimate the determined hourly wages using education, age, race, and marriage status as explanatory variables. We can complete the first challenge by estimating a regression model using the following variables. Regress wage against grade, age, married, and race. We should note that married and race are categorical variables, so it makes sense here to include the i. prefix to both variables. So let's go ahead and do that. Okay, let's execute this. The model has an R-squared of 11%, and the variables grade, married, and black appear statistically significant in our model. The second challenge was to diagnose the model. There are various tests we can perform, but let's check for heteroskedasticity and functional form…

Contents