type
Post
Created date
Jun 16, 2022 01:21 PM
category
Data Science
tags
Applied forecasting
Economics
status
Published
Language
From
summary
slug
password
Author
Priority
Featured
Featured
Cover
Origin
Type
URL
Youtube
Youtube
icon
We have learnt ARIMA and regression previously, but both have their advantage and disadvantage.
For ARIMA, it is univariate which means that it can be only performed on a single time series. So, say, the effects of holidays, competitor activity, changes in the law, the wider economy, or other external variables, may explain some of the historical variations and may lead to more accurate forecasts.
For regression, allows for the inclusion of a lot of relevant information from predictor variables, but does not allow for the subtle time series dynamics that can be handled with ARIMA models.
Solution : ARIMA models with allowing other information to be included - ARIMAX
Regression with ARIMA errors
In Regression model (Time Series) (RTS). we learnt this formula where we assumed to be WN. Now, we want the to be autocorrelated.
You always write it in two equations:
The first equation is the regression part so that part looks the same; it is just that the epsilon is replaced by a eta. The second part is a separate ARIMA model for
So there is still a WN in our model, but in the second part.
Estimation
Plotting the residual of the error
fit <- us_change %>% model( ARIMA(Consumption ~ Income) ) gg_tsresiduals(fit) ## this one ================================== OR this one residuals(fit, type = "innovation") %>% gg_tsdisplay(.resid, plot_type = "partial") + ggtitle("ARIMA errors")
Plotting the residual of the error
residuals(fit, type = "regression") %>% gg_tsdisplay(.resid, plot_type = "partial") + ggtitle("Regression errors")
Forecasting using dynamic regression
## predict 11 periods ahead us_change_future <- new_data(us_change, 11) %>% mutate( ## take the max of income as a scenario Income = max(us_change$Income), Savings = mean(us_change$Savings), Unemployment = mean(us_change$Unemployment) ) forecast(fit, new_data = us_change_future) %>% autoplot(us_change) + labs( x = "Year", y = "Percentage change", title = "Forecasts from regression with ARIMA(4,0,4) errors" )
In summary, ARIMAX is
Stochastic & deterministic trends
Dynamic harmonic regression
Lagged predictors
FAQ
How do you write up the RegArima equation?
Math
- Author:Jason Siu
- URL:https://jason-siu.com/article%2F0afe9745-50d8-444b-a9e6-882d1335ccb6
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts