Presentation is loading. Please wait.

Presentation is loading. Please wait.

Regression with ARMA Errors. Example: Seat-belt legislation Story: In February 1983 seat-belt legislation was introduced in UK in the hope of reducing.

Similar presentations


Presentation on theme: "Regression with ARMA Errors. Example: Seat-belt legislation Story: In February 1983 seat-belt legislation was introduced in UK in the hope of reducing."— Presentation transcript:

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: Y t, t = 1,…,120 : the number of monthly deaths and serious injuries on UK roads for 10 years beginning in January 1975 (SBL.TSM) f t, t = 1,…,120 : indicator variable showing whether these is this law at time t. f t =0 for 1 ≤ t ≤ 98, f t =1 for 99 ≤ t ≤ 120 (SBLIN.TSM) Model: Y t = a + b f t + W t 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.

4

5 2. try OLS regression Assume W t ~ 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 W t ~ 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) =.16211443E+04 t^0 -.29944868E+03 f(t) ARMA Model: W(t) = Z(t) WN Variance = 1.000000 Coeff Value Std Error 0.16211443E+04.10153462 1 -.29944868E+03.23192141

8 In R > summary(lm(SBL ~ SBLIN)) Call: lm(formula = SBL ~ SBLIN) Residuals: Min 1Q Median 3Q Max -312.14 -162.39 -68.14 104.97 652.86 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1621.14 22.83 71.004 < 2e-16 *** SBLIN -299.45 52.15 -5.742 7.41e-08 *** --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: 224.9 on 118 degrees of freedom Multiple R-Squared: 0.2184, Adjusted R-squared: 0.2118 F-statistic: 32.97 on 1 and 118 DF, p-value: 7.411e-08

9 3. check residues W t Is the assumption W t ~ WN(0, σ 2 ) correct? Check residue plot and ACF/PACF =>seasonal component with period 12

10 4. Deseasonalizing Differencing: Y t = a + b f t + W t => M t = Y t – Y t-12 We get : M t = b g t + N t, t=13, …, 120 g t =1 for 99 ≤ t ≤ 110, g t =0 otherwise; N t = W t – W t-12 (In ITSM: Transform > Difference, input 12) Perform OLS regression of M t (SBLD.TSM) on g t (SBLDIN.TSM) without intercept term. In ITSM: Trend Function: L(t) = -.34691667E+03 g(t) ARMA Model: N(t) = Z(t), WN Variance = 1.000000 Coeff Value Std Error 1 -.34691667E+03.28867513 In R: (summary(lm(SBLD ~ 0+SBLDIN))) Coefficients: Estimate Std. Error t value Pr(>|t|) SBLDIN -346.9 40.6 -8.545 9.76e-14 ***

11 5. check residues N t Is the assumption N t ~ WN(0, θ 2 ) correct?

12 6. Fit ARMA(p,q) model for N t 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) = -.34691667E+03 g(t) ARMA Model: N(t) = Z(t) +.2189 Z(t-1) +.09762 Z(t-2) +.03093 Z(t-3) +.06447 Z(t-4) +.06878 Z(t-5) +.1109 Z(t-6) +.08120 Z(t-7) +.05650 Z(t-8) +.09192 Z(t-9) -.02828 Z(t-10) +.1826 Z(t-11) -.6267 Z(t-12) WN Variance =.125967E+05 MA Coefficients.218866.097620.030935.064468.068780.110918.081204.056495.091917 -.028275.182628 -.626664 Standard Error of MA Coefficients.074987.075880.076411.075956.076014.075901.075901.076014.075956.076411.075880.074987 (Residual SS)/N =.125967E+05 AICC =.136720E+04 AICC =.136984E+04 (Corrected for regression) BIC =.135676E+04 -2Log(Likelihood) =.133733E+04 Accuracy parameter =.100000E-08 Number of iterations = 1 Number of function evaluations = 239136 Uncertain minimum.

14 7. so N t is not white noise, we shall improve out previous estimate of b by recursion Step1. by OLS => fit ARMA(p,q) to N t, we improved our knowledge about N t : white noise => MA(12) Step2. with this new knowledge of N t, we can go back to improve the estimate of b by GLS using the new Γ=E(N T N). => Step3. compute new residue N t 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 N t, the model in the Regression estimates window is automatically updated to: –M(t) = L(t) + N(t) L(t) = - 0.32844534E+03 g(t) Press MLE button for a new round of iteration Finally we arrive at the model: M t = b g t + N t,, b=-328.45, SE(b) = 49.41 N(t) = Z(t) +.2189 Z(t-1) +.09762 Z(t-2) +.03093 Z(t-3) +.06447 Z(t-4) +.06878 Z(t-5) +.1109 Z(t-6) +.08120 Z(t-7) +.05650 Z(t-8) +.09192 Z(t-9) -.02828 Z(t-10) +.1826 Z(t-11) -.6267 Z(t-12) Z(t) ~ WN(0, 12581)

16 Conclusion M t = b g t + N t,, b=-328.45, SE(b) = 49.41 => b + 1.96 * SE(b) < 0 =>So b is significantly negative => the law has good effect To Do: Regression > Show Fit


Download ppt "Regression with ARMA Errors. Example: Seat-belt legislation Story: In February 1983 seat-belt legislation was introduced in UK in the hope of reducing."

Similar presentations


Ads by Google