Description Usage Arguments Value Author(s) Examples
Take fitted ARIMA model and perform adequacy checks.
It runs Ljung-Box test with residuals for various lags and print out the test result to the console.
If plot
is TRUE, it also plots the test result.
1 2 3 4 5 6 |
fit |
Fitted ARIMA model( |
alpha |
The probability of type 1 error for normality tests. (default = 0.05) |
lag.max |
Maximum length of lag to be tested. (default = |
plot |
If |
A list containing the following elements:
ljung.box | A list of all test results(htest objects). |
plot | ggplot object of the plot. (Returned only if plot is TRUE.) |
Sanghyun Park, Daun Jeong, and Sehun Kim
1 2 3 4 5 6 7 8 9 | # 228 is the station code for SNU
data <- get.subway(228)
# Fit SARIMA model with total on and off passenger counts
SNU.total <- ts(data$total, frequency = 7)
SNU.fit <- auto.arima(SNU.total)
# Normality check
adequacy.test(SNU.fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.