Docsity
Docsity

Prepare-se para as provas
Prepare-se para as provas

Estude fácil! Tem muito documento disponível na Docsity


Ganhe pontos para baixar
Ganhe pontos para baixar

Ganhe pontos ajudando outros esrudantes ou compre um plano Premium


Guias e Dicas
Guias e Dicas


Time series Arimã model, Manuais, Projetos, Pesquisas de Economia

Time series modelo arima para aulas de economia.

Tipologia: Manuais, Projetos, Pesquisas

2020

Compartilhado em 09/03/2020

pedro-reis-7
pedro-reis-7 🇵🇹

3

(2)

7 documentos

1 / 22

Toggle sidebar

Esta página não é visível na pré-visualização

Não perca as partes importantes!

bg1
Time Series ARIMA Models
Ani Katchova
© 2013 by Ani Katchova. All rights reserved.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Pré-visualização parcial do texto

Baixe Time series Arimã model e outras Manuais, Projetos, Pesquisas em PDF para Economia, somente na Docsity!

Time Series ARIMA ModelsAni Katchova © 2013 by Ani Katchova. All rights reserved.

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),

Q

ଶ^ 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).