Multiple Linear Regression Analysis

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

25 Terms

1
New cards

Multiple regressions

Allows several independent variables to influence y (dependent variable)

Regression equation becomes

y=a+b1x1+b2x2+bkxk+ey=a+b_1x_1+b_2x_2+b_{k}x_{k}+e

Where the dependent variables are x1, x2 etc.

a = y-intercept

b1, b2 etc. are the regression coefficients - give the amount by which y hat changes when that particular xj increases by one unit with the values of all other independent variables held constant

2
New cards

Why use multiple regressions

Use of several variables isolates the individual effect of each variable

Enables use to hold other things equal/constant while we test for the variable of interest

3
New cards

Example of multiple regression line with variables

y=21.2+18.7x1−0.25x2y=21.2+18.7x_1-0.25x_2

Dependent variable Y = selling price pf a house (in thousands of pounds) x1 = number of rooms, x2 = age in years

Intercept = 21.2 - indicates the regression equation intersects the y-axis at 21.2

18.7x118.7x_1 tells us that for each extra room in a house its value will increase by £18.7k REGARDLESS of its age

−0.25x2-0.25x_2 tells us that for each increase of one year in age selling prices will decrease by £0.25k REGARDLESS of the number of rooms

4
New cards

Evaluating a multiple regression equation

Number of degrees of freedom in the regression (k) is now equal to the number of independent variables

Degrees of freedom in the error term is now (n-(k +1))

SSR, SSE and SSTotal all obtained in same way as simple regression was

5
New cards

Multiple standard error of estimate

Comes from sum of squared error residuals - the differences between the predicted and observed values

SSEn−(k+1)\sqrt{\frac{SSE}{n-\left(k+1\right)}}

6
New cards

Coefficient of multiple determination

R2 calculated in the same way, and has the same properties as in the simple regression case, except that it measures the percentage of variation in y explained by the WHOLE SET of independent variables

R2=SSRSSTotalR^2=\frac{SSR}{SSTotal}

7
New cards

Adjusted coefficient of determination

The R2 will tend to increase as more variables are added to the model, even when the new variables ISN’T a good predictor of the independent variable

To correct for this effect, we use new formula

Radj2=1−SSEn−(k+1)SSTotaln−1R_{adj}^2=1-\frac{\frac{SSE}{n-\left(k+1\right)}}{\frac{SSTotal}{n-1}}

8
New cards

Inference in multiple linear regression - Global test

We can test whether our findings are statistically robust in multiple regressions

Can do so globally - global test investigates whether it’s possible that all the independent variables have ZERO regression coefficients

Step 1: State null hypothesis(H0:β1=β2=β3=0)\left(H_0:\beta_1=\beta_2=\beta_3=0\right) and the alternative hypothesis (H1: At least one βi\beta_{i} is NOT equal to 0)

If we fail to reject the null, then data provides NO evidence any regression coefficient differs from 0 - none of the independent variables are statistically related to the dependent variable

If we DO reject the null we then use an F-test (F=SSRkSSE[n−(k+1)]F=\frac{\frac{SSR}{k}}{\frac{SSE}{\left\lbrack n-\left(k+1\right)\right\rbrack}})

then reject the null that all regression coefficients are zero when F > Fcritical


9
New cards

Inference in multiple linear regression - Individual coefficients

If we reject H0 in global test we THEN look at individual coefficients

If any of them is not statistically different from 0, that implies this variable is of no value in explaining the variation in y, and we can eliminate it from the regression equation

So we will test the null hypothesis that the coefficients are 0

So for each individual variable it will look like this:

H0:β1=0H_0:\beta_1=0

H0:β1≠0H_0:\beta_1\ne0 but just replaceβ1\beta_1 with β2\beta_2 etc.

Then at the 0.05 significance level using n - (k+1) find the t critical value

Then use t=bi−0se(bi)t=\frac{b_{i}-0}{se\left(b_{i}\right)} - where bib_{i} is the coefficient of the first/second etc. variable and se (bib_{i}) is the standard error

So if the t < tcritical value we reject H0 and the variable IS significant

If there is a variable that is NOT statistically significant we drop that variable from the regression equation and re-run it with the variables that ARE significant

So need to re-do the global test again - as there should be a lower k, so different F statistic - and then if reject null here go onto another individual coefficients test

