data("Grunfeld", package = "plm")
# formula interface
pbltest(inv ~ value + capital, data = Grunfeld)
# plm interface
re_mod <- plm(inv ~ value + capital, data = Grunfeld, model = "random")
pbltest(re_mod)
pbltest(re_mod, alternative = "onesided")
Run the code above in your browser using DataLab