问题
I'm investigating the effect of FDI on Freedom and want to apply the Granger Causality Test in panel context.
I use the "pgrangertest" from the plm
package, which includes the heterogeneity of the observations. The problem is that it gives me the following output:
Error in waldtest.lm(fm, 2, ...) : there are aliased coefficients in the model
In other words, multicollinearity is the problem. The alias test, as well as the VIF test (shows 1), confirm this assumption.
BUT: It tells me that all of my variables, all countries, and all subsets are multicollinear, which is definitely not the case.
I tried different things: I omitted all NAs (are many because country data), exchanged the variables of the test. Further, I ran a regression (lm and plm) and this worked without getting signs of multicollinearity (the regression output shows values).
Model 1: Granger Causality Test for heterogenous Panel Data (see Dumitrescu/ Hurlin 2012)
load("df_main.Rda")
command:
pd_grang <- pdata.frame(df_grang, index=c("country","year"))
pgrangertest(FH~logUN_FDI_Stock_gdp, pd_grang)
Error in waldtest.lm(fm, 2, ...) :
there are aliased coefficients in the model
I tried several data manipulation techniques (omit, delete countries with few obs, etc.)
df_grang <- df_main[c(2,3,15,35)]
df_grang <- na.omit(df_grang)
df_grang <- df_grang[df_grang$country!="Suriname", ]
df_grang <- df_grang[df_grang$logUN_FDI_Stock_gdp!=0, ]
df_grang <- df_grang[df_grang$year>=1980, ]
pd_grang <- pdata.frame(df_grang, index=c("country","year"))
pgrangertest(FH~logUN_FDI_Stock_gdp, pd_grang)
I get this Error:
Error in waldtest.lm(fm, 2, ...) : there are aliased coefficients in the model
I know from my previous research that there is no multicollinearity to be expected. I assume something went wrong in the data manipulation or originates in the panel granger test itself.
来源:https://stackoverflow.com/questions/56665873/problems-with-multicollinearity-in-panel-granger-causality-test