Then for the variables left, if null hypothesis is rejected for them we can conclude those variables are useful and significant in influencing the dependent variable

10
New cards

Inference in multiple linear regression - with more variables e.g. 5

Say we have five independent variables and model passes global test

Next we test the coefficients individually and find three are significant and two are not

We should next drop ONLY ONE variable - the single independent variable with the smallest absolute t-value/largest p-value, and return the regression equation with the FOUR remaining variables

Conduct individual tests again - if there are still regression coefficients that are not significant, drop the variable with the smallest absolute t-value

So in summary we should delete ONLY ONE variable at a time - each time we delete a variable we need to rerun the regression equation and check the remaining variables

11
New cards

Assumptions of multiple regression - Overview

There is a linear relationship - relationship between the dependent variable and the independent variables follows a straight-line pattern

The variation in the residuals is the same for both large and small values of y hat

The residuals are normally distributed - (mean = 0)

The independent variables should not be correlated with each other

The residuals are independent - so successive observations of the dependent variable should not be correlated - BUT this is often violated when dealing with time-series data

12
New cards

Assumptions of multiple regression - Linear relationship

For multiple variables we need to look at each in turn - so always visualise the dependent variable plotted against all independent variables separately

Can look at residual plots as well - they display the residuals on the vertical axis against the predictable variable (y hat) on the horizontal axis - and if the plot shows a random distribution of positive and negative values across the entire range of the variable plotted on the x axis there is no reason to doubt the linearity assumption

Although if there is NOT a random distribution then we have reason to doubt the linear assumption and in this case we might try transformations e.g. log, square

13
New cards

Assumptions of multiple regression - Variation in residuals for large and small y hat values

Called homoscedasticity (variation around the regression equation is the same for all of the values of the independent variables) - constant variation in the residuals regardless of whether the predicted values are large or small - AND a violation of this assumption is called heteroscedasticity

E.g. using age as an independent variable to estimate income - we’d expect income to increase with age but we’d ALSO expect income variation to increase with age

14
New cards

Assumptions of multiple regression - Distribution of residuals

We’d like the residuals to follow a normal distribution centered around zero - to evaluate this we can organise the residuals into a frequency distribution and plot it with a histogram

Then if the plotted points are fair close to a straight line drawn from the lower left to upper right of the histogram graph the normal probability plot supports the assumption of normally distributed residuals

15
New cards

Assumptions of multiple regression - Multicollinearity

Multicollinearity exists when independent variables are correlated

In practice it’s nearly impossible to select variables that are completely unrelated but fortunately this doesn’t affect a regression equation’s ability to predict the dependent variable - general rule won’t include two variables if their correlation coefficient falls outside the interval [-0.70, 0.70]

However if there ARE two highly correlated independent variables there may be an unexpected result: a regression coefficient that should have a positive sign turns out to be negative or vice versa - essentially the independent variables are redundant in that they explain the same variation in the dependent variable

May also lead to wrong results in the hypothesis tests for the individual independent variables due to the instability of the standard error of estimate

We can detect multicollinearity if: an independent variable KNOWN to be an important predictor ends up having a regression coefficient that ISN’T significant, or when an independent variable is added or removed there is a drastic change in the values of the remaining regression coefficients


16
New cards

Variance inflation factor

VIF=11−Rj2VIF=\frac{1}{1-R^2_{j}}

where

Rj2R^2_{j} is the coefficient of determination of a regression where xj is the dependent variable

A VIF greater than 10 indicates a problem

17
New cards

Assumptions of multiple regression - Independent observations

Successive residuals should be independent - there shouldn’t be a pattern between them

Long runs of +ve/-ve residuals hint this condition may be violated - called autocorrelation - and often occurs in time series data e.g. periods of positive GDP growth tend to follow each other

A scatter plot showing possible autocorrelation would have a run of residuals above the mean, followed by another run below the mean

18
New cards

Dummy variable

A variable in which there are only two possible outcomes - for analysis one of the outcomes is coded a 1 and the other a 0

We use these when we want to take into consideration QUALITATIVE independent variables e.g. sex and race - useful to evaluate discrimination claims

E.g. imagine we want to compare two exactly identical houses next to each other - one with a garage and the other without - you would assign with a garage the number 1 and without a garage the number 0 - and then calculate the regression line with the other values of the variables as well

