# Breusch-Pagan Test using R [duplicate]

I'm currently working on the Breusch-Pagan Test using RStudio through the command ncvTest. I've used the dataset pipeline.txt in the alr3 package; the model I've fit is:

mod1 <- lm(Lab~Field)


I've also done the residual plot to look at the shape of residuals to have information about the variance and I've obtained that there should be some trace of non constant variance. To sustain this assumption, I've performed the ncvTest and these are my results:

 ncvTest(mod1)
Non-constant Variance Score Test
Variance formula: ~ fitted.values
Chisquare = 29.58568    Df = 1     p = 5.349868e-08


My question is: how do I read these results?

## 1 Answer

The help page for the ncvTest says that the function

[C]omputes a score test of the hypothesis of constant error variance against the alternative that the error variance changes with the level of the response (fitted values), or with a linear combination of predictors.

You got a very small p-value which indicates a rejection of the null hypothesis at any conventional significance level. Thus you have support for your guess of non-constant variance.