1

I want to conduct unit root test for my unbalanced multi-variate panel data. I use only R studio. I saw many helpful posts on Stata and EViews but I am seeking solutions for RStudio only, please. I searched on the internet how to conduct the test but I haven't been able to find a successful solution.

I saw that for purtest(..., test="hadri") (of package plm) and others are not suitable for unbalanced panel data. In one of the posts, I saw that the Fisher-type test is applicable to the unbalanced test but I'm not sure how to write codes for the Fisher-type unit root test. I also saw posts on how to balance panel data from unbalanced ones to carry out tests but in my case, I don't think that's what I need.

Any code examples would be appreciated.

Helix123
  • 3,502
  • 2
  • 16
  • 36
NK70
  • 11
  • 2

1 Answers1

0

The help for function purtest of package plm lists the Fisher-style tests (there is no one such test but several) and gives an example how the test is performed:

Several Fisher-type tests that combine p-values from tests based on ADF regressions per individual are available:

"madwu" is the inverse chi-squared test Maddala and Wu (1999), also called P test by Choi (2001).

"Pm" is the modified P test proposed by Choi (2001) for large N,

"invnormal" is the inverse normal test by Choi (2001), and

"logit" is the logit test by Choi (2001).

The specific test is requested by argument test to purtest, e.g. test = "madwu".

Here is an example with an unbalanced data set.

library("plm")
data("Grunfeld", package = "plm")
# data Grunfeld is balanced but we make it unbalanced by dropping
# the last 5 observations in the next step when converting to a pdata.frame
pGrunfeld_unbal <- pdata.frame(Grunfeld[-c(195:200), ], index = c("firm", "year"))

purtest(pGrunfeld_unbal$inv, pmax = 4, exo = "intercept", test = "madwu")

##  Maddala-Wu Unit-Root Test (ex. var.: Individual Intercepts)
##
##  data:  pGrunfeld_unbal$inv
##  chisq = 18.384, df = 20, p-value = 0.5621
##  alternative hypothesis: stationarity
Helix123
  • 3,502
  • 2
  • 16
  • 36