Skip to content

Commit fd7acf0

Browse files
committed
added "without seasonal and with fourier" method combinations for the dummies reports
1 parent 0e9ce60 commit fd7acf0

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

2hrs_ph3_report_generator.R

+44
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,50 @@ fifthOD.fit <- quote(
624624
)}
625625
)
626626

627+
report(model = paste0('Arima(order=c(1, 0, 0), seasonal=c(1, 0, 0), method="CSS", xreg=', paste0(deparse(fifthOD.fit), collapse='') ,')'),
628+
series = '2hrs ph3',
629+
transformation = 'identity()',
630+
traindays = 7,
631+
testdays = 3,
632+
xreg = paste0(deparse(fifthOD.fcast), collapse=''))
633+
634+
# dummies on the 5th obs (the "outlier") without seasonal terms, with Fourier ----
635+
636+
fifthOD.fcast <- quote(
637+
{cbind(
638+
dummies=getNthObsDummies(5, 1, h, frequency(.)),
639+
fourier(., h=h, K=2)
640+
)}
641+
)
642+
643+
fifthOD.fit <- quote(
644+
{cbind(
645+
dummies=getNthObsDummies(5, 1, length(.), frequency(.)),
646+
fourier(., K=2)
647+
)}
648+
)
649+
650+
report(model = paste0('Arima(order=c(1, 0, 0), method="CSS", xreg=', paste0(deparse(fifthOD.fit), collapse='') ,')'),
651+
series = '2hrs ph3',
652+
transformation = 'identity()',
653+
traindays = 7,
654+
testdays = 3,
655+
xreg = paste0(deparse(fifthOD.fcast), collapse=''))
656+
657+
# dummies on the 5-9th obs (the "outlier") with seasonal terms, without Fourier ----
658+
659+
fifthOD.fcast <- quote(
660+
{cbind(
661+
dummies=getNthObsDummies(5, 4, h, frequency(.))
662+
)}
663+
)
664+
665+
fifthOD.fit <- quote(
666+
{cbind(
667+
dummies=getNthObsDummies(5, 4, length(.), frequency(.))
668+
)}
669+
)
670+
627671
report(model = paste0('Arima(order=c(1, 0, 0), seasonal=c(1, 0, 0), method="CSS", xreg=', paste0(deparse(fifthOD.fit), collapse='') ,')'),
628672
series = '2hrs ph3',
629673
transformation = 'identity()',

arima_model.Rmd

+1
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ Time elapapsed for forecasting **`r params$testdays`**
297297
### Accuracy of the forecasts against the test data
298298
```{r accuracy, echo=FALSE}
299299
knitr::kable(accuracy(fcast, data$test))
300+
#knitr::kable(accuracy(fcast, data$test), format='latex')
300301
```
301302

302303
### Fitted values and forecasts plot against the real data

0 commit comments

Comments
 (0)