WorldClass Statistics · Multiple and logistic regression

Introduction to multiple regression

The principles of simple linear regression lay the foundation for more sophisticated regression models used in a wide range of challenging settings. In Chapter 9, we explore multiple regression, which introduces the possibility of more than one predictor in a linear model, and logistic regression, a technique for predicting categorical outcomes with two levels.

Multiple regression extends simple two-variable regression to the case that still has one response but many predictors (denoted x1x_1, x2x_2, x3x_3, ...). The method is motivated by scenarios where many variables may be simultaneously connected to an output.

We will consider data about loans from the peer-to-peer lender, Lending Club, which is a data set we first encountered in Chapters 1 and 2. The loan data includes terms of the loan as well as information about the borrower. The outcome variable we would like to better understand is the interest rate assigned to the loan. For instance, all other characteristics held constant, does it matter how much debt someone already has? Does it matter if their income has been verified? Multiple regression will help us answer these and other questions.

The data set loans includes results from 10,000 loans, and we’ll be looking at a subset of the available variables, some of which will be new from those we saw in earlier chapters. The first six observations in the data set are shown in Figure 9.1, and descriptions for each variable are shown in Figure 9.2. Notice that the past bankruptcy variable (bankruptcy) is an indicator variable, where it takes the value 1 if the borrower had a past bankruptcy in their record and 0 if not. Using an indicator variable in place of a category name allows for these variables to be directly used in regression. Two of the other variables are categorical (income_ver and issued), each of which can take one of a few different non-numerical values; we’ll discuss how these are handled in the model in Section 9.1.1.

interest_rate income_ver debt_to_income credit_util bankruptcy term issued credit_checks
1 14.07 verified 18.01 0.55 0 60 Mar2018 6
2 12.61 not 5.04 0.15 1 36 Feb2018 1
3 17.09 source_only 21.15 0.66 0 36 Feb2018 4
4 6.72 not 10.16 0.20 0 36 Jan2018 0
5 14.07 verified 57.96 0.75 0 36 Mar2018 7
6 6.72 not 6.46 0.09 0 36 Jan2018 6
⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots

Figure 9.1. First six rows from the loans data set.
variable description
interest_rate Interest rate for the loan.
income_ver Categorical variable describing whether the borrower’s income source and amount have been verified, with levels verified, source_only, and not.
debt_to_income Debt-to-income ratio, which is the percentage of total debt of the borrower divided by their total income.
credit_util Of all the credit available to the borrower, what fraction are they utilizing. For example, the credit utilization on a credit card would be the card’s balance divided by the card’s credit limit.
bankruptcy An indicator variable for whether the borrower has a past bankruptcy in her record. This variable takes a value of 1 if the answer is “yes” and 0 if the answer is “no”.
term The length of the loan, in months.
issued The month and year the loan was issued, which for these loans is always during the first quarter of 2018.
credit_checks Number of credit checks in the last 12 months. For example, when filing an application for a credit card, it is common for the company receiving the application to run a credit check.

Figure 9.2. Variables and their descriptions for the loans data set.

Indicator and categorical variables as predictors

Let’s start by fitting a linear regression model for interest rate with a single predictor indicating whether or not a person has a bankruptcy in their record: rate^=12.33+0.74×bankruptcy\begin{aligned} \widehat{rate} &= 12.33 + 0.74{} \times bankruptcy \end{aligned} Results of this model are shown in Figure 9.3.

Estimate Std. Error t value Pr(>>∣|t∣|)
(Intercept) 12.3380 0.0533 231.49 <<0.0001
bankruptcy 0.7368 0.1529 4.82 <<0.0001
df=9998df=9998

Figure 9.3. Summary of a linear model for predicting interest rate based on whether the borrower has a bankruptcy in their record.

Example 9.1

Interpret the coefficient for the past bankruptcy variable in the model. Is this coefficient significantly different from 0?


The bankruptcy variable takes one of two values: 1 when the borrower has a bankruptcy in their history and 0 otherwise. A slope of 0.74 means that the model predicts a 0.74% higher interest rate for those borrowers with a bankruptcy in their record. (See Section 8.2.8 for a review of the interpretation for two-level categorical predictor variables.) Examining the regression output in Figure 9.3, we can see that the p-value for bankruptcy is very close to zero, indicating there is strong evidence the coefficient is different from zero when using this simple one-predictor model.

Suppose we had fit a model using a 3-level categorical variable, such as income_ver. The output from software is shown in Figure 9.4. This regression output provides multiple rows for the income_ver variable. Each row represents the relative difference for each level of income_ver. However, we are missing one of the levels: not (for not verified). The missing level is called the reference level, and it represents the default level that other levels are measured against.

Estimate Std. Error t value Pr(>>∣|t∣|)
(Intercept) 11.0995 0.0809 137.18 <<0.0001
income_ver 1.4160 0.1107 12.79 <<0.0001
income_ver 3.2543 0.1297 25.09 <<0.0001
df=9998df=9998

Figure 9.4. Summary of a linear model for predicting interest rate based on whether the borrower’s income source and amount has been verified. This predictor has three levels, which results in 2 rows in the regression output.

Example 9.2

How would we write an equation for this regression model?


The equation for the regression model may be written as a model with two predictors: rate^=11.10+1.42×income_versource_only+3.25×income_ververified\begin{aligned} \widehat{rate} = 11.10 + 1.42 \times \texttt{income\_{}ver}_{\texttt{source\_{}only}} + 3.25 \times \texttt{income\_{}ver}_{\texttt{verified}} \end{aligned} We use the notation variablelevel\texttt{variable}_{\texttt{level}} to represent indicator variables for when the categorical variable takes a particular value. For example, income_versource_only\texttt{income\_{}ver}_{\texttt{source\_{}only}} would take a value of 1 if income_ver was source_only for a loan, and it would take a value of 0 otherwise. Likewise, income_ververified\texttt{income\_{}ver}_{\texttt{verified}} would take a value of 1 if income_ver took a value of verified and 0 if it took any other value.

The notation used in Example 9.2 may feel a bit confusing. Let’s figure out how to use the equation for each level of the income_ver variable.

Example 9.3

Using the model from Example 9.2, compute the average interest rate for borrowers whose income source and amount are both unverified.


When income_ver takes a value of not, then both indicator functions in the equation from Example 9.2 are set to zero: rate^=11.10+1.42×0+3.25×0=11.10\begin{aligned} \widehat{rate} &= 11.10 + 1.42 \times 0 + 3.25 \times 0 \\ &= 11.10 \end{aligned} The average interest rate for these borrowers is 11.1%. Because the not level does not have its own coefficient and it is the reference value, the indicators for the other levels for this variable all drop out.

Example 9.4

Using the model from Example 9.2, compute the average interest rate for borrowers whose income source is verified but the amount is not.


When income_ver takes a value of source_only, then the corresponding variable takes a value of 1 while the other (income_ververified\texttt{income\_{}ver}_{\texttt{verified}}) is 0: rate^=11.10+1.42×1+3.25×0=12.52\begin{aligned} \widehat{rate} &= 11.10 + 1.42 \times 1 + 3.25 \times 0 \\ &= 12.52 \end{aligned} The average interest rate for these borrowers is 12.52%.

Guided Practice 9.5

Compute the average interest rate for borrowers whose income source and amount are both verified.1

Predictors with several categories

When fitting a regression model with a categorical variable that has kk levels where k>2k > 2, software will provide a coefficient for k−1k - 1 of those levels. For the last level that does not receive a coefficient, this is the reference level, and the coefficients listed for the other levels are all considered relative to this reference level.

Guided Practice 9.6

Interpret the coefficients in the income_ver model.2

The higher interest rate for borrowers who have verified their income source or amount is surprising. Intuitively, we’d think that a loan would look less risky if the borrower’s income has been verified. However, note that the situation may be more complex, and there may be confounding variables that we didn’t account for. For example, perhaps lender require borrowers with poor credit to verify their income. That is, verifying income in our data set might be a signal of some concerns about the borrower rather than a reassurance that the borrower will pay back the loan. For this reason, the borrower could be deemed higher risk, resulting in a higher interest rate. (What other confounding variables might explain this counter-intuitive relationship suggested by the model?)

Guided Practice 9.7

How much larger of an interest rate would we expect for a borrower who has verified their income source and amount vs a borrower whose income source has only been verified?3

Including and assessing many variables in a model

The world is complex, and it can be helpful to consider many factors at once in statistical modeling. For example, we might like to use the full context of borrower to predict the interest rate they receive rather than using a single variable. This is the strategy used in multiple regression. While we remain cautious about making any causal interpretations using multiple regression on observational data, such models are a common first step in gaining insights or providing some evidence of a causal connection.

We want to construct a model that accounts not only for any past bankruptcy or whether the borrower had their income source or amount verified, but simultaneously accounts for all the variables in the data set: income_ver, debt_to_income, credit_util, bankruptcy, term, issued, and credit_checks. rate^=β0+β1×income_versource_only+β2×income_ververified+β3×debt_to_income +β4×credit_util+β5×bankruptcy+β6×term +β7×issuedJan2018+β8×issuedMar2018+β9×credit_checks\begin{aligned} \widehat{\texttt{rate}} &= \beta_0 + \beta_1\times \texttt{income\_{}ver}_{\texttt{source\_{}only}} + \beta_2\times \texttt{income\_{}ver}_{\texttt{verified}} + \beta_3\times \texttt{debt\_{}to\_{}income} \\ &\qquad\ + \beta_4 \times \texttt{credit\_{}util} + \beta_5 \times \texttt{bankruptcy} + \beta_6 \times \texttt{term} \\ &\qquad\ + \beta_7 \times \texttt{issued}_{\texttt{Jan2018}} + \beta_8 \times \texttt{issued}_{\texttt{Mar2018}} + \beta_9 \times \texttt{credit\_{}checks} \end{aligned} This equation represents a holistic approach for modeling all of the variables simultaneously. Notice that there are two coefficients for income_ver and also two coefficients for issued, since both are 3-level categorical variables.

We estimate the parameters β0\beta_0, β1\beta_1, β2\beta_2, ..., β9\beta_9 in the same way as we did in the case of a single predictor. We select b0b_0, b1b_1, b2b_2, ..., b9b_9 that minimize the sum of the squared residuals: SSE=e12+e22+⋯+e100002=∑i=110000ei2=∑i=110000(yi−y^i)2\begin{aligned} SSE = e_1^2 + e_2^2 + \dots + e_{10000}^2 = \sum_{i=1}^{10000} e_i^2 = \sum_{i=1}^{10000} \left(y_i - \hat{y}_i\right)^2 \end{aligned} where yiy_i and y^i\hat{y}_i represent the observed interest rates and their estimated values according to the model, respectively. 10,000 residuals are calculated, one for each observation. We typically use a computer to minimize the sum of squares and compute point estimates, as shown in the sample output in Figure 9.5. Using this output, we identify the point estimates bib_i of each βi\beta_i, just as we did in the one-predictor case.

Estimate Std. Error t value Pr(>>∣|t∣|)
(Intercept) 1.9251 0.2102 9.16 <<0.0001
income_ver 0.9750 0.0991 9.83 <<0.0001
income_ver 2.5374 0.1172 21.65 <<0.0001
debt_to_income 0.0211 0.0029 7.18 <<0.0001
credit_util 4.8959 0.1619 30.24 <<0.0001
bankruptcy 0.3864 0.1324 2.92 0.0035
term 0.1537 0.0039 38.96 <<0.0001
issued 0.0276 0.1081 0.26 0.7981
issued -0.0397 0.1065 -0.37 0.7093
credit_checks 0.2282 0.0182 12.51 <<0.0001
df=9990df=9990

Figure 9.5. Output for the regression model, where interest_rate is the outcome and the variables listed are the predictors.

Multiple regression model

A multiple regression model is a linear model with many predictors. In general, we write the model as y^=β0+β1x1+β2x2+⋯+βkxk\begin{aligned} \hat{y} = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \cdots + \beta_k x_k \end{aligned} when there are kk predictors. We always estimate the βi\beta_i parameters using statistical software.

