














Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Prepare-se para as provas
Estude fácil! Tem muito documento disponível na Docsity
Prepare-se para as provas com trabalhos de outros alunos como você, aqui na Docsity
Encontra documentos específicos para os exames da tua universidade
Prepare-se com as videoaulas e exercícios resolvidos criados a partir da grade da sua Universidade
Responda perguntas de provas passadas e avalie sua preparação.
Ganhe pontos para baixar
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Time series modelo arima para aulas de economia.
Tipologia: Manuais, Projetos, Pesquisas
1 / 22
Esta página não é visível na pré-visualização
Não perca as partes importantes!















Time Series Models Overview^1 ^ Time series examples ^ White noise, autoregressive (AR), moving average (MA), and ARMA models ^ Stationarity, detrending, differencing, and seasonality ^ Autocorrelation function (ACF) and partial autocorrelation function (PACF) ^ Dickey-Fuller tests ^ The Box-Jenkins methodology for ARMA model selection
3 White noise^ ^ White noise describes the assumption that each element in a series is a random draw from apopulation with zero mean and constant variance.^ ^ Autoregressive (AR) and moving average (MA) models correct for violations of this whitenoise assumption.
(^2 0) white_noise -2 -4^0 10 20
(^40 50) _t
4 Autoregressive (AR) models^ ^ Autoregressive (AR) models are models in which the value of a variable in one period isrelated to its values in previous periods.^ ^ AR(p) is an autoregressive model with p lags:
௧ୀଵ where^ ߤ^ is a constant and
ߛis the coefficient for the lagged variable in time^
t-p.
^ AR(1) is expressed as:
߳ ሻ^ or^ ݕሻܮߛ െ ሺ1߳ ߤ ൌ௧ ௧^ ௧^
௧
AR(1) with^ ߛൌ 0.^
AR(1) with^ ߛൌ െ0. (^4 2 0) ar_1a -2 -4^0 10 20
(^2 1 0) ar_1b -1 -2 -3 (^40 500) _t 10 20 30 40
(^50) _t
6 Autoregressive moving average (ARMA) models^ ^ Autoregressive moving average (ARMA) models combine both
p^ autoregressive terms and
q
moving average terms, also called ARMA(p,q).
ARMA(1,1) with^ ߛൌ 0.
and^ ߠൌ 0.^
ARMA(1,1) with^ ߛൌ െ0.
and^ ߠൌ െ0.
(^4 2 0) arma_11a -2 -4^0 10
(^5 0) arma_11b -5 (^30 40 50) _t 0 10 20 30
(^40 50) _t
7 Stationarity^ ^ Modeling an ARMA(p,q) process requires stationarity.^ ^ A stationary process has a mean and variance that do not change over time and the processdoes not have trends.^ ^ An AR(1) disturbance process:
^ is stationary if^ | |ߩ൏ 1
and߳^ is white noise.௧^ ^ Example of a time-series variable, is it stationary?
(^300 250) y (^200 150 100) 1980q1^ 1985q1^ 1990q^
1995q1^ 2000q1yearqtr
9 Differencing^ ^ When a variable^ ݕ௧^
is not stationary, a common solution is to use differenced variable: ݕΔݕ ൌݕ െ, for first order differences.௧ ௧ ௧ିଵ (^) The variable ݕis integrated of order one, denoted௧
I (1), if taking a first difference produces a stationary process. ARIMA (p,d,q) denotes an ARMA model with p autoregressive lags, q moving average lags, aand difference in the order of d.Differenced variable:^ ݕΔݕ ൌ௧^ ௧
(^20 10 0) D.y -10 1980q1^ 1985q1^ 1990q^
1995q1^ 2000q1yearqtr
10 Seasonality^ ^ Seasonality is a particular type of autocorrelation pattern where patterns occur every “season,”like monthly, quarterly, etc.^ ^ For example, quarterly data may have the same pattern in the same quarter from one year to thenext.^ ^ Seasonality must also be corrected before a time series model can be fitted.
12 Augmented Dickey-Fuller test^ ^ In addition to the model above, a drift
ߤ^ and additional lags of the dependent variable can be added.
^ The augmented Dickey-Fuller test evaluates the null hypothesis that
∗^ ߛ ൌ 0. The model will ∗^ be non-stationary if ߛ ൌ 0
Dickey-Fuller test with a time trend^ ^ The model with a time trend:
^ Test the hypothesis that
∗^ ߚൌ 0 and ߛ ൌ 0. Again, the model will be non-stationary or will∗ (^) have a unit root present if ߛ ൌ 0.
13 Autocorrelation Function (ACF) and Partial Autocorrelation Function (ACF)Autocorrelation function (ACF) ACF is the proportion of the autocovariance of
ݕand^ ݕto the variance of a dependent௧^ ௧ି^ variable^ ݕ௧
Covሺݕݕ ,௧^ ߩ ൌ ሻ ݇ሺܨܥܣൌ ሻ௧ି (^) Varሺݕሻ௧ ^ The autocorrelation function ACF(
k ) gives the gross correlation between
ݕand^ ݕ.௧^ ௧ି^ ^ For an AR(1) model, the ACF is
ߩ ൌ ሻ ݇ሺܨܥܣߛ ൌ. We say that this function tails off. Partial autocorrelation function (PACF)^ ^ PACF is the simple correlation between
ݕand^ ݕminus the part explained by the௧^ ௧ି^ intervening lags∗^ ߩൌ Corrሾݕ
∗^ where ܧ ݕሺݕ|, … , ݕ௧^ ௧ିଵ^ ௧ିାଵ ሻ^ is the minimum mean-squared error predictor of
ݕby௧^
ݕ, … , ݕ.௧ିଵ^ ௧ିାଵ^ For an AR(1) model, the PACF is
ߛ^ for the first lag and then cuts off.
15 ACF of AR(1) with coefficient 0.
PACF of AR(1) with coefficient of 0. ACF of AR(1) with coefficient -0.
PACF of AR(1) with coefficient of -0. 1.00 0.50 0.00 (^) Autocorrelations of ar_1a -0.50^0 5
(^15 20) Lag Bartlett's formula for MA(q) 95% confidence bands
1.00 0.50 0.00 -0.50Partial autocorrelations of ar_1a^0 5
(^15 20) Lag 95% Confidence bands [se = 1/sqrt(n)] Autocorrelations of ar_1b-0.60-0.40-0.200.00 0.20 0.40^0 5
(^15 20) Lag Bartlett's formula for MA(q) 95% confidence bands
Partial autocorrelations of ar_1b-0.60-0.40-0.200.00 0.20^0 5
(^15 20) Lag 95% Confidence bands [se = 1/sqrt(n)]
16 ACF of MA(1) with coefficient of 0.
PACF of MA(1) with coefficient of 0. ACF of MA(1) with coefficient of -0.
PACF of MA(1) with coefficient of -0. -0.40-0.200.00 0.20 0.40Autocorrelations of ma_1a^0 5
(^15 20) Lag Bartlett's formula for MA(q) 95% confidence bands
-0.200.00 0.20 0.40 0.60Partial autocorrelations of ma_1a^0 5
(^15 20) Lag 95% Confidence bands [se = 1/sqrt(n)] -0.40-0.200.00 0.20 0.40Autocorrelations of ma_1b^0 5
(^15 20) Lag Bartlett's formula for MA(q) 95% confidence bands
Partial autocorrelations of ma_1b-0.60-0.40-0.200.00 0.20 0.40^0 5
(^15 20) Lag 95% Confidence bands [se = 1/sqrt(n)]
18 ACF of non-stationary series
-^ The ACF shows a slow decaying positive ACF. 1.00 0.50 0.00 (^) Autocorrelations of xt-0.50 -1.00^0 5 10 ACF with seasonal lag (4) – ACF shows spikes every 4 lags. (^15 20) LagBartlett's formula for MA(q) 95% confidence bands1.00 0.50 0.00Autocorrelations of xt -0.50 0 10 20 30 LagBartlett's formula for MA(q) 95% confidence bands
Diagnostics for ARIMA Models^19 Testing for white noise^ ^ The Box-Pierce statistic is the following:
^ The Ljung-Box statistic:
మ்ିఘೖ∑ (^) ܳ ′ ൌ ܶሺ ܶ 2ሻ ୀଵ where ߩis the sample autocorrelation at lag k. ^ Under the null hypothesis that the series is white noise (data are independently distributed),
ଶ^ has a limiting߯ distribution with p^ degrees of freedom. Goodness of fit^ ^ Akaike Information Criterion
(AIC) and the Bayesian Information Criterion (BIC) are two measures goodness of fit. They measure the trade-off between model fit and complexity of themodel.
AIC ൌ െ2 lnሺܮሻ 2݇ BIC ൌ െ2 lnሺܮሻ lnሺܰሻ݇ where^ ܮ^ is the value of the likelihood function evaluated at the parameter estimates,
ܰ is the
number of observations, and
݇ is the number of estimated parameters. ^ A lower AIC or BIC value indicates a better fit (more parsimonious model).