Skip to main content
replaced http://stats.stackexchange.com/ with https://stats.stackexchange.com/
Source Link

Using R on some data and trying to see whether or not my data is heteroscedastic, I've found two implementations of the Breusch-Pagan test, bptest (package lmtest) and ncvTest (package car). However, these produce different results. What is the difference between the two? When should you choose to use one or the other?

> model <- lm(y ~ x)
> bp <- bptest(model)
> bp
studentized Breusch-Pagan test

data:  model 
BP = 3.3596, df = 1, p-value = 0.06681

> ncvTest(model)
Non-constant Variance Score Test 
Variance formula: ~ fitted.values 
Chisquare = 3.858704    Df = 1     p = 0.04948855 

These example shows that according to the tests, my data is in one case heteroscedastic and in the other case homoscedastic. I did find this question herethis question here so bptest might be studentized and ncvTest might not be, however, what does this mean then?

Using R on some data and trying to see whether or not my data is heteroscedastic, I've found two implementations of the Breusch-Pagan test, bptest (package lmtest) and ncvTest (package car). However, these produce different results. What is the difference between the two? When should you choose to use one or the other?

> model <- lm(y ~ x)
> bp <- bptest(model)
> bp
studentized Breusch-Pagan test

data:  model 
BP = 3.3596, df = 1, p-value = 0.06681

> ncvTest(model)
Non-constant Variance Score Test 
Variance formula: ~ fitted.values 
Chisquare = 3.858704    Df = 1     p = 0.04948855 

These example shows that according to the tests, my data is in one case heteroscedastic and in the other case homoscedastic. I did find this question here so bptest might be studentized and ncvTest might not be, however, what does this mean then?

Using R on some data and trying to see whether or not my data is heteroscedastic, I've found two implementations of the Breusch-Pagan test, bptest (package lmtest) and ncvTest (package car). However, these produce different results. What is the difference between the two? When should you choose to use one or the other?

> model <- lm(y ~ x)
> bp <- bptest(model)
> bp
studentized Breusch-Pagan test

data:  model 
BP = 3.3596, df = 1, p-value = 0.06681

> ncvTest(model)
Non-constant Variance Score Test 
Variance formula: ~ fitted.values 
Chisquare = 3.858704    Df = 1     p = 0.04948855 

These example shows that according to the tests, my data is in one case heteroscedastic and in the other case homoscedastic. I did find this question here so bptest might be studentized and ncvTest might not be, however, what does this mean then?

Tweeted twitter.com/StackStats/status/693400399907266560
Source Link
Mien
  • 739
  • 4
  • 9
  • 18

What is the difference between these two Breusch-Pagan Tests?

Using R on some data and trying to see whether or not my data is heteroscedastic, I've found two implementations of the Breusch-Pagan test, bptest (package lmtest) and ncvTest (package car). However, these produce different results. What is the difference between the two? When should you choose to use one or the other?

> model <- lm(y ~ x)
> bp <- bptest(model)
> bp
studentized Breusch-Pagan test

data:  model 
BP = 3.3596, df = 1, p-value = 0.06681

> ncvTest(model)
Non-constant Variance Score Test 
Variance formula: ~ fitted.values 
Chisquare = 3.858704    Df = 1     p = 0.04948855 

These example shows that according to the tests, my data is in one case heteroscedastic and in the other case homoscedastic. I did find this question here so bptest might be studentized and ncvTest might not be, however, what does this mean then?