Example 9.8

Write out the regression model using the point estimates from Figure 9.5. How many predictors are there in this model?


The fitted model for the interest rate is given by: rate^=1.925+0.975×income_versource_only+2.537×income_ververified+0.021×debt_to_income +4.896×credit_util+0.386×bankruptcy+0.154×term +0.028×issuedJan2018−0.040×issuedMar2018+0.228×credit_checks\begin{aligned} \widehat{\texttt{rate}} &= 1.925 + 0.975 \times \texttt{income\_{}ver}_{\texttt{source\_{}only}} + 2.537 \times \texttt{income\_{}ver}_{\texttt{verified}} + 0.021 \times \texttt{debt\_{}to\_{}income} \\ &\qquad\ + 4.896 \times \texttt{credit\_{}util} + 0.386 \times \texttt{bankruptcy} + 0.154 \times \texttt{term} \\ &\qquad\ + 0.028 \times \texttt{issued}_{\texttt{Jan2018}} -0.040 \times \texttt{issued}_{\texttt{Mar2018}} + 0.228 \times \texttt{credit\_{}checks} \end{aligned}If we count up the number of predictor coefficients, we get the effective number of predictors in the model: k=9k = 9. Notice that the issued categorical predictor counts as two, once for the two levels shown in the model. In general, a categorical predictor with pp different levels will be represented by p−1p - 1 terms in a multiple regression model.

Guided Practice 9.9

What does β4\beta_4, the coefficient of variable credit_util, represent? What is the point estimate of β4\beta_4?4

Example 9.10

Compute the residual of the first observation in Figure 9.1 on Section 9.1 using the equation identified in Guided Practice 9.8.


To compute the residual, we first need the predicted value, which we compute by plugging values into the equation from Example 9.8. For example, income_versource_only\texttt{income\_{}ver}_{\texttt{source\_{}only}} takes a value of 0, income_ververified\texttt{income\_{}ver}_{\texttt{verified}} takes a value of 1 (since the borrower’s income source and amount were verified), debt_to_income was 18.01, and so on. This leads to a prediction of rate^1=18.09\widehat{rate}_1 = 18.09. The observed interest rate was 14.07%, which leads to a residual of e1=14.07−18.09=−4.02e_1 = 14.07 - 18.09 = -4.02.

Example 9.11

We estimated a coefficient for bankruptcy in Section 9.1.1 of b4=0.74b_4 = 0.74{} with a standard error of SEb1=0.15SE_{b_1} = 0.15{} when using simple linear regression. Why is there a difference between that estimate and the estimated coefficient of 0.39 in the multiple regression setting?


If we examined the data carefully, we would see that some predictors are correlated. For instance, when we estimated the connection of the outcome interest_rate and predictor bankruptcy using simple linear regression, we were unable to control for other variables like whether the borrower had her income verified, the borrower’s debt-to-income ratio, and other variables. That original model was constructed in a vacuum and did not consider the full context. When we include all of the variables, underlying and unintentional bias that was missed by these other variables is reduced or eliminated. Of course, bias can still exist from other confounding variables.

Example 9.11 describes a common issue in multiple regression: correlation among predictor variables. We say the two predictor variables are collinear (pronounced as co-linear) when they are correlated, and this collinearity complicates model estimation. While it is impossible to prevent collinearity from arising in observational data, experiments are usually designed to prevent predictors from being collinear.

Guided Practice 9.12

The estimated value of the intercept is 1.925, and one might be tempted to make some interpretation of this coefficient, such as, it is the model’s predicted price when each of the variables take value zero: income source is not verified, the borrower has no debt (debt-to-income and credit utilization are zero), and so on. Is this reasonable? Is there any value gained by making this interpretation?5

Adjusted R2\boldsymbol{R^2} as a better tool for multiple regression

We first used R2R^2 in Section 8.2 to determine the amount of variability in the response that was explained by the model: R2=1−variability in residualsvariability in the outcome=1−Var(ei)Var(yi)\begin{aligned} R^2 = 1 - \frac{\text{variability in residuals}} {\text{variability in the outcome}} = 1 - \frac{Var(e_i)}{Var(y_i)} \end{aligned} where eie_i represents the residuals of the model and yiy_i the outcomes. This equation remains valid in the multiple regression framework, but a small enhancement can make it even more informative when comparing models.

Guided Practice 9.13

The variance of the residuals for the model given in Guided Practice 9.8 is 18.53, and the variance of the total price in all the auctions is 25.01. Calculate R2R^2 for this model.6

This strategy for estimating R2R^2 is acceptable when there is just a single variable. However, it becomes less helpful when there are many variables. The regular R2R^2 is a biased estimate of the amount of variability explained by the model when applied to a new sample of data. To get a better estimate, we use the adjusted R2R^2.

Adjusted R2\boldsymbol{R^2} as a tool for model assessment

The adjusted R2\boldsymbol{R^2} is computed as Radj2=1−sresiduals2/(n−k−1)soutcome2/(n−1)=1−sresiduals2soutcome2×n−1n−k−1\begin{aligned} R_{adj}^{2} = 1 - \frac{s_{\text{residuals}}^2 / (n-k-1)} {s_{\text{outcome}}^2 / (n-1)} = 1 - \frac{s_{\text{residuals}}^2}{s_{\text{outcome}}^2} \times \frac{n-1}{n-k-1} \end{aligned} where nn is the number of cases used to fit the model and kk is the number of predictor variables in the model. Remember that a categorical predictor with pp levels will contribute p−1p - 1 to the number of variables in the model.

Because kk is never negative, the adjusted R2R^2 will be smaller – often times just a little smaller – than the unadjusted R2R^2. The reasoning behind the adjusted R2R^2 lies in the degrees of freedom associated with each variance, which is equal to n−k−1n - k - 1 for the multiple regression context. If we were to make predictions for new data using our current model, we would find that the unadjusted R2R^2 would tend to be slightly overly optimistic, while the adjusted R2R^2 formula helps correct this bias.

Guided Practice 9.14

There were n=10000n=10000 auctions in the loans data set and k=9k=9 predictor variables in the model. Use nn, kk, and the variances from Guided Practice 9.13 to calculate Radj2R_{adj}^2 for the interest rate model.7

Guided Practice 9.15

Suppose you added another predictor to the model, but the variance of the errors Var(ei)Var(e_i) didn’t go down. What would happen to the R2R^2? What would happen to the adjusted R2R^2?8

Adjusted R2R^2 could have been used in Chapter 8. However, when there is only k=1k = 1 predictors, adjusted R2R^2 is very close to regular R2R^2, so this nuance isn’t typically important when the model has only one predictor.

Exercises

Exercise 9.1

Baby weights, Part I. The Child Health and Development Studies investigate a range of topics. One study considered all pregnancies between 1960 and 1967 among women in the Kaiser Foundation Health Plan in the San Francisco East Bay area. Here, we study the relationship between smoking and weight of the baby. The variable smoke is coded 1 if the mother is a smoker, and 0 if not. The summary table below shows the results of a linear regression model for predicting the average birth weight of babies, measured in ounces, based on the smoking status of the mother. 9

Estimate Std. Error t value Pr(>>∣|t∣|)
(Intercept) 123.05 0.65 189.60 0.0000
smoke -8.94 1.03 -8.65 0.0000

The variability within the smokers and non-smokers are about equal and the distributions are symmetric. With these conditions satisfied, it is reasonable to apply the model. (Note that we don’t need to check linearity since the predictor has only two levels.)

  1. Write the equation of the regression model.

  2. Interpret the slope in this context, and calculate the predicted birth weight of babies born to smoker and non-smoker mothers.

  3. Is there a statistically significant relationship between the average birth weight and smoking?

Solution in Appendix A

Exercise 9.2

Baby weights, Part II. Exercise 9.1 introduces a data set on birth weight of babies. Another variable we consider is parity, which is 1 if the child is the first born, and 0 otherwise. The summary table below shows the results of a linear regression model for predicting the average birth weight of babies, measured in ounces, from parity.

Estimate Std. Error t value Pr(>>∣|t∣|)
(Intercept) 120.07 0.60 199.94 0.0000
parity -1.93 1.19 -1.62 0.1052
  1. Write the equation of the regression model.

  2. Interpret the slope in this context, and calculate the predicted birth weight of first borns and others.

  3. Is there a statistically significant relationship between the average birth weight and parity?

Exercise 9.3

Baby weights, Part III. We considered the variables smoke and parity, one at a time, in modeling birth weights of babies in Exercises 9.1 and 9.2. A more realistic approach to modeling infant weights is to consider all possibly related variables at once. Other variables of interest include length of pregnancy in days (gestation), mother’s age in years (age), mother’s height in inches (height), and mother’s pregnancy weight in pounds (weight). Below are three observations from this data set.

bwt gestation parity age height weight smoke
1 120 284 0 27 62 100 0
2 113 282 0 33 64 135 0
⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots
1236 117 297 0 38 65 129 0

The summary table below shows the results of a regression model for predicting the average birth weight of babies based on all of the variables included in the data set.

Estimate Std. Error t value Pr(>>∣|t∣|)
(Intercept) -80.41 14.35 -5.60 0.0000
gestation 0.44 0.03 15.26 0.0000
parity -3.33 1.13 -2.95 0.0033
age -0.01 0.09 -0.10 0.9170
height 1.15 0.21 5.63 0.0000
weight 0.05 0.03 1.99 0.0471
smoke -8.40 0.95 -8.81 0.0000
  1. Write the equation of the regression model that includes all of the variables.

  2. Interpret the slopes of gestation and age in this context.

  3. The coefficient for parity is different than in the linear model shown in Exercise 9.2. Why might there be a difference?

  4. Calculate the residual for the first observation in the data set.

  5. The variance of the residuals is 249.28, and the variance of the birth weights of all babies in the data set is 332.57. Calculate the R2R^2 and the adjusted R2R^2. Note that there are 1,236 observations in the data set.

Solution in Appendix A

Exercise 9.4

Absenteeism, Part I. Researchers interested in the relationship between absenteeism from school and certain demographic characteristics of children collected data from 146 randomly sampled students in rural New South Wales, Australia, in a particular school year. Below are three observations from this data set.

eth sex lrn days
1 0 1 1 2
2 0 1 1 11
⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots
146 1 0 0 37

The summary table below shows the results of a linear regression model for predicting the average number of days absent based on ethnic background (eth: 0 - aboriginal, 1 - not aboriginal), sex (sex: 0 - female, 1 - male), and learner status (lrn: 0 - average learner, 1 - slow learner). 10

Estimate Std. Error t value Pr(>>∣|t∣|)
(Intercept) 18.93 2.57 7.37 0.0000
eth -9.11 2.60 -3.51 0.0000
sex 3.10 2.64 1.18 0.2411
lrn 2.15 2.65 0.81 0.4177
  1. Write the equation of the regression model.

  2. Interpret each one of the slopes in this context.

  3. Calculate the residual for the first observation in the data set: a student who is aboriginal, male, a slow learner, and missed 2 days of school.

  4. The variance of the residuals is 240.57, and the variance of the number of absent days for all students in the data set is 264.17. Calculate the R2R^2 and the adjusted R2R^2. Note that there are 146 observations in the data set.

Exercise 9.5

GPA. A survey of 55 Duke University students asked about their GPA, number of hours they study at night, number of nights they go out, and their gender. Summary output of the regression model is shown below. Note that male is coded as 1.

Estimate Std. Error t value Pr(>>∣|t∣|)
(Intercept) 3.45 0.35 9.85 0.00
studyweek 0.00 0.00 0.27 0.79
sleepnight 0.01 0.05 0.11 0.91
outnight 0.05 0.05 1.01 0.32
gender -0.08 0.12 -0.68 0.50
  1. Calculate a 95% confidence interval for the coefficient of gender in the model, and interpret it in the context of the data.

  2. Would you expect a 95% confidence interval for the slope of the remaining variables to include 0? Explain

Solution in Appendix A

Exercise 9.6

