Description Usage Arguments Value Author(s) Examples
Take fitted ARIMA model and perform normality checks.
It runs three well-known normality test, Shapiro-Wilk test, Jarque-Bera test, and Kolmogorov-Smirnov test
and prints out the result to the console.
If plot
is TRUE, it also plots Q-Q plot of residuals and estimated density of residual for visual check.
1 | normal.test(fit, alpha = 0.05, plot = TRUE)
|
fit |
Fitted ARIMA model( |
alpha |
The probability of type 1 error for normality tests. (default = 0.05) |
plot |
If |
A list containing the following elements:
shapiro.wilk | The test result of Shapiro-Wilk test(htest objects). |
jarque.bera | The test result of Jarque-Bera test(htest objects). |
komogorov.smirnov | The test result of Kolmogorov-Smirnov test(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
normal.test(SNU.fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.