Comments (5)
Yep that's where we should update it (removing the check and add period diff to the design_matrix)
AFAIK this is also how Statsmodel deal with SARIMAX (when you choose simple_differencing=True
) https://github.com/statsmodels/statsmodels/blob/581119c64e43b6021bf247aa300b13abdfd5ef3b/statsmodels/tsa/statespace/sarimax.py#L551-L560
from bookcode_edition1.
Yeah that sentence is pretty confusing - what we are trying to say should be "Usually we have either ... but not both". The reason being that it gets a bit confusing in interpretation with the interaction regressors and the seasonality (especially if the regressors contain some seasonal information). But you can definitely have both in your SARIMAX set up.
from bookcode_edition1.
- It is actually exercise 6H15 - we are in the process of release the solution of the exercise, please stay tuned
- It is totally possible to combine SARIMA with external regressor, it just that it gets confusing, and many implementations actually opt to disallow it. We will update the text "Note that we can have either seasonal (SARIMA) or exogenous regressors (ARIMAX) but not both." in the 2nd to clarify this point.
from bookcode_edition1.
Oh fantastic (look forward to going through them!) okay that's great - so is it just a case of fitting a Normal prior over a holiday beta and just passing in the index of 1's and 0's?
Or does this bit need to be changed so that it doesn't set the seasonal period to 0?
# Dynamic regression
if design_matrix is not None:
assert ps.rank(design_matrix) >= 2
assert ps.shape(design_matrix)[-2] == observed.shape[-1]
# seasonal adjustment
if self.period > 0:
warnings.warn("""
Can not model seasonal difference with Dynamic regressions,
Setting D to 0 ...
""")
self.period = 0
self.design_matrix = tf.convert_to_tensor(
np.diff(design_matrix, n=self.d, axis=0), dtype=dtype)
else:
self.design_matrix = None
Many thanks again!
from bookcode_edition1.
Hi @junpenglao I know that this issue is closed, but maybe you have some extra reference on why seasonality + exogenous regressors is a tricky combination?
I was scratching my head over the "Note that we can have either seasonal (SARIMA) or exogenous regressors (ARIMAX) but not both." sentence for almost an hour 😃
Why is it that you can't simply replace
with
EDIT:
The section number is 6.3.2, equation (6.9)
https://bayesiancomputationbook.com/markdown/chp_06.html#s-ar-i-ma-x
from bookcode_edition1.
Related Issues (20)
- Missing dataset: 8M10 HOT 8
- More documentation for run_mcmc_simple
- Missing p in equation
- Manuscript Error: Code 1.7 doesn't work in PyMC version 5 HOT 2
- Manuscript Error:
- No install file
- Bayesian Structural Time Series - Code adjusments
- Manuscript Error: Mismatch - Chapter 8 book code to notebook code in rvs function
- Manuscript Error: Code 6.15 vs Equation 6.7 HOT 1
- Issue on page /markdown/chp_11.html (imprecise example of 0 probability)
- Problem to reproduce Figure 1.5 HOT 4
- Type Error on import of Tensorflow Code Block 3.7 Chapter 03 HOT 1
- Manuscript Error: HOT 3
- Manuscript Error:
- Code for Figure 2.7 not working with PYMC5
- Are solutions available to exercises?
- Fix TFP Code
- Solution of question 5M16 BMCP
- Better reference to scientific citation data in Problem 8M9
- Manuscript Error: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bookcode_edition1.