if (FALSE) {
data(Nile)
nile <- isat(Nile, sis=FALSE, iis=TRUE, plot=TRUE, t.pval=0.01)
distorttest(nile)
# bootstrap (with nboot = 5 to save time. Higher replications are recommended)
distorttestboot(nile, nboot = 5)
data("hpdata")
# Another example with co-variates
dat <- hpdata[,c("GD", "GNPQ", "FSDJ")]
Y <- ts(dat$GD,start = 1959, frequency = 4)
mxreg <- ts(dat[,c("GNPQ","FSDJ")],start = 1959, frequency = 4)
m1 <- isat(y = Y, mc = TRUE, sis = FALSE, iis = TRUE)
m2 <- isat(y = Y, mc = TRUE, sis = FALSE, iis = TRUE, ar = 1)
m3 <- isat(y = Y, mxreg = mxreg, mc = TRUE, sis = FALSE, iis = TRUE)
m4 <- isat(y = Y, mxreg = mxreg, mc = TRUE, sis = FALSE, iis = TRUE, ar = 1, t.pval = 0.01)
distorttest(m1, coef = "all")
distorttest(m2, coef = "all")
distorttest(m3, coef = "GNPQ")
distorttest(m4, coef = c("ar1", "FSDJ"))
# bootstrap (with nboot = 5 to save time. Higher replications are recommended)
distorttestboot(m1, nboot = 5)
distorttestboot(m2, nboot = 5)
distorttestboot(m3, nboot = 5)
distorttestboot(m4, nboot = 5)
distorttestboot(m4, nboot = 5, parametric = TRUE, scale.t.pval = 0.5)
}
Run the code above in your browser using DataLab