UKDriverDeaths             package:stats             R Documentation

_R_o_a_d _C_a_s_u_a_l_t_i_e_s _i_n _G_r_e_a_t _B_r_i_t_a_i_n _1_9_6_9-_8_4

_D_e_s_c_r_i_p_t_i_o_n:

     'UKDriverDeaths' is a time series giving the monthly totals of car
     drivers in Great Britain killed or seriously injured Jan 1969 to
     Dec 1984. Compulsory wearing of seat belts was introduced on 31
     Jan 1983.

     'Seatbelts' is more information on the same problem.

_U_s_a_g_e:

     data(UKDriverDeaths)
     data(Seatbelts)

_F_o_r_m_a_t:

     'Seatbelts' is a multiple time series, with columns

     '_D_r_i_v_e_r_s_K_i_l_l_e_d' car drivers killed.

     '_d_r_i_v_e_r_s' same as 'UKDriverDeaths'.

     '_f_r_o_n_t' front-seat passengers killed or seriously injured.

     '_r_e_a_r' rear-seat passengers killed or seriously injured.

     '_k_m_s' distance driven.

     '_P_e_t_r_o_l_P_r_i_c_e' petrol price.

     '_V_a_n_K_i_l_l_e_d' number of van ('light goods vehicle') drivers.

     '_l_a_w' 0/1: was the law in effect that month?

_S_o_u_r_c_e:

     Harvey, A.C. (1989) _Forecasting, Structural Time Series Models
     and the Kalman Filter._ Cambridge University Press, pp. 519-523.

     Durbin, J. and Koopman, S. J. (2001) _Time Series Analysis by
     State Space Methods._  Oxford University Press. <URL:
     http://www.ssfpack.com/dkbook/>

_R_e_f_e_r_e_n_c_e_s:

     Harvey, A. C. and Durbin, J. (1986) The effects of seat belt
     legislation on British road casualties: A case study in structural
     time series modelling. _Journal of the Royal Statistical Society_
     series B, *149*, 187-227.

_E_x_a_m_p_l_e_s:

     data(UKDriverDeaths)
     ## work with pre-seatbelt period to identify a model, use logs
     work <- window(log10(UKDriverDeaths), end = 1982+11/12)
     par(mfrow = c(3,1))
     plot(work); acf(work); pacf(work)
     par(mfrow = c(1,1))
     (fit <- arima(work, c(1,0,0), seasonal = list(order= c(1,0,0))))
     z <- predict(fit, n.ahead = 24)
     ts.plot(log10(UKDriverDeaths), z$pred, z$pred+2*z$se, z$pred-2*z$se,
             lty = c(1,3,2,2), col = c("black", "red", "blue", "blue"))

     ## now see the effect of the explanatory variables
     data(Seatbelts)
     X <- Seatbelts[, c("kms", "PetrolPrice", "law")]
     X[, 1] <- log10(X[, 1]) - 4
     arima(log10(Seatbelts[, "drivers"]), c(1,0,0),
           seasonal = list(order= c(1,0,0)), xreg = X)

