توضیح 1
The live starter code is self-contained and uses only runner-compatible functions.
Loading
درس 11 از 22
Use stationarity, ACF, PACF, and simple AR/MA models to describe persistence.
Motivation
Forecasts depend on how information persists. Stable lag relationships make the past informative about the future.
Why this matters
Use stationarity, ACF, PACF, and simple AR/MA models to describe persistence.
Packages and data
Base stats; tseries and urca are optional for formal tests.
توضیح 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.
اصطلاحات
Constant mean and variance; autocovariance depends only on lag.
A modelling property
Correlation with lagged versions.
AR patterns often decay
Lag relationship after intermediate lags are controlled.
AR(1) often dominated by lag one
نمادگذاری و فرمولها
yt = c + phi y(t-1) + error_t; stationarity requires |phi| < 1
AR(1) shocks decay geometrically when the coefficient magnitude is below one.
مثال حلشده
سناریو
How does a persistent AR(1) differ from white noise?
بررسی با R
set.seed(1111)
white <- rnorm(180)
ar1 <- arima.sim(model=list(ar=0.72), n=180)
print(c(white_acf1=acf(white,plot=FALSE)$acf[2], ar_acf1=acf(ar1,plot=FALSE)$acf[2]))
fit <- arima(ar1, order=c(1,0,0))
print(coef(fit)['ar1'])
acf(ar1,lag.max=18)Finite-sample estimates do not equal the generating value exactly; persistence is visible as runs above and below the mean. Limitation: ACF/PACF patterns suggest candidates but do not replace likelihood, residual diagnostics, and forecast evaluation.
Visual
AR(1) retains much more lag-one correlation than white noise.
ارتباط با 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 stationarity, autocorrelation, ar, and ma models.
Ready to run
Common mistake
Failing to reject a unit root is not proof that one exists; short persistent samples give low test power.
STATLAB Tip
After candidate identification, check residual ACF and rolling forecast accuracy.
تمرین هدایتشده
سناریو
Simulate MA(1) with coefficients +0.6 and -0.6; compare the sign at lag one and near-zero later lags.
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 AR coefficients 0.2, 0.8, and 1.0.
توضیح 2
Calculate a fitted persistence half-life.
توضیح 3
Explain over-differencing.
Selected solutions
These are compact solution routes. Confirm dimensions, units, and any changed modelling choices.
توضیح 1
Use arima.sim for stationary cases and cumsum for phi=1.
توضیح 2
log(0.5)/log(abs(phi))
توضیح 3
Differencing stationary data can create unnecessary negative autocorrelation.
Chapter summary
Use stationarity, ACF, PACF, and simple AR/MA models to describe persistence.
توضیح 1
Stationarity stabilizes lag relationships.
توضیح 2
ACF and PACF summarize different dependence.
توضیح 3
Root conditions govern stationarity/invertibility.
توضیح 4
Unit-root tests need explicit specifications.
اصطلاحات
autocorrelation
Use in Stationarity, Autocorrelation, AR, and MA Models.
partial autocorrelation
Use in Stationarity, Autocorrelation, AR, and MA Models.
simulate
Use in Stationarity, Autocorrelation, AR, and MA Models.
estimate
Use in Stationarity, Autocorrelation, AR, and MA Models.
References and provenance
Safavi (2026), Chapter 11. 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.
ارزیابی پایانی