set.seed(123)
ts <- rnorm(100)
ahat <- list(acf=c() ,pacf=c())
ahat$acf <- acf(ts, lag.max = 19, plot = FALSE)$acf[,,1]
ahat$pacf <- pacf(ts, lag.max = 19, plot = FALSE)$acf[,,1]
a1 <- 0.025
a2 <- 0.975
boot <- 100
lgmx <- 20
Sug_dm(ahat, ts, a1, a2, boot, lgmx)
Run the code above in your browser using DataLab