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
ARIMA models are based on the autocorrelation in the data. It composes 3 parts: AR-I-MA.
- AR: Autoregressive models
- I: Stationarity and unit root
- MA: Moving average models
(Integrated part) Stationarity and differencing
A stationary time series is the one whose properties DO NOT depend on the time.
- If a time series has a trend or seasonality, it is nonstationary.
- A white noise series is stationary.
To apply ARIMA models, our time series should be stationary to begin with.
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F8c51d93f-328f-4eff-bb40-718d6cd19a6c%2FUntitled.png%3Ftable%3Dblock%26id%3D9891bc89-d571-48f1-a2f9-45ed282fb719%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DLTLtzTZZYhcfkU9uWUJLIbTT7X6FHMp9veITuuMNEe4?table=block&id=9891bc89-d571-48f1-a2f9-45ed282fb719&cache=v2)
Here is what it looks like :
- Roughly horizontal
- Constant variance
- (Like some mean between two patterns in a series)
- No patterns predictable in the long-term
- (Can use Histogram to check the distribution. If same, this is stationary.)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2Fd500df07-61f0-4b23-a748-369de85034c5%2FUntitled.png%3Ftable%3Dblock%26id%3D65f821b2-27d1-4a0c-b91f-0f387b8e128f%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D-fG5m8hEHQUoO5Y7kr8s94jKnyJ-rbR6xbmzJoKOoc8?table=block&id=65f821b2-27d1-4a0c-b91f-0f387b8e128f&cache=v2)
So here asks 2 important questions :
- How to test if a time series is stationary?
- What to do if a time series is nonstationary?
(Integrated part) Q1: How to test if a time series is stationary?
Here are some examples :
Here is tricky
This seems like there is seasonality, but it is rather cyclic.
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F41e78d1e-093b-4ffe-a01c-725995762b55%2FUntitled.png%3Ftable%3Dblock%26id%3D46f1f2f8-a8f8-4aae-9edf-f2c287be18d6%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D310uZxHsMmfztxVWJMuj9d_FOkmf6AJU1YgaHawqwEU?table=block&id=46f1f2f8-a8f8-4aae-9edf-f2c287be18d6&cache=v2)
It's cyclic in the sense that there is not a fixed period and the time between the peaks or the troughs is not determined by the calendar; it's determined by the ecology of links, and their population cycle.
So, this one is actually stationary, even though you might originally think it's not.
If i took a section of the graph of some length s and i took another section at a completely different point in time where the starting point is randomly chosen say over here then the distribution is the same
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F8ba3a0f9-6c52-48f4-9263-1e7553dd84dd%2FUntitled.png%3Ftable%3Dblock%26id%3D07195ea5-3f2c-4478-bd11-3a4616229931%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DhWt7BaLNrVBkK3recbfnB-8zELT_rRCfE-4zBIIgIug?table=block&id=07195ea5-3f2c-4478-bd11-3a4616229931&cache=v2)
Or we can look at the graph of ACF to determine if the ts is stationary.
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F093da9ff-242c-4e6c-8255-ef862f4b49e8%2FUntitled.png%3Ftable%3Dblock%26id%3Ddb9ec20f-6a1d-4dcd-8caf-b78e4bed5a8d%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D5v1YNtvTODh57i9INm3qIkQkxzWHFv5d9lNweo05UB8?table=block&id=db9ec20f-6a1d-4dcd-8caf-b78e4bed5a8d&cache=v2)
![Also, the values drop to 0 quickly - a sign of stationarity.](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F4a20d9df-078a-442d-84ba-f58562e9abe4%2FUntitled.png%3Ftable%3Dblock%26id%3D20ee87ee-cd98-41d4-932a-6bb3b15692c0%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3Dw0nXQ3hPynqLSB5qqKTCIiQqykxiMLBQLuKzvTubV8Q?table=block&id=20ee87ee-cd98-41d4-932a-6bb3b15692c0&cache=v2)
(Integrated part) Q2: What to do if a time series is nonstationary?
We will do transformation if is not nonstationary.
- We do log, box-cox, or whatever suitable (taught previously). →
- We then differencing →
- 12 here if that is yearly seasonal.
- If needed, we will do a second differencing.
- In practice, we never to beyond the second-order difference.
Seasonal difference:
It is the difference between an observation at time t and the previous observation from the same season.
The above formula assumes m is 12.
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F518da817-c3f3-4d58-978f-2248c8a474f5%2FUntitled.png%3Ftable%3Dblock%26id%3D0a64f07f-0bc7-4a19-be84-455d97434a39%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D1XPcF5gVLZU6a9rUYOT6cMYooMUHAeXkjsoD_AQ178M?table=block&id=0a64f07f-0bc7-4a19-be84-455d97434a39&cache=v2)
Unit root test - objectively determines the need for differencing
There are multiple tests which we can use to test if the ts is stationary
1. ACF
The fact that in ACF, the spikes go to zero quickly suggests that the series is stationary. It is not white-noise though.
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F25aa00c0-cbd2-4409-8985-5f3c7f67a922%2FUntitled.png%3Ftable%3Dblock%26id%3Da519ecad-2626-4a91-bd07-75f99b4535c7%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DR-7Kk_jAGIYI0rAGFIG2kPNSZHxAKfxk4Xjs8QpJA-Y?table=block&id=a519ecad-2626-4a91-bd07-75f99b4535c7&cache=v2)
2. The LjungBox test
→ 細係 non-stationary
A small p-value implies the series is ≠ white noise, and hence non-stationary.
![Box.test(type = "Ljung-Box")](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F1453a6b8-3034-4039-93ae-5e0135fe8aab%2FUntitled.png%3Ftable%3Dblock%26id%3D184f8cf6-3551-4e1d-b6ae-b7882848a060%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3Ddf_Qiky4EU4SXVo0mzDDjruDWSauU2lgcIDGR3p09og?table=block&id=184f8cf6-3551-4e1d-b6ae-b7882848a060&cache=v2)
Box.test(type = "Ljung-Box")
![Box.test(type = "Ljung-Box")](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F0080e525-8635-4b3a-b789-1aafdb0f407b%2FUntitled.png%3Ftable%3Dblock%26id%3D0fabeb25-538e-42d4-b575-fc89afa2cd86%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DnNXJauwQBt8xQtJ3b3UohQcfruQfXb-OhPQtJreA6S0?table=block&id=0fabeb25-538e-42d4-b575-fc89afa2cd86&cache=v2)
Box.test(type = "Ljung-Box")
3. The augmented Dickey-Fuller (ADF) test
→ 細係 stationary
A small p-value implies the series = white noise, and hence stationary.
Null hypothesis = the data are non-stationary and non-seasonal
![test phi](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2Fe63f9020-e1a6-49cd-ae57-980c782ef16c%2FUntitled.png%3Ftable%3Dblock%26id%3De2422b08-06b5-4cc3-88fe-3c89914a2fd2%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3Drc1cbRFp0jFO6Lv4dITB1a76ouyZG2lOv6UrkgRXPg8?table=block&id=e2422b08-06b5-4cc3-88fe-3c89914a2fd2&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F65ee4d54-aee0-4b24-8f1b-0cc2a9a1f628%2FUntitled.png%3Ftable%3Dblock%26id%3Dd7e325c1-27f6-4b4d-9d7d-1eb570901bd7%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DFs8h2FZtR2WQhWd7OS9Z32WA5MDm_z63ha0NO_nYW-g?table=block&id=d7e325c1-27f6-4b4d-9d7d-1eb570901bd7&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F16c29eba-3b0d-4594-a503-5321224ceb51%2FUntitled.png%3Ftable%3Dblock%26id%3D367dc336-6693-46ce-a4c3-5c5cb4ef585f%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D8-OZTXDXhrpAOhcpoDddf1xpMmRs_uQb4LBcSQmk8A8?table=block&id=367dc336-6693-46ce-a4c3-5c5cb4ef585f&cache=v2)
4. the Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test
→ 細係 stationary
Null hypothesis = the data are stationary; we look for evidence that the null hypothesis is false.
Small p-values (e.g., less than 0.05) suggest that differencing i required.
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F0034f552-9c43-4c98-adb5-a8985fc24954%2FUntitled.png%3Ftable%3Dblock%26id%3Dd4f183fc-b375-4cf0-8294-c02ada942bd5%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DUQA_Sw08g5pkY6IOkyP3Ii0tDB4bc9XJJjrrF0xTwrM?table=block&id=d4f183fc-b375-4cf0-8294-c02ada942bd5&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F80863661-6627-48d4-bdd2-cd1402b403f4%2FUntitled.png%3Ftable%3Dblock%26id%3Df368333a-7ec3-4e04-8471-f987daff70dd%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D4IIpSs3dG0U5Q4pkobF4u0saay0oeB3OGM6Aqq_cbps?table=block&id=f368333a-7ec3-4e04-8471-f987daff70dd&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F0f094957-5767-49b2-97b1-170b72039b7f%2FUntitled.png%3Ftable%3Dblock%26id%3Dd881ad62-2401-41f7-beb4-31c435b9736e%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DAktvErEZd-kZd2H8IRhjzUk2myLZZLh3CemDDEHrUhM?table=block&id=d881ad62-2401-41f7-beb4-31c435b9736e&cache=v2)
5. STL decomposition strength → >0.64 係 non-stationary
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2Fc2e026bd-a9dc-4393-bea2-4630ed28ad5a%2FUntitled.png%3Ftable%3Dblock%26id%3Db3b77adb-6621-4197-8052-74e3fa393aff%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DO5DcC0c2gEiBoCVBnknhIIIN0fwuK0jb8GYGmikLPG0?table=block&id=b3b77adb-6621-4197-8052-74e3fa393aff&cache=v2)
Non-seasonal ARIMA models
(AR part) Autoregressive model
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2Fbe5dc8f2-a0fe-4a93-b302-e3eb4e26462b%2FUntitled.png%3Ftable%3Dblock%26id%3D3461e014-28cd-406f-bb4f-8625c2814ee8%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DkogRyiJXH6gH7lMnpncU3O7GuvUV352bXBaPWzgqnf0?table=block&id=3461e014-28cd-406f-bb4f-8625c2814ee8&cache=v2)
You might think that this looks like linear regression, and indeed it is the extension. The difference is that the regression one has a bunch of explanatory variables; however, in the AR (p) model, we are going to regress on its own lag values.
Q: Why use a univariant model?
- Other explanatory variables are not available.
- Other explanatory variables are not directly observable.
- Examples: inflation rate, unemployment rate, exchange rate, firm's sales, gold prices, interest rate, etc.
- Changing the parameters = changes ts patterns.
- is white noise. Chaning only change the scale of the series, not the patterns.
- If we add C, then we assumed the trend continues in long term.
Stationarity condition
P is the order of model
We normally restrict autoregressive models to stationary data, in which case some constraints on the values of the parameters are required.
- For an AR(1) model:
- For an AR(2) model:
When p≥3
p≥3, the restrictions are much more complicated. The
Fable
package takes care of these restrictions when estimating a model.(MA part) Moving Average (MA) models
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2Fed4fb3a0-a0b5-4f7a-b88a-4601e000198b%2FUntitled.png%3Ftable%3Dblock%26id%3D362c3a35-ff61-4232-9a7c-d2f017741263%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D3BHNIKKPJl6oN8cmNeQGAVAnEHt_VdJGstvVL-JsAiE?table=block&id=362c3a35-ff61-4232-9a7c-d2f017741263&cache=v2)
- Moving Average (MA) models ≠ moving average smoothing!
- This is a multiple regression with past errors as predictors.
Non-seasonal ARIMA models
Combining differencing with autoregression and a moving average model, we obtain a non-seasonal ARIMA model.
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F376a6d31-e6d3-498e-b77c-b1e6a293f4f5%2FUntitled.png%3Ftable%3Dblock%26id%3Dc1d1fd51-9989-44c1-a456-63e465471f88%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DZUeHq10F6UDvTD7Fp4hWf0BFi9qL0b2VqHCSwtDqdzE?table=block&id=c1d1fd51-9989-44c1-a456-63e465471f88&cache=v2)
- = the differenced series (it may have been differenced more than once).
- The “predictors” on the right hand side include both lagged values of and lagged errors.
Params of ARIMA(p,d,q)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F57694091-db4b-4498-8c46-23d1d4093e36%2FUntitled.png%3Ftable%3Dblock%26id%3D05082e35-3395-4529-b237-6b181f5e2d4f%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3Dd8S3nFC8t4k2OEIJRekELJkERGVCdrl5K1Q04nhWV-U?table=block&id=05082e35-3395-4529-b237-6b181f5e2d4f&cache=v2)
Special case
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2Fb6f878ef-ffdc-4413-bbfe-1fbf9d1b643c%2FUntitled.png%3Ftable%3Dblock%26id%3D14199ddd-0d88-4cb0-88e6-cccf1a4f70a5%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DxhgXAM7HecYS1b6rNUvWtgS3hi2Nxx--N1nakSJggV4?table=block&id=14199ddd-0d88-4cb0-88e6-cccf1a4f70a5&cache=v2)
Q: How do you choose P and Q?
- Before answering this q, we need to know how C, P and Q affect the model.
- Changing d affects the prediction interval; The higher the value of d, the more rapidly the prediction intervals increase in size (d越大,pi 越大).
- Changing p affects Here to solve
ACF & PACF
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F2e311154-1587-4059-95d9-a14ef0be441f%2FUntitled.png%3Ftable%3Dblock%26id%3D87f8abdc-0fe0-4d4f-8be7-1bef12f3999c%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DSmpJShr7st-kDdp6wsk0PPVFz7SoB0HU_Dy8mWG5tcg?table=block&id=87f8abdc-0fe0-4d4f-8be7-1bef12f3999c&cache=v2)
The above shows the ACF. However, the problem with the ACF function is that, when we calculate the correlation between in the case that they are corr, then y t − 1 and y t − 2 must also be correlated.
However, then y t and y t − 2 might be correlated, simply because they are both connected to y t − 1, rather than because of any new information contained in y t − 2 that could be used in forecasting y t .
In short, there is an interaction effect.
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F1d851062-3963-4a5a-b145-c4db050023fe%2FUntitled.png%3Ftable%3Dblock%26id%3Dad1674e2-fe78-4dc4-9916-23dd4b00ad85%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D1cAaXzkjsgG4x8mVcT7FQzIitzHLrq1HCsGhr6g4r3Q?table=block&id=ad1674e2-fe78-4dc4-9916-23dd4b00ad85&cache=v2)
ACF
These measure these relationships after removing the effects of lags.
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2Ffaa09c87-1c0c-4fd2-ac7a-6579003e3e6b%2FUntitled.png%3Ftable%3Dblock%26id%3Dca99be19-c6a9-4af9-baa3-0e2f0e512c8c%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D1tmmnL8IL1SmjiFAHxiO2QOTEb9d4yK_mf43uBUWtd8?table=block&id=ca99be19-c6a9-4af9-baa3-0e2f0e512c8c&cache=v2)
Q: How to pick the order of AR(p) using ACF vs. PACF?
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F7e7d9117-9e00-44e5-bc76-f2ee3c251874%2FUntitled.png%3Ftable%3Dblock%26id%3D3b5d4758-06a5-48eb-b0de-3510985588f1%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3Dc0O1Z25jwQedAvK6SJVgggl0QBSCtTvhwBVaX75uZuM?table=block&id=3b5d4758-06a5-48eb-b0de-3510985588f1&cache=v2)
Q: How to pick the order of MA(q) using ACF vs. PACF?
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F144ca041-7387-4fbf-9785-1ae176140372%2FUntitled.png%3Ftable%3Dblock%26id%3D5f2240bc-a643-4ec1-a54c-153218695781%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D3_61I4_ZzBwUvUbEPqSP7SI_tizhIF8GnP6Gk4O-404?table=block&id=5f2240bc-a643-4ec1-a54c-153218695781&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F2dfa8d1a-35e7-483e-9e84-315b5c880cef%2FUntitled.png%3Ftable%3Dblock%26id%3Dc7ed317e-3bd4-47fc-a8bf-c54760391fdd%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DGlZmyZmpPIKsRV2jikA11u4heCqlK3U0BjlE-IoeReU?table=block&id=c7ed317e-3bd4-47fc-a8bf-c54760391fdd&cache=v2)
Seasonal ARIMA models
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F51bc5888-531b-47e0-b3f8-13d3d7ed11bd%2FUntitled.png%3Ftable%3Dblock%26id%3D19f4be84-19aa-41e1-bda4-d39239b2f414%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3Dd8JJ0RREfD3IwGZV6uyc0ReE6T5G-kceK-Wl4tjPnj4?table=block&id=19f4be84-19aa-41e1-bda4-d39239b2f414&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F1203cb74-f373-4286-a893-436a02302409%2FUntitled.png%3Ftable%3Dblock%26id%3D1487f2ae-6818-4b2f-84ad-810f857e6eac%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DL-YYBjQbbA2rmkH0kUAEEDPMETfbE3qe0aIrcnv-POQ?table=block&id=1487f2ae-6818-4b2f-84ad-810f857e6eac&cache=v2)
It works similar to non-seasonal ARIMA. But it adds the seasonal order terms written as (P, D, Q)
Q: How do you choose the order using ACF /PACF
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2Fd3585d9d-ef89-43b2-909e-7bb0096f5ca5%2FUntitled.png%3Ftable%3Dblock%26id%3Df05e94e2-5889-409e-9b8d-9d910c6d2b5b%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DSIpTye_ZuEI7d_VSEe_Lyu0EY_m0Na0LzE30Q86vGAY?table=block&id=f05e94e2-5889-409e-9b8d-9d910c6d2b5b&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2Fcb4b9724-8e39-4c76-a805-a27868184408%2FUntitled.png%3Ftable%3Dblock%26id%3D82cc829b-8078-4289-8ed9-12f0d7df652b%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3D19QwcoMLGu1-uapXzVweYRYylbciOXk0R5-yTuxa-ic?table=block&id=82cc829b-8078-4289-8ed9-12f0d7df652b&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2Ff31d9aaa-f43b-4287-a34a-c7857a559c6f%2FUntitled.png%3Ftable%3Dblock%26id%3De5b4916d-170f-4d99-b1fd-b5cd19a34f3f%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DQyhV8m3yFiIKP1J3nE82nEVR5P-SwL6GMuHQpvzPaMo?table=block&id=e5b4916d-170f-4d99-b1fd-b5cd19a34f3f&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fe1c5ba0e-562a-49b0-8505-ce5e38fc061b%2F8c68aff4-a59c-4354-806d-abb62495fe9e%2FUntitled.png%3Ftable%3Dblock%26id%3D72c7b613-4ae5-4da8-8179-82fa445d5d3c%26spaceId%3De1c5ba0e-562a-49b0-8505-ce5e38fc061b%26expirationTimestamp%3D1725818400000%26signature%3DKXynyJ2pN8HzUucdwvjiAI3WFLcAeQvZ136kYaZdkdA?table=block&id=72c7b613-4ae5-4da8-8179-82fa445d5d3c&cache=v2)
Estimation and order selection
ARIMA modelling in R
Forecasting
Seasonal ARIMA models
ARIMA vs ETS
FAQ
A good model contains an unbiased residual. How do we know if our residuals are unbiased?
our residuals are unbiased when it is =0. If the above plot floats around 0, then it would be unbiased and that also means it is a white noise series
What is the process to make data stationary ?
1. Transform the data to remove changing variance
2. Seasonally difference the data to remove seasonality
3. Regular difference if the data is still non-stationary
“ARIMA-based prediction tends to be narrow.” True or False?
Yes, because only the variation in the errors has been accounted for.
- There is also variation in the parameter estimates, and in the model order, that has not been included in the calculation.
- The calculation assumes that the historical patterns that have been modelled will continue into the forecast period.
Math
- Author:Jason Siu
- URL:https://jason-siu.com/50f18eb62caa4d89acb8cf897323aac6
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts