I'm having a problem with with the pFtest()
function from the plm
package.
I'm using the following three tests (see code below). However, if you look at the output you will see that for the pFtest I get a p-value = NA. I guess this is due to the fact that df1 = 0
and F-value = -Inf
but I don't know why this is the case. Can this happen normally or do I maybe have a problem with my data?
My dataset is quite big but and I used index=c("CountryName","Dates")
in the plm commands and the regressions worked fine. I only had an issue with the random effects regression where I had to use random.method="nerlove"
manually because the other methods didn't work. Dates are in date format and data is daily in case this matters.
Input code:
# LM Test for random effects vs OLS
plmtest(SevFX_Pooling_Stringency)
# F Test for fixed effects vs OLS
pFtest(SevFX_Within_Stringency,SevFX_Pooling_Stringency)
# Hausmann Test
phtest(SevFX_Random_Stringency, SevFX_Within_Stringency)
Output:
> # LM Test for random effects vs OLS
> plmtest(SevFX_Pooling_Stringency)
Lagrange Multiplier Test - (Honda) for unbalanced panels
data: StringencyIndex ~ gap_potgdp + CasesPerKPop + DeathsPerKPop + CountryName
normal = -3.678, p-value = 0.9999
alternative hypothesis: significant effects
> # F Test for fixed effects vs OLS
> pFtest(SevFX_Within_Stringency,SevFX_Pooling_Stringency)
F test for individual effects
data: StringencyIndex ~ gap_potgdp + CasesPerKPop + DeathsPerKPop + CountryName
F = -Inf, df1 = 0, df2 = 12982, p-value = NA
alternative hypothesis: significant effects
> # Hausmann Test
> phtest(SevFX_Random_Stringency, SevFX_Within_Stringency)
Hausman Test
data: StringencyIndex ~ gap_potgdp + CasesPerKPop + DeathsPerKPop + CountryName
chisq = 2.9904e-11, df = 2, p-value = 1
alternative hypothesis: one model is inconsistent