How to Perform a Breusch-Pagan Test in SPSS


A Breusch-Pagan Test is used to determine if heteroscedasticity is present in a regression model.

The following step-by-step example shows how to perform a Breusch-Pagan Test in SPSS.

Step 1: Enter the Data

Suppose we want to fit a multiple linear regression model that uses number of hours spent studying and number of prep exams taken to predict the final exam score of students:

Exam Score = β0 + β1(hours) +β2(prep exams)

First, we’ll enter the following dataset into SPSS that contains this information for 20 students:

Step 2: Fit the Regression Model

Next, we will fit the multiple linear regression model.

To do so, click the Analyze tab, then click Regression, then click Linear:

In the new window that appears, drag score to the Dependent panel, then drag hours and prep_exams to the Independent panel:

Then click the Save button.

Then check the box next to Unstandardized under Predicted Values and check the box next to Unstandardized under Residuals:

Then click Continue. Then click OK.

A multiple linear regression model will be fit and both the predicted values (PRE_1) for each observation and the residuals (RES_1) will be shown in two new columns in the Data View window:

Step 3: Perform the Breusch Pagan Test

To determine if heteroscedasticity is a problem in this regression model, we will perform a Breusch-Pagan test.

Before we perform the test, we need to first create a new column that contains the squared residuals.

To do so, click the Transform tab and then click Compute Variable:

In the new window that appears, type res_squared as the Target Variable name and then type the formula RES_1*RES_1 in the Numeric Expression box:

Then click OK.

The following new variable will created named res_squared that contains the squared values from the residual column:

Next, click Analyze, then Regression, then Linear once again.

Then drag res_squared into the Independent panel and keep hours and prep_exams in the Dependent box:

Then click OK.

The following output will appear:

The p-value for the Breusch-Pagan test will be shown under the Sig column of the ANOVA table.

We can see that the p-value is .085.

Since the p-value is not less than 0.05, we fail to reject the null hypothesis of the test.

This means we do not have sufficient evidence to say that heteroscedasticity is present in the regression model.

Thus, it’s safe to interpret the standard errors of the coefficient estimates in the regression summary table.

What To Do Next

If you fail to reject the null hypothesis of the Breusch-Pagan test, then heteroscedasticity is not present and you can proceed to interpret the output of the original regression.

However, if you reject the null hypothesis, this means heteroscedasticity is present in the data. In this case, the standard errors that are shown in the output table of the regression may be unreliable.

There are a couple common ways that you can fix this issue, including:

1. Transform the response variable.

You can try performing a transformation on the response variable.

For example, you could use the log of the response variable instead of the original response variable. Typically taking the log of the response variable is an effective way of making heteroscedasticity go away.

Another common transformation is to use the square root of the response variable.

2. Use weighted regression.

This type of regression assigns a weight to each data point based on the variance of its fitted value.

This gives small weights to data points that have higher variances, which shrinks their squared residuals. When the proper weights are used, this can eliminate the problem of heteroscedasticity.

2 Replies to “How to Perform a Breusch-Pagan Test in SPSS”

  1. Thank you for this explanation. Why do we save the unstandardized predicted values? I don’t see they were used again. Thank you

    1. Hi Stefany…In performing a Breusch-Pagan test in SPSS to check for heteroscedasticity, the unstandardized predicted values are saved as an intermediate step for calculating the residuals. While it may not be immediately obvious, these predicted values are essential for the subsequent steps of the test. Here’s a detailed breakdown of the process and the rationale behind saving these values:

      ### Steps in Performing the Breusch-Pagan Test in SPSS

      1. **Run the Regression**:
      – Perform the initial regression analysis to obtain the unstandardized predicted values and residuals.
      – Save the unstandardized predicted values and residuals during this regression.

      2. **Calculate Squared Residuals**:
      – Compute the squared residuals from the saved residuals.

      3. **Run an Auxiliary Regression**:
      – Regress the squared residuals on the unstandardized predicted values and/or other independent variables.

      ### Rationale for Saving Unstandardized Predicted Values

      1. **Intermediate Calculations**:
      – The unstandardized predicted values are necessary for the auxiliary regression where the squared residuals are regressed on these predicted values and/or other independent variables. This step helps determine if the variance of the residuals (i.e., heteroscedasticity) is related to the predicted values.

      2. **Consistency in SPSS Procedures**:
      – Saving these values ensures that you can reference them in subsequent computations. In SPSS, explicitly saving these intermediate steps (predicted values and residuals) makes it easier to manage and use them in further analyses without having to rerun initial regressions or manually extract values from output tables.

      ### Detailed Steps to Perform Breusch-Pagan Test in SPSS

      1. **Run Initial Regression**:
      – Analyze > Regression > Linear.
      – Enter your dependent variable and independent variables.
      – Save > Predicted Values > Unstandardized and Residuals > Unstandardized.
      – Run the regression.

      2. **Compute Squared Residuals**:
      – Transform > Compute Variable.
      – Create a new variable for squared residuals: `resid_squared = RES_1 * RES_1` (assuming `RES_1` is the variable name for saved residuals).

      3. **Run Auxiliary Regression**:
      – Analyze > Regression > Linear.
      – Use the squared residuals (`resid_squared`) as the dependent variable.
      – Use the unstandardized predicted values (`PRE_1`) and/or other independent variables from the original regression as independent variables.
      – Run the regression and save the output.

      4. **Examine Output**:
      – Look at the R-squared value from this auxiliary regression.
      – Calculate the Breusch-Pagan test statistic: \( n \times R^2 \) (where `n` is the sample size).
      – Compare this test statistic to the chi-square distribution with degrees of freedom equal to the number of predictors in the auxiliary regression.

      ### Summary

      While it may appear that the unstandardized predicted values are not directly used after being saved, they are indeed crucial for the auxiliary regression step of the Breusch-Pagan test. This step tests the relationship between the squared residuals and the predicted values, which is central to diagnosing heteroscedasticity. Saving these values facilitates a smooth workflow in SPSS, allowing for accurate and efficient execution of the test.

Leave a Reply

Your email address will not be published. Required fields are marked *