Cherry trees. Timber yield is approximately equal to the volume of a tree, however, this value is difficult to measure without first cutting the tree down. Instead, other variables, such as height and diameter, may be used to predict a tree’s volume and yield. Researchers wanting to understand the relationship between these variables for black cherry trees collected data from 31 such trees in the Allegheny National Forest, Pennsylvania. Height is measured in feet, diameter in inches (at 54 inches above ground), and volume in cubic feet.11

Estimate Std. Error t value Pr(>>∣|t∣|)
(Intercept) -57.99 8.64 -6.71 0.00
height 0.34 0.13 2.61 0.01
diameter 4.71 0.26 17.82 0.00
  1. Calculate a 95% confidence interval for the coefficient of height, and interpret it in the context of the data.

  2. One tree in this sample is 79 feet tall, has a diameter of 11.3 inches, and is 24.2 cubic feet in volume. Determine if the model overestimates or underestimates the volume of this tree, and by how much.

Notes

  1. When income_ver takes a value of verified, then the corresponding variable takes a value of 1 while the other (income_versource_only\texttt{income\_{}ver}_{\texttt{source\_{}only}}) is 0: rate^=11.10+1.42×0+3.25×1=14.35\begin{aligned} \widehat{rate} &= 11.10 + 1.42 \times 0 + 3.25 \times 1 \\ &= 14.35 \end{aligned} The average interest rate for these borrowers is 14.35%. ↩

  2. Each of the coefficients gives the incremental interest rate for the corresponding level relative to the not level, which is the reference level. For example, for a borrower whose income source and amount have been verified, the model predicts that they will have a 3.25% higher interest rate than a borrower who has not had their income source or amount verified. ↩

  3. Relative to the not category, the verified category has an interest rate of 3.25% higher, while the source_only category is only 1.42% higher. Thus, verified borrowers will tend to get an interest rate about 3.25%−1.42%=1.83%3.25\% - 1.42\% = 1.83\% higher than source_only borrowers. ↩

  4. β4\beta_4 represents the change in interest rate we would expect if someone’s credit utilization was 0 and went to 1, all other factors held even. The point estimate is b4=4.90%b_4 = 4.90\%. ↩

  5. Many of the variables do take a value 0 for at least one data point, and for those variables, it is reasonable. However, one variable never takes a value of zero: term, which describes the length of the loan, in months. If term is set to zero, then the loan must be paid back immediately; the borrower must give the money back as soon as she receives it, which means it is not a real loan. Ultimately, the interpretation of the intercept in this setting is not insightful. ↩

  6. R2=1−18.5325.01=0.2591R^2 = 1 - \frac{18.53}{25.01} = 0.2591. ↩

  7. Radj2=1−18.5325.01×10000−11000−9−1=0.2584R_{adj}^2 = 1 - \frac{18.53}{25.01}\times \frac{10000-1}{1000-9-1} = 0.2584. While the difference is very small, it will be important when we fine tune the model in the next section. ↩

  8. The unadjusted R2R^2 would stay the same and the adjusted R2R^2 would go down. ↩

  9. Child Health and Development Studies, Baby weights data set. ↩

  10. W. N. Venables and B. D. Ripley. Modern Applied Statistics with S. Springer. Data can also be found in the R MASS package. 2002. ↩

  11. Hand, D.J. A handbook of small data sets. Chapman & Hall/CRC. 1994. ↩

Credit and licence

“9.1 Introduction to multiple regression” is from OpenIntro Statistics, Fourth Edition, by David M Diez, Mine Çetinkaya-Rundel and Christopher D Barr, shared under a CC BY-SA 3.0 license. WorldClass Statistics is a derivative of OpenIntro Statistics, shared under the same license; the original book may be found at openintro.org/book/os.

Source: https://www.openintro.org/book/os/

Licence: CC BY-SA 3.0 (creativecommons.org/licenses/by-sa/3.0/). You may share and adapt it under the same licence, with this credit. WorldClass adapted the formatting only: the text is the authors', with interactive parts and links to other sites left out.

Build status · Flash Infinity AI™ is a trademark of AI-Flash Inc.. WorldClass is not affiliated with, approved or accredited by any exam board, curriculum provider or university unless a page says so.