I've been working on my master thesis, and I've been using R to test heteroskedasticity with Breusch-Pagan test. The code is rather simple:
model_1 <- lm(GERD_HRQL~Dob, data=myresearch)
bptest(model1)
model_2 <- lm(Dob~GERD_HRQL, data=myresearch)
bptest(model2)
And the results are, respectively:
model_1: BP = 0.52928, df = 1, p-value = 0.4669
model_2: BP = 4.6722, df = 1, p-value = 0.03065
And this really surprised me, because I thought that for a Pearson correlation with one dependent variable and one independent variable, the order in which one defines the variables should not affect the results of the Breusch-Pagan test for heteroscedasticity.
Could somebody please explain why those results differ? I don't know which value to report. If there is heteroscedasticity when I calculate a Pearson correlation, I would use a wild bootstrap method.
Thank you!
plot(model_x)
) in the question (if possible)? It might also be helpful to read the description of?bptest
in R. $\endgroup$