Reputation: 41
I am trying to apply the second generation panel unit root tests (CIPS test) using function cipstest()
of package plm
in R.
I am getting this error:
Error in approx(nintv, cvals[nintl:ninth, tintl, i], n = max(nintv) - : need at least two non-NA values to interpolate.
There are no missing values in my data. Could you help me with this subject?
library("plm")
df1 <- pdata.frame(df, index = c("country", "year"), drop.index = TRUE)
cipstest(df1$AVA, lags = 2, type = "trend")
Upvotes: 1
Views: 234
Reputation: 1
Came across the same error and found the reason for my case: The number of units N in a cross-section must be >=10. I now use a panel of N = 15 countries with T = 25 observations each. Before that I used 8 countries and that didn´t work.
I don´t know the reason for that, I suspect it has something to do with the tabulation of critical values starting at N = 10 in the original paper: (A simple panel unit root test in the presence of cross-section dependence, Pesaran, 2007)
Upvotes: 0