/* This data set comes from the book by Stephen A. DeLurgio "Forecasting Principles and Applications" (Irwin, 1998), p. 531. Henry Machler's Hideaway Orchids. Use this data to model the interventions associated with Mother's Day sales (days 38, 39, 40). Also the model is used to forecast 10 days in advance. */ data orchids; input DAY DATE SALES; datalines; 1 40181 112.41 2 40281 188.24 3 40381 162.91 4 40481 326.25 5 40581 316.4 6 40681 157.34 7 40781 168.01 8 40881 99.12 9 40981 216.66 10 41081 209.14 11 41181 482.7 12 41281 358.34 13 41381 184.13 14 41481 126.35 15 41581 141.5 16 41681 267.33 17 41781 332.13 18 41881 475.52 19 41981 383.44 20 42081 274.23 21 42181 87.41 22 42281 234.22 23 42381 293.52 24 42481 260.67 25 42581 237.17 26 42681 220.4 27 42781 197.88 28 42881 123.87 29 42981 264.24 30 43081 230.22 31 50181 164.94 32 50281 237.85 33 50381 222.69 34 50481 116.79 35 50581 189.41 36 50681 295.77 37 50781 129.47 38 50881 742.6 39 50981 1057.96 40 51081 402.77 41 51181 94.68 42 51281 152.65 43 51381 239.45 44 51481 132.9 45 51581 79.13 46 51681 476.48 47 51781 155.92 48 51881 166.06 49 51981 100.85 50 52081 96.3 51 52181 131.53 52 52281 136.83 53 52381 559.31 54 52481 183.84 55 52581 237.67 56 52681 139.08 57 52781 119.21 58 52881 131.74 59 52981 199.46 60 53081 418.7 61 53181 230.41 62 60181 191.66 63 60281 100.25 64 60381 154.68 65 60481 259.4 66 60581 121.98 67 60681 277.62 68 60781 234.29 69 60881 162.54 70 60981 50.58 71 61081 98.86 72 61181 193.48 73 61281 94.61 74 61381 379.06 75 61481 244.44 76 61581 134.68 77 61681 39.82 78 61781 77.56 79 61881 95.76 80 61981 102.13 81 62081 355.86 82 62181 163.32 83 62281 56.84 84 62381 125.48 85 62481 239.45 86 62581 132.9 87 62681 79.13 88 62781 476.48 89 62881 155.92 90 62981 166.06 91 63081 100.85 92 70181 214.24 93 70281 102.46 94 70381 85.69 95 70481 415.19 96 70581 234.37 97 70681 136.52 98 70781 252.57 99 70881 299.92 100 70981 181.15 101 71081 85.02 102 71181 504.08 103 71281 228.59 104 71381 126.61 105 71481 277.23 106 71581 283.9 107 71681 167.73 108 71781 119.43 109 71881 510.22 110 71981 319.52 111 72081 37.61 112 72181 300.53 113 72281 263 114 72381 186.94 115 72481 126.42 116 72581 508.94 117 72681 370.61 118 72781 74.04 119 72881 229.73 120 72981 164.41 121 73081 278.9 122 73181 145.96 123 80181 481.83 124 80281 431.9 125 80381 76.56 126 80481 200.61 127 80581 172.04 128 80681 246.33 129 80781 178.73 130 80881 397.09 131 80981 410.99 132 81081 162.69 133 81181 123.29 134 81281 254.95 135 81381 239.77 136 81481 106.71 137 81581 506.05 138 81681 402.9 139 81781 250.49 140 81881 37.07 ; run; /* Use the post-intervention data (obs. 41 - 140) to determine the Box-Jenkins model for the noise of this data. The autocorrelaton function produced here is even more suggestive of the "gap" AR(7) model: y(t) = phi0 + phi1*y(t-7) + a(t). When using all of the data, including the Mother's day intervention at obs. 38, 39, and 40 the autocorrelation function gets somewhat "distorted" (contaminated) by the inclusion of the 3-day intervention. */ data orchids2; set orchids; if _n_ > 40; run; proc arima data = orchids2; identify var = sales; run;