Explanation 1
The live starter code is self-contained and uses only runner-compatible functions.
Loading
Lesson 11 of 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.
Explanation 1
The live starter code is self-contained and uses only runner-compatible functions.
Explanation 2
Book-only outputs are labelled when the separate source dataset or advanced package was not supplied.
Explanation 3
R code, paths, function names, and formulas remain left-to-right in every locale.
Terminology
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
Notation and formulas
yt = c + phi y(t-1) + error_t; stationarity requires |phi| < 1
AR(1) shocks decay geometrically when the coefficient magnitude is below one.
Worked example
Scenario
How does a persistent AR(1) differ from white noise?
R check
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 connection
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.
Guided practice
Scenario
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.
Explanation 1
Compare AR coefficients 0.2, 0.8, and 1.0.
Explanation 2
Calculate a fitted persistence half-life.
Explanation 3
Explain over-differencing.
Selected solutions
These are compact solution routes. Confirm dimensions, units, and any changed modelling choices.
Explanation 1
Use arima.sim for stationary cases and cumsum for phi=1.
Explanation 2
log(0.5)/log(abs(phi))
Explanation 3
Differencing stationary data can create unnecessary negative autocorrelation.
Chapter summary
Use stationarity, ACF, PACF, and simple AR/MA models to describe persistence.
Explanation 1
Stationarity stabilizes lag relationships.
Explanation 2
ACF and PACF summarize different dependence.
Explanation 3
Root conditions govern stationarity/invertibility.
Explanation 4
Unit-root tests need explicit specifications.
Terminology
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.
Resource
The authoritative 125-page English PDF accompanies this native lesson.
DownloadReflection
Name the assumption, evidence you would seek, and how the recommendation might change.
Exit check
Reach 70% to complete the chapter. Explanations appear after submission.
Checkpoint
Question 1 of 2. Answered 0/2. Passing score: 70%.