توضیح 1
The live starter code is self-contained and uses only runner-compatible functions.
Loading
درس 21 از 22
Advanced Topic – Optional. Model joint dynamics while separating predictive content, shock identification, long-run relations, and causal claims.
Advanced Topic – Optional
This chapter extends the core pathway. Complete Chapters 1–14 first, then use this material when your question and data justify the added model complexity.
Motivation
Variables interact, but multivariate fit does not by itself identify interventions or structural shocks.
Why this matters
Model joint dynamics while separating predictive content, shock identification, long-run relations, and causal claims.
Packages and data
Base-R demonstrations; vars, urca, tsDyn, rmgarch, and MTS are optional.
توضیح 1
The live starter code is self-contained and uses only runner-compatible functions.
توضیح 2
Book-only outputs are labelled when the separate source dataset or advanced package was not supplied.
توضیح 3
R code, paths, function names, and formulas remain left-to-right in every locale.
اصطلاحات
Every system variable depends on lags of all included variables.
Joint forecasting system
Incremental predictive content conditional on included history.
Not structural causation
A stationary linear combination of nonstationary variables.
Long-run equilibrium relation
نمادگذاری و فرمولها
yt = c + A1 y(t-1) + ... + Ap y(t-p) + error_t
Impulse responses require a specified shock-identification rule because innovations can be contemporaneously correlated.
مثال حلشده
سناریو
Can a stationary spread be recovered from two simulated nonstationary levels?
بررسی با R
set.seed(2121)
x <- cumsum(rnorm(220,sd=.8))
spread <- arima.sim(list(ar=.55),n=220,sd=.5)
y <- 4+1.25*x+spread
fit <- lm(y~x)
print(coef(fit))
print(acf(residuals(fit),plot=FALSE)$acf[2])
plot(residuals(fit),type='l',ylab='Estimated spread')The controlled simulation illustrates cointegration; observed data need integration and residual-stationarity assessment. Limitation: A high R-squared between trending levels can be spurious, and VAR shock responses depend on identification assumptions.
Visual
The simulated cointegrating residual fluctuates around zero instead of drifting.
ارتباط با R
Run the self-contained starter code in the protected STATLAB R runner. The code prints an auditable result and avoids network or unrestricted file access.
Live R Lab
Run a self-contained example, verify its output, and explain one limitation for multivariate time series and cointegration.
Ready to run
Common mistake
Do not call Granger predictability causal impact or interpret trending-level OLS before checking cointegration.
STATLAB Tip
Label shock variable, size, identification rule, response unit, horizon, and uncertainty method on every impulse response.
تمرین هدایتشده
سناریو
Reverse a Cholesky ordering and explain why the impulse response changes.
Compare your result with the definition, units, and model assumptions—not only with a target number.
Exercises
Complete these without looking at the selected solutions. More than one defensible program may exist.
توضیح 1
Compare VAR lag candidates.
توضیح 2
Compare stationarity of levels and residual spread.
توضیح 3
Explain when DCC is preferable to unrestricted covariance.
Selected solutions
These are compact solution routes. Confirm dimensions, units, and any changed modelling choices.
توضیح 1
Compare information criteria and residual serial correlation.
توضیح 2
Use plots plus ADF/KPSS with explicit deterministic terms.
توضیح 3
DCC offers parsimonious changing correlation when dimension makes free covariance dynamics impractical.
Chapter summary
Model joint dynamics while separating predictive content, shock identification, long-run relations, and causal claims.
توضیح 1
VAR models joint lag dynamics.
توضیح 2
Granger means prediction, not intervention.
توضیح 3
Impulse responses require identification.
توضیح 4
Cointegration creates stationary combinations.
اصطلاحات
cross-correlation
Use in Multivariate Time Series and Cointegration.
vector autoregression
Use in Multivariate Time Series and Cointegration.
Granger test
Use in Multivariate Time Series and Cointegration.
cointegration
Use in Multivariate Time Series and Cointegration.
References and provenance
Engle & Granger (1987); Safavi (2026), Chapter 21. Student notes: Mohammad Safavi, Ph.D., STATLAB Academy, Version 1.0.
منبع
The authoritative 125-page English PDF accompanies this native lesson.
دریافتبازاندیشی
Name the assumption, evidence you would seek, and how the recommendation might change.
ارزیابی پایانی