tests/test_cipstest.R

## run tests for cipstest()
library(plm)
data("Produc", package = "plm")
Produc <- pdata.frame(Produc, index=c("state", "year"))

##IGNORE_RDIFF_BEGIN

# truncated = FALSE (default)
cipstest(Produc$gsp, type = "trend", model = "cmg")
cipstest(Produc$gsp, type = "drift", model = "cmg")
cipstest(Produc$gsp, type = "none",  model = "cmg")

cipstest(Produc$gsp, type = "trend", model = "mg")
cipstest(Produc$gsp, type = "drift", model = "mg")
cipstest(Produc$gsp, type = "none",  model = "mg")

cipstest(Produc$gsp, type = "trend", model = "dmg")
cipstest(Produc$gsp, type = "drift", model = "dmg")
cipstest(Produc$gsp, type = "none",  model = "dmg")

# truncated = TRUE
cipstest(Produc$gsp, type = "trend", model = "cmg", truncated = TRUE)
cipstest(Produc$gsp, type = "drift", model = "cmg", truncated = TRUE)
cipstest(Produc$gsp, type = "none",  model = "cmg", truncated = TRUE)

cipstest(Produc$gsp, type = "trend", model = "mg", truncated = TRUE)
cipstest(Produc$gsp, type = "drift", model = "mg", truncated = TRUE)
cipstest(Produc$gsp, type = "none",  model = "mg", truncated = TRUE)

cipstest(Produc$gsp, type = "trend", model = "dmg", truncated = TRUE)
cipstest(Produc$gsp, type = "drift", model = "dmg", truncated = TRUE)
cipstest(Produc$gsp, type = "none",  model = "dmg", truncated = TRUE)

##IGNORE_RDIFF_END

Try the plm package in your browser

Any scripts or data that you put into this service are public.

plm documentation built on Sept. 21, 2021, 3:01 p.m.