data("Grunfeld",package="Ecdat")
g <- plm(inv ~ value + capital, data = Grunfeld, model = "random")
pbgtest(g)
pbgtest(g, order = 4)
## formula interface
pbgtest(inv ~ value + capital, data = Grunfeld, model = "random")
Run the code above in your browser using DataLab