autoplot(gold)
ggAcf(gold)
From autoplot, it is apparent that the trend is generally increasing until the peak but goes downward after the peak. From ACF plot, the trend is increasing until lag 22 and after that, it decreases after all. Slight āscallopedā shape, especially between lag 5 and 10, indicates the possibility of moderate seasonality. The spike appears between time = 750 to time = 780.
autoplot(woolyrnq)
ggAcf(woolyrnq)
A moderate downward trend is seen from the autoplot. Not only that, a moderate seasonality can be seen from slight āUā shape that happens almost every 4 lags from ACF plot and this behavior can be described as mild cyclic behavior.
autoplot(gas)
ggAcf(gas, lag = 80)
Increasing trend is seen from the autoplot as slope is going upward. Moderate āUā shape is seen pretty much every 12 lags according to ACF plot which indicates strong seasonality. Also notice that the increasing trend becomes much stronger after 1970 as gas production soars dramatically afterall.
frequency(gold)
## [1] 1
frequency(woolyrnq)
## [1] 4
frequency(gas)
## [1] 12
gold = 1 indicates that interval is daily (it can be yearly depending on how data is structured but in this case, it is setup as daily), woolyrng = 4 indicates that interval is quarterly and gas = 12 indicates that interval is monthly.
which.max(gold)
## [1] 770
The outlier occured at time = 770 (huge spike) as it was shown in a).
retaildata <- readxl::read_excel("C:/Users/ahwang/Desktop/Cuny/DATA624/retail.xlsx", skip=1)
myts <- ts(retaildata[,"A3349873A"],
frequency=12, start=c(1982,4))
autoplot(myts)
Trend: Increasing trend is seen.
Seasonality: It looks like spike appears approximately every year indicating seasonality
Cyclicity: There is not much evidence of cyclical behavior as strong seasonality is seen pretty much every year.
ggseasonplot(myts)
Trend: Increasing trend is seen as myts is becoming larger every year for the same month.
Seasonality: There are large jumps of myts in December every year. Starting 2011, however, there are larger jumps of myts in November than in December every year.
Cyclicity: There is not much evidence of cyclical behavior as strong seasonality is seen.
ggsubseriesplot(myts)
Trend: Increasing
Seasonality: mean of myts for Dec is much higher than other months. The mean for Nov is also very high due to the fact there are larger jumps starting 2011.
Cyclicity: There is no evidence of such behavior.
gglagplot(myts)
Trend: Increasing
Seasonality: The relationship is strongly positive at lag 12, reflecting the strong seasonality in the data as we observed from previous plots. (spike every year)
Cyclicity: There is no evidence of such behavior.
ggAcf(myts)
Trend: Increasing as ACFs are all positive.
Seasonality: āUā shaped is seen every 12 lags indicating pretty strong seasonality.
Cyclicity: There is no evidence of such behavior.