Course Outline
-
segmentGetting Started (Don't Skip This Part)
-
segmentStatistics and Data Science II
-
segmentPART I: EXPLORING AND MODELING VARIATION
-
segmentChapter 1 - Exploring Data with R
-
segmentChapter 2 - From Exploring to Modeling Variation
-
segmentChapter 3 - Modeling Relationships in Data
-
3.8 Interpreting the Parameter Estimates for a Regression Model
-
segmentPART II: COMPARING MODELS TO MAKE INFERENCES
-
segmentChapter 4 - The Logic of Inference
-
segmentChapter 5 - Model Comparison with F
-
segmentChapter 6 - Parameter Estimation and Confidence Intervals
-
segmentPART III: MULTIVARIATE MODELS
-
segmentChapter 7 - Introduction to Multivariate Models
-
segmentChapter 8 - Multivariate Model Comparisons
-
segmentFinishing Up (Don't Skip This Part!)
-
segmentResources
list High School / Statistics and Data Science II (XCD)
3.8 Interpreting the Parameter Estimates for a Regression Model
Previously, we used the lm()
function to fit the HomeSizeK
model of PriceK
and saved it as HomeSizeK_model
:
HomeSizeK_model` <- lm(PriceK ~ HomeSizeK, data = Ames)
We used this model to generate predictions, but now let’s look at the parameter estimates and see how to interpret them.
We’ve already saved the model as HomeSizeK_model
. Print its contents out in the code block below.
Call:
lm(formula = PriceK ~ HomeSizeK, data = Ames)
Coefficients:
(Intercept) HomeSizeK
24.68 106.60
The Intercept
corresponds to HomeSizeK
coefficient corresponds to
Or, equivalently, using GLM notation, it can be written:
PriceK
) when HomeSizeK
) equals 0.
How Regression Models Make Predictions
Similar to our use of the Neighborhood
model, we can use the HomeSizeK
model to predict the price at which a new home will sell. This time, however, we will adjust the prediction based on home size instead of neighborhood.
Recall that price (and predicted price) are in $1000 dollar units. The
The HomeSizeK
, our model predicts a 106.60 increase in PriceK
. Because both of our variables represent units in thousands (HomeSizeK
is thousands of square feet and PriceK
is thousands of dollars), this means that homes with 1K more square feet are predicted by our model to have a $106.60K higher price tag (on average). Here’s a visual representation:
The predicted price of a 2.41K square foot home (that is, 2,410 square feet) is $281.59K. This is the PriceK
) on the regression line when HomeSizeK
) is 2.41, as visualized below:
Comparing the Neighborhood
Model and the HomeSizeK
Model
Having now specified and fit two models, one a group model and the other a regression model, let’s just think for a bit on what the similarities and differences are between these models.
Symbol |
Group Mean Model |
Regression Model |
---|---|---|
|
Price of home i | Price of home i |
|
Predicted home price when (mean home price in College Creek) |
Predicted home price when (y-intercept for regression line) |
|
Adjustment to predicted price for a home in Old Town (the mean difference between the two group means) |
Adjustment to predicted price for a one-unit increase in home size (the slope of the regression line) |
|
Neighborhood of home i, coded as 0=not-Old Town, 1=Old Town | Home size of home i in thousands of square feet |
|
Error for home i | Error for home i |