(Although there can be qualitative variables that have MORE than two possible outcomes e.g. if a company incl. qualitative info regarding the quarter then for variable x2 1 = if sales were incurred in the first quarter and 0 otherwise, then for variable x3 1 = if sales were incurred in the second quarter and 0 otherwise and the same for x4 but you should stop there, as you always use one fewer variable than the number of possible states

19
New cards

Dummy variable - Hypothesis test

Test in the usual way:

H0:β4=0H_0:\beta_4=0
H1:β4≠0H_1:\beta_4\ne0

or whatever number - may not be 4 (depends on amount of variables)

Calculate t-statistic

t=b4se(b4)t=\frac{b_4}{se\left(b_4\right)} and if greater than the tcritical then we can reject the null that the regression coefficient is 0 and conclude there is a statistically significant relationship and the dummy variable SHOULD be included in the analysis

20
New cards

Regression models with interaction

Examine interaction as a separate independent variable

Obtain interaction variable by multiplying the values of the two independent variables whose interaction we want to test, thereby creating a new independent variable

So formula would be

Y=α+β1X1+β2X2+β3X1X2Y=\alpha+\beta_1X_1+\beta_2X_2+\beta_3X_1X_2

Then develop a regression equation using the three independent variables and test the significance of the third independent variable using the t-test

H0:β1⋅2=0H_0:\beta_{1\cdot2}=0

H1:β1⋅2≠0H_1:\beta_{1\cdot2}\ne0

With n - (k +1) degrees of freedom

Find critical t value

Then use t-statistic formula

t=b1⋅2se(b1⋅2)t=\frac{b_{1\cdot2}}{se\left(b_{1\cdot2}\right)} → (1.2 = 1 × 2)

Then if this t-statistic is greater than tcritical value we reject the null and conclude there is a significant interaction effect

21
New cards

Stepwise regression - overview

This technique can help speed up the process of deciding the set of independent variables to include in a regression equation

It efficiently builds an equation that only includes independent variables with significant regression coefficients

Step-by-step method to determine a regression equation that begins with a single independent variable and adds or deletes independent variables one by one.

Only independent variables with NONZERO regression coefficients are included in the final regression equation

Also called forward selection method because we begin with no independent variables and add one independent variable to the regression equation at each iteration

22
New cards

Stepwise regression - advantages

Only independent variables with significant regression coefficients are entered into the equation

The steps involved in building the regression equation are clear

It is efficient in finding the regression equation with only significant regression coefficients

The changes in the multiple standard error of estimate and the coefficient of determination are shown

23
New cards

Backward elimination method

Like stepwise regression - but begins with the entire set of variables and eliminates one independent variable at each iteration

24
New cards

Best-subset regression

We look at the best model using one independent variable, the best model using two independent variables and so on

The criterion is to find the model with the largest R2-value, regardless of the number of independent variables - each independent variable doesn’t necessarily have a nonzero regression coefficient.

Since each independent variable could either be included or not included there are 2k - 1 possible models, where k = number of independent variables

25
New cards

Final review of multiple regression

  1. Calculate correlation matrix for all the independent variables with the dependent variable

  2. Then run the regression with all candidate independent variables

  3. Then conduct the join significance test (H0:β1\beta_1 =β2\beta_2 etc.), (H1: At least one βi\beta_{i} is not equal to 0

  4. Then decide if we reject null hypothesis. If we DO reject we conclude at least one of the betas is NOT 0

  5. Then we evaluate the coefficients individually - then look for highest p-value (higher than 0.05) - as this shows the regression coefficient is NOT significantly different from 0 - so remove that variable

  6. R2 and adjusted R2 should change - then look for the next highest p-value, and remove this variable - as it is clearly not statistically significant

  7. Then continue doing this until ALL p-values are LESS than 0.05, and thus each remaining independent variables IS a useful predictor of family income

  8. Final step is to very whether the regression assumptions hold in our model and data

e.g. check if there is a linear relationship between each independent and dependent variable (use scatterplot - if points appear linear/scatterplot of residuals - there should be an equal proportion of -ve and +ve residuals centred on zero)

Then check histogram - to make sure it corresponds to a normal distribution

Then carry out a regression analysis for each independent variable as a function of the other independent variables - we need R2 to compute the VIF - and if all of them are less than 10 multicollinearity is not a concern

  1. Write out final regression equation and R2 value tells us the % the equation explains of the variation of the dependent variable.