Description Usage Arguments Details Value Author(s) References See Also Examples

Computes 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.

1 2 3 4 5 6 7 |

`model` |
a weighted or unweighted linear model, produced by |

`var.formula` |
a one-sided formula for the error variance; if omitted, the error variance depends on the fitted values. |

`...` |
arguments passed down to methods functions; not currently used. |

This test is often called the Breusch-Pagan test; it was independently suggested with some extension by Cook and Weisberg (1983).

`ncvTest.glm`

is a dummy function to generate an error when a `glm`

model is used.

The function returns a `chisqTest`

object, which is usually just printed.

John Fox [email protected], Sandy Weisberg [email protected]

Breusch, T. S. and Pagan, A. R. (1979)
A simple test for heteroscedasticity and random coefficient variation.
*Econometrica* **47**, 1287–1294.

Cook, R. D. and Weisberg, S. (1983)
Diagnostics for heteroscedasticity in regression.
*Biometrika* **70**, 1–10.

Fox, J. (2016)
*Applied Regression Analysis and Generalized Linear Models*,
Third Edition. Sage.

Fox, J. and Weisberg, S. (2019)
*An R Companion to Applied Regression*, Third Edition, Sage.

Weisberg, S. (2014) *Applied Linear Regression*, Fourth Edition, Wiley.

1 2 3 4 |

```
Non-constant Variance Score Test
Variance formula: ~ fitted.values
Chisquare = 46.98537 Df = 1 p = 7.151848e-12
Non-constant Variance Score Test
Variance formula: ~ assets + sector + nation
Chisquare = 74.73535 Df = 13 p = 1.066321e-10
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.