Download presentation
Presentation is loading. Please wait.
1
Regression with ARMA Errors
2
Example: Seat-belt legislation
Story: In February 1983 seat-belt legislation was introduced in UK in the hope of reducing the number of deaths and serious injuries on the road. Goal: Check whether or not this law is effective Procedure: Use the number of monthly deaths and serious injuries around the time this law is introduced. Check whether or not there was a drop in the mean number of monthly deaths and serious injuries from that time onwards
3
1. Formulation Data: Model:
Yt, t = 1,…,120 : the number of monthly deaths and serious injuries on UK roads for 10 years beginning in January 1975 (SBL.TSM) ft , t = 1,…,120 : indicator variable showing whether these is this law at time t. ft =0 for 1≤t≤ 98, ft =1 for 99≤t≤ 120 (SBLIN.TSM) Model: Yt = a + b • ft + Wt or Y = Xβ+ W, β=(a,b)T If the estimated value of the coefficient b is significantly negative, the Seat-belt legislation will be considered effective.
5
2. try OLS regression Assume Wt ~ WN(0, σ2), we can do OLS regression
1. estimate (a, b) by minimizing the sum of squares: which yields: 2. how well the OLS estimator is: 3. If Wt ~ N(0, σ2), we can calculate the 95% confidence interval of b, therefore we can test whether b is significantly different from zero.
6
Do it in ITSM: 1.File>Project>Open>Univariate then SBL.TSM
2.click Regression>Specify, polynomial regression order=1 auxiliary variable = SBLIN.TSM 3. then click OK and press the GLS button
7
Results: ========================================
ITSM::(Regression estimates) Method: Generalized Least Squares Y(t) = L(t) + W(t) Trend Function: L(t) = E+04 t^ E+03 f(t) ARMA Model: W(t) = Z(t) WN Variance = Coeff Value Std Error E E
8
In R > summary(lm(SBL ~ SBLIN)) Call: lm(formula = SBL ~ SBLIN)
Residuals: Min Q Median Q Max Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) < 2e-16 *** SBLIN e-08 *** --- Signif. codes: 0 `***' `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: on 118 degrees of freedom Multiple R-Squared: , Adjusted R-squared: F-statistic: on 1 and 118 DF, p-value: 7.411e-08
9
3. check residues Wt Is the assumption Wt ~ WN(0, σ2) correct?
Check residue plot and ACF/PACF =>seasonal component with period 12
10
4. Deseasonalizing Differencing: Yt = a + b • ft + Wt => Mt = Yt – Yt-12 We get : Mt = b • gt + Nt, t=13, …, 120 gt =1 for 99≤t≤110, gt =0 otherwise; Nt = Wt – Wt-12 (In ITSM: Transform > Difference, input 12) Perform OLS regression of Mt (SBLD.TSM) on gt (SBLDIN.TSM) without intercept term. In ITSM: Trend Function: L(t) = E+03 g(t) ARMA Model: N(t) = Z(t), WN Variance = Coeff Value Std Error E In R: (summary(lm(SBLD ~ 0+SBLDIN))) Coefficients: Estimate Std. Error t value Pr(>|t|) SBLDIN e-14 ***
11
5. check residues Nt Is the assumption Nt ~ WN(0, θ2) correct?
12
6. Fit ARMA(p,q) model for Nt
The residue looks stationary ACF/PACF suggest p≤13, q≤13 => Model selection within 0≤p≤13 and 0≤q≤13 by minimizing AICC To Do: Select Model>Estimation>Autofit to fit AR and MA models with order up to 13 to the residues with no mean-correction
13
Results : MA(12) Method: Maximum Likelihood
M(t) = L(t) + N(t), Based on Trend Function: L(t) = E+03 g(t) ARMA Model: N(t) = Z(t) Z(t-1) Z(t-2) Z(t-3) Z(t-4) Z(t-5) Z(t-6) Z(t-7) Z(t-8) Z(t-9) Z(t-10) Z(t-11) Z(t-12) WN Variance = E+05 MA Coefficients Standard Error of MA Coefficients (Residual SS)/N = E+05 AICC = E+04 AICC = E (Corrected for regression) BIC = E+04 -2Log(Likelihood) = E+04 Accuracy parameter = E-08 Number of iterations = 1 Number of function evaluations = Uncertain minimum.
14
7. so Nt is not white noise, we shall improve out previous estimate of b by recursion
Step1. by OLS => fit ARMA(p,q) to Nt, we improved our knowledge about Nt : white noise => MA(12) Step2. with this new knowledge of Nt, we can go back to improve the estimate of b by GLS using the new Γ=E(NTN). => Step3. compute new residue Nt using the new estimate of b, fit an ARMA(p,q) like what we did before Step4. repeat step2 and then step3, until the estimators have stabilized.
15
To Do: After fitting ARMA(p,q) model for Nt, the model in the Regression estimates window is automatically updated to: M(t) = L(t) + N(t) L(t) = E+03 g(t) Press MLE button for a new round of iteration Finally we arrive at the model: Mt = b • gt + Nt,, b= , SE(b) = 49.41 N(t) = Z(t) Z(t-1) Z(t-2) Z(t-3) Z(t-4) Z(t-5) Z(t-6) Z(t-7) Z(t-8) Z(t-9) Z(t-10) Z(t-11) Z(t-12) Z(t) ~ WN(0, 12581)
16
Conclusion Mt = b • gt + Nt,, b=-328.45, SE(b) = 49.41
=>So b is significantly negative => the law has good effect To Do: Regression > Show Fit
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.