Help with bptest in Rstudio

0

I am applying the bptest to see the heteroscedasticity of a linear regression which is this

fit4 <- lm(datos$promedio_total ~ datos$hv + datos$Municipal+ datos$P_Pagado + datos$desempeño_medio +datos$desempeño_alto +datos$desempeño_insuficiente + datos$cod_rural_rbd)

Where the total average is the average of a test, Municipal - Private Paid are classifications of establishments, performances are how schools are categorized and cod_rural is a dummy variable 1 if it is a rural school and 0 if it is urban.

When doing the bptest, the following is delivered

Does anyone know what BP means 110.7 and df 7? In advance, thank you very much!

    
asked by Mathias Weithofer Albornoz 10.04.2018 в 20:06
source

1 answer

0

In statistics, the Breusch-Pagan test is used to determine heteroscedasticity in a linear regression model. Analyze if the estimated variance of the residuals of a regression depends on the values of the independent variables. Assuming the model: y = Xβ + e, in matrix form. So what you want to contrast is the hypotheses. H0: Homocedasicity (that is, the variance of the residuals is constant) vs H1: Heteroscedasticity.

Then, as the statistician is a χ² in this case with 7 degrees of freedom and the statistic obtained is BP = 110. 7, we have to reject H0, depending on the p-value obtained, and have problems of Heteroskedasticity .

valor.p = pchisq(110.7,7,lower.tail = F)
ifelse(valor.p < 0.05, "Rechazo H0: Homocedasticidad", "No rechazo H0: Heterocedasticidad")
[1] "Rechazo H0: Homocedasticidad"
    
answered by 20.05.2018 в 21:48