Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 29 Dec 2010 10:28:06 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/29/t12936183503bzy9ufr8zsgmc7.htm/, Retrieved Fri, 03 May 2024 08:03:26 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116682, Retrieved Fri, 03 May 2024 08:03:26 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact112
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2010-12-21 14:17:43] [14bb7b0a8b81eed6207eeab240457b45]
-   PD  [ARIMA Forecasting] [] [2010-12-21 14:25:46] [14bb7b0a8b81eed6207eeab240457b45]
-   P       [ARIMA Forecasting] [ARIMA extrapolati...] [2010-12-29 10:28:06] [186d70462ffc26ec970915be294cb975] [Current]
Feedback Forum

Post a new message
Dataseries X:
1775
2197
2920
4240
5415
6136
6719
6234
7152
3646
2165
2803
1615
2350
3350
3536
5834
6767
5993
7276
5641
3477
2247
2466
1567
2237
2598
3729
5715
5776
5852
6878
5488
3583
2054
2282
1552
2261
2446
3519
5161
5085
5711
6057
5224
3363
1899
2115
1491
2061
2419
3430
4778
4862
6176
5664
5529
3418
1941
2402
1579
2146
2462
3695
4831
5134
6250
5760
6249
2917
1741
2359
1511
2059
2635
2867
4403
5720
4502
5749
5627
2846
1762
2429
1169
2154
2249
2687
4359
5382
4459
6398
4596
3024
1887
2070
1351
2218
2461
3028
4784
4975
4607
6249
4809
3157
1910
2228
1594
2467
2222
3607
4685
4962
5770
5480
5000
3228
1993
2288
1588
2105
2191
3591
4668
4885
5822
5599
5340
3082
2010
2301




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116682&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116682&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116682&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[120])
1082228-------
1091594-------
1102467-------
1112222-------
1123607-------
1134685-------
1144962-------
1155770-------
1165480-------
1175000-------
1183228-------
1191993-------
1202288-------
12115881502.29141300.78791735.00960.235200.21990
12221052363.72012039.72842739.17490.088410.29490.6537
12321912409.19682067.19672807.7780.14160.93270.82140.7244
12435913349.87412818.12723981.95530.22730.99980.21260.9995
12546684823.32154055.70485736.22370.36940.99590.61681
12648855237.53524374.27816271.15490.25190.85990.69931
12758225338.58674434.57416426.88720.1920.7930.21861
12855996022.9855002.9787250.95110.24930.62580.80691
12953405161.63784266.4236244.69360.37340.21430.61511
13030823216.35372653.6283898.41030.349700.48670.9962
13120101953.92671611.45882369.17610.395600.42680.0574
13223012300.19311891.43582797.28690.49870.87370.51920.5192

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast \tabularnewline
time & Y[t] & F[t] & 95% LB & 95% UB & p-value(H0: Y[t] = F[t]) & P(F[t]>Y[t-1]) & P(F[t]>Y[t-s]) & P(F[t]>Y[120]) \tabularnewline
108 & 2228 & - & - & - & - & - & - & - \tabularnewline
109 & 1594 & - & - & - & - & - & - & - \tabularnewline
110 & 2467 & - & - & - & - & - & - & - \tabularnewline
111 & 2222 & - & - & - & - & - & - & - \tabularnewline
112 & 3607 & - & - & - & - & - & - & - \tabularnewline
113 & 4685 & - & - & - & - & - & - & - \tabularnewline
114 & 4962 & - & - & - & - & - & - & - \tabularnewline
115 & 5770 & - & - & - & - & - & - & - \tabularnewline
116 & 5480 & - & - & - & - & - & - & - \tabularnewline
117 & 5000 & - & - & - & - & - & - & - \tabularnewline
118 & 3228 & - & - & - & - & - & - & - \tabularnewline
119 & 1993 & - & - & - & - & - & - & - \tabularnewline
120 & 2288 & - & - & - & - & - & - & - \tabularnewline
121 & 1588 & 1502.2914 & 1300.7879 & 1735.0096 & 0.2352 & 0 & 0.2199 & 0 \tabularnewline
122 & 2105 & 2363.7201 & 2039.7284 & 2739.1749 & 0.0884 & 1 & 0.2949 & 0.6537 \tabularnewline
123 & 2191 & 2409.1968 & 2067.1967 & 2807.778 & 0.1416 & 0.9327 & 0.8214 & 0.7244 \tabularnewline
124 & 3591 & 3349.8741 & 2818.1272 & 3981.9553 & 0.2273 & 0.9998 & 0.2126 & 0.9995 \tabularnewline
125 & 4668 & 4823.3215 & 4055.7048 & 5736.2237 & 0.3694 & 0.9959 & 0.6168 & 1 \tabularnewline
126 & 4885 & 5237.5352 & 4374.2781 & 6271.1549 & 0.2519 & 0.8599 & 0.6993 & 1 \tabularnewline
127 & 5822 & 5338.5867 & 4434.5741 & 6426.8872 & 0.192 & 0.793 & 0.2186 & 1 \tabularnewline
128 & 5599 & 6022.985 & 5002.978 & 7250.9511 & 0.2493 & 0.6258 & 0.8069 & 1 \tabularnewline
129 & 5340 & 5161.6378 & 4266.423 & 6244.6936 & 0.3734 & 0.2143 & 0.6151 & 1 \tabularnewline
130 & 3082 & 3216.3537 & 2653.628 & 3898.4103 & 0.3497 & 0 & 0.4867 & 0.9962 \tabularnewline
131 & 2010 & 1953.9267 & 1611.4588 & 2369.1761 & 0.3956 & 0 & 0.4268 & 0.0574 \tabularnewline
132 & 2301 & 2300.1931 & 1891.4358 & 2797.2869 & 0.4987 & 0.8737 & 0.5192 & 0.5192 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116682&T=1

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast[/C][/ROW]
[ROW][C]time[/C][C]Y[t][/C][C]F[t][/C][C]95% LB[/C][C]95% UB[/C][C]p-value(H0: Y[t] = F[t])[/C][C]P(F[t]>Y[t-1])[/C][C]P(F[t]>Y[t-s])[/C][C]P(F[t]>Y[120])[/C][/ROW]
[ROW][C]108[/C][C]2228[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]1594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]2467[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]2222[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]3607[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]4685[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]4962[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]5770[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]5480[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]5000[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]3228[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]1993[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]2288[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]1588[/C][C]1502.2914[/C][C]1300.7879[/C][C]1735.0096[/C][C]0.2352[/C][C]0[/C][C]0.2199[/C][C]0[/C][/ROW]
[ROW][C]122[/C][C]2105[/C][C]2363.7201[/C][C]2039.7284[/C][C]2739.1749[/C][C]0.0884[/C][C]1[/C][C]0.2949[/C][C]0.6537[/C][/ROW]
[ROW][C]123[/C][C]2191[/C][C]2409.1968[/C][C]2067.1967[/C][C]2807.778[/C][C]0.1416[/C][C]0.9327[/C][C]0.8214[/C][C]0.7244[/C][/ROW]
[ROW][C]124[/C][C]3591[/C][C]3349.8741[/C][C]2818.1272[/C][C]3981.9553[/C][C]0.2273[/C][C]0.9998[/C][C]0.2126[/C][C]0.9995[/C][/ROW]
[ROW][C]125[/C][C]4668[/C][C]4823.3215[/C][C]4055.7048[/C][C]5736.2237[/C][C]0.3694[/C][C]0.9959[/C][C]0.6168[/C][C]1[/C][/ROW]
[ROW][C]126[/C][C]4885[/C][C]5237.5352[/C][C]4374.2781[/C][C]6271.1549[/C][C]0.2519[/C][C]0.8599[/C][C]0.6993[/C][C]1[/C][/ROW]
[ROW][C]127[/C][C]5822[/C][C]5338.5867[/C][C]4434.5741[/C][C]6426.8872[/C][C]0.192[/C][C]0.793[/C][C]0.2186[/C][C]1[/C][/ROW]
[ROW][C]128[/C][C]5599[/C][C]6022.985[/C][C]5002.978[/C][C]7250.9511[/C][C]0.2493[/C][C]0.6258[/C][C]0.8069[/C][C]1[/C][/ROW]
[ROW][C]129[/C][C]5340[/C][C]5161.6378[/C][C]4266.423[/C][C]6244.6936[/C][C]0.3734[/C][C]0.2143[/C][C]0.6151[/C][C]1[/C][/ROW]
[ROW][C]130[/C][C]3082[/C][C]3216.3537[/C][C]2653.628[/C][C]3898.4103[/C][C]0.3497[/C][C]0[/C][C]0.4867[/C][C]0.9962[/C][/ROW]
[ROW][C]131[/C][C]2010[/C][C]1953.9267[/C][C]1611.4588[/C][C]2369.1761[/C][C]0.3956[/C][C]0[/C][C]0.4268[/C][C]0.0574[/C][/ROW]
[ROW][C]132[/C][C]2301[/C][C]2300.1931[/C][C]1891.4358[/C][C]2797.2869[/C][C]0.4987[/C][C]0.8737[/C][C]0.5192[/C][C]0.5192[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116682&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116682&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[120])
1082228-------
1091594-------
1102467-------
1112222-------
1123607-------
1134685-------
1144962-------
1155770-------
1165480-------
1175000-------
1183228-------
1191993-------
1202288-------
12115881502.29141300.78791735.00960.235200.21990
12221052363.72012039.72842739.17490.088410.29490.6537
12321912409.19682067.19672807.7780.14160.93270.82140.7244
12435913349.87412818.12723981.95530.22730.99980.21260.9995
12546684823.32154055.70485736.22370.36940.99590.61681
12648855237.53524374.27816271.15490.25190.85990.69931
12758225338.58674434.57416426.88720.1920.7930.21861
12855996022.9855002.9787250.95110.24930.62580.80691
12953405161.63784266.4236244.69360.37340.21430.61511
13030823216.35372653.6283898.41030.349700.48670.9962
13120101953.92671611.45882369.17610.395600.42680.0574
13223012300.19311891.43582797.28690.49870.87370.51920.5192







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1210.0790.057107345.962300
1220.081-0.10950.083366936.105837141.034192.7201
1230.0844-0.09060.085747609.846740630.6382201.5704
1240.09630.0720.082358141.686645008.4003212.1518
1250.0966-0.03220.072324124.765240831.6733202.0685
1260.1007-0.06730.0714124281.094654739.9102233.9656
1270.1040.09060.0742233688.427780303.9841283.3796
1280.104-0.07040.0737179763.302792736.3989304.5265
1290.10710.03460.069331813.085885967.1419293.2015
1300.1082-0.04180.066618050.906879175.5184281.3814
1310.10840.02870.06313144.211272263.5814268.8189
1320.11034e-040.05790.65166241.6705257.3746

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
121 & 0.079 & 0.0571 & 0 & 7345.9623 & 0 & 0 \tabularnewline
122 & 0.081 & -0.1095 & 0.0833 & 66936.1058 & 37141.034 & 192.7201 \tabularnewline
123 & 0.0844 & -0.0906 & 0.0857 & 47609.8467 & 40630.6382 & 201.5704 \tabularnewline
124 & 0.0963 & 0.072 & 0.0823 & 58141.6866 & 45008.4003 & 212.1518 \tabularnewline
125 & 0.0966 & -0.0322 & 0.0723 & 24124.7652 & 40831.6733 & 202.0685 \tabularnewline
126 & 0.1007 & -0.0673 & 0.0714 & 124281.0946 & 54739.9102 & 233.9656 \tabularnewline
127 & 0.104 & 0.0906 & 0.0742 & 233688.4277 & 80303.9841 & 283.3796 \tabularnewline
128 & 0.104 & -0.0704 & 0.0737 & 179763.3027 & 92736.3989 & 304.5265 \tabularnewline
129 & 0.1071 & 0.0346 & 0.0693 & 31813.0858 & 85967.1419 & 293.2015 \tabularnewline
130 & 0.1082 & -0.0418 & 0.0666 & 18050.9068 & 79175.5184 & 281.3814 \tabularnewline
131 & 0.1084 & 0.0287 & 0.0631 & 3144.2112 & 72263.5814 & 268.8189 \tabularnewline
132 & 0.1103 & 4e-04 & 0.0579 & 0.651 & 66241.6705 & 257.3746 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116682&T=2

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast Performance[/C][/ROW]
[ROW][C]time[/C][C]% S.E.[/C][C]PE[/C][C]MAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][/ROW]
[ROW][C]121[/C][C]0.079[/C][C]0.0571[/C][C]0[/C][C]7345.9623[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]122[/C][C]0.081[/C][C]-0.1095[/C][C]0.0833[/C][C]66936.1058[/C][C]37141.034[/C][C]192.7201[/C][/ROW]
[ROW][C]123[/C][C]0.0844[/C][C]-0.0906[/C][C]0.0857[/C][C]47609.8467[/C][C]40630.6382[/C][C]201.5704[/C][/ROW]
[ROW][C]124[/C][C]0.0963[/C][C]0.072[/C][C]0.0823[/C][C]58141.6866[/C][C]45008.4003[/C][C]212.1518[/C][/ROW]
[ROW][C]125[/C][C]0.0966[/C][C]-0.0322[/C][C]0.0723[/C][C]24124.7652[/C][C]40831.6733[/C][C]202.0685[/C][/ROW]
[ROW][C]126[/C][C]0.1007[/C][C]-0.0673[/C][C]0.0714[/C][C]124281.0946[/C][C]54739.9102[/C][C]233.9656[/C][/ROW]
[ROW][C]127[/C][C]0.104[/C][C]0.0906[/C][C]0.0742[/C][C]233688.4277[/C][C]80303.9841[/C][C]283.3796[/C][/ROW]
[ROW][C]128[/C][C]0.104[/C][C]-0.0704[/C][C]0.0737[/C][C]179763.3027[/C][C]92736.3989[/C][C]304.5265[/C][/ROW]
[ROW][C]129[/C][C]0.1071[/C][C]0.0346[/C][C]0.0693[/C][C]31813.0858[/C][C]85967.1419[/C][C]293.2015[/C][/ROW]
[ROW][C]130[/C][C]0.1082[/C][C]-0.0418[/C][C]0.0666[/C][C]18050.9068[/C][C]79175.5184[/C][C]281.3814[/C][/ROW]
[ROW][C]131[/C][C]0.1084[/C][C]0.0287[/C][C]0.0631[/C][C]3144.2112[/C][C]72263.5814[/C][C]268.8189[/C][/ROW]
[ROW][C]132[/C][C]0.1103[/C][C]4e-04[/C][C]0.0579[/C][C]0.651[/C][C]66241.6705[/C][C]257.3746[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116682&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116682&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1210.0790.057107345.962300
1220.081-0.10950.083366936.105837141.034192.7201
1230.0844-0.09060.085747609.846740630.6382201.5704
1240.09630.0720.082358141.686645008.4003212.1518
1250.0966-0.03220.072324124.765240831.6733202.0685
1260.1007-0.06730.0714124281.094654739.9102233.9656
1270.1040.09060.0742233688.427780303.9841283.3796
1280.104-0.07040.0737179763.302792736.3989304.5265
1290.10710.03460.069331813.085885967.1419293.2015
1300.1082-0.04180.066618050.906879175.5184281.3814
1310.10840.02870.06313144.211272263.5814268.8189
1320.11034e-040.05790.65166241.6705257.3746



Parameters (Session):
par1 = 1 ; par2 = 0 ; par3 = 1 ; par4 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = 0.0 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
R code (references can be found in the software module):
par1 <- as.numeric(par1) #cut off periods
par2 <- as.numeric(par2) #lambda
par3 <- as.numeric(par3) #degree of non-seasonal differencing
par4 <- as.numeric(par4) #degree of seasonal differencing
par5 <- as.numeric(par5) #seasonal period
par6 <- as.numeric(par6) #p
par7 <- as.numeric(par7) #q
par8 <- as.numeric(par8) #P
par9 <- as.numeric(par9) #Q
if (par10 == 'TRUE') par10 <- TRUE
if (par10 == 'FALSE') par10 <- FALSE
if (par2 == 0) x <- log(x)
if (par2 != 0) x <- x^par2
lx <- length(x)
first <- lx - 2*par1
nx <- lx - par1
nx1 <- nx + 1
fx <- lx - nx
if (fx < 1) {
fx <- par5
nx1 <- lx + fx - 1
first <- lx - 2*fx
}
first <- 1
if (fx < 3) fx <- round(lx/10,0)
(arima.out <- arima(x[1:nx], order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5), include.mean=par10, method='ML'))
(forecast <- predict(arima.out,par1))
(lb <- forecast$pred - 1.96 * forecast$se)
(ub <- forecast$pred + 1.96 * forecast$se)
if (par2 == 0) {
x <- exp(x)
forecast$pred <- exp(forecast$pred)
lb <- exp(lb)
ub <- exp(ub)
}
if (par2 != 0) {
x <- x^(1/par2)
forecast$pred <- forecast$pred^(1/par2)
lb <- lb^(1/par2)
ub <- ub^(1/par2)
}
if (par2 < 0) {
olb <- lb
lb <- ub
ub <- olb
}
(actandfor <- c(x[1:nx], forecast$pred))
(perc.se <- (ub-forecast$pred)/1.96/forecast$pred)
bitmap(file='test1.png')
opar <- par(mar=c(4,4,2,2),las=1)
ylim <- c( min(x[first:nx],lb), max(x[first:nx],ub))
plot(x,ylim=ylim,type='n',xlim=c(first,lx))
usr <- par('usr')
rect(usr[1],usr[3],nx+1,usr[4],border=NA,col='lemonchiffon')
rect(nx1,usr[3],usr[2],usr[4],border=NA,col='lavender')
abline(h= (-3:3)*2 , col ='gray', lty =3)
polygon( c(nx1:lx,lx:nx1), c(lb,rev(ub)), col = 'orange', lty=2,border=NA)
lines(nx1:lx, lb , lty=2)
lines(nx1:lx, ub , lty=2)
lines(x, lwd=2)
lines(nx1:lx, forecast$pred , lwd=2 , col ='white')
box()
par(opar)
dev.off()
prob.dec <- array(NA, dim=fx)
prob.sdec <- array(NA, dim=fx)
prob.ldec <- array(NA, dim=fx)
prob.pval <- array(NA, dim=fx)
perf.pe <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- array(0, dim=fx)
perf.rmse <- array(0, dim=fx)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / forecast$pred[i]
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
prob.dec[i] = pnorm((x[nx+i-1] - forecast$pred[i]) / locSD)
prob.sdec[i] = pnorm((x[nx+i-par5] - forecast$pred[i]) / locSD)
prob.ldec[i] = pnorm((x[nx] - forecast$pred[i]) / locSD)
prob.pval[i] = pnorm(abs(x[nx+i] - forecast$pred[i]) / locSD)
}
perf.mape[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
bitmap(file='test2.png')
plot(forecast$pred, pch=19, type='b',main='ARIMA Extrapolation Forecast', ylab='Forecast and 95% CI', xlab='time',ylim=c(min(lb),max(ub)))
dum <- forecast$pred
dum[1:par1] <- x[(nx+1):lx]
lines(dum, lty=1)
lines(ub,lty=3)
lines(lb,lty=3)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast',9,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'Y[t]',1,header=TRUE)
a<-table.element(a,'F[t]',1,header=TRUE)
a<-table.element(a,'95% LB',1,header=TRUE)
a<-table.element(a,'95% UB',1,header=TRUE)
a<-table.element(a,'p-value
(H0: Y[t] = F[t])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-1])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-s])',1,header=TRUE)
mylab <- paste('P(F[t]>Y[',nx,sep='')
mylab <- paste(mylab,'])',sep='')
a<-table.element(a,mylab,1,header=TRUE)
a<-table.row.end(a)
for (i in (nx-par5):nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.row.end(a)
}
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(x[nx+i],4))
a<-table.element(a,round(forecast$pred[i],4))
a<-table.element(a,round(lb[i],4))
a<-table.element(a,round(ub[i],4))
a<-table.element(a,round((1-prob.pval[i]),4))
a<-table.element(a,round((1-prob.dec[i]),4))
a<-table.element(a,round((1-prob.sdec[i]),4))
a<-table.element(a,round((1-prob.ldec[i]),4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast Performance',7,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'% S.E.',1,header=TRUE)
a<-table.element(a,'PE',1,header=TRUE)
a<-table.element(a,'MAPE',1,header=TRUE)
a<-table.element(a,'Sq.E',1,header=TRUE)
a<-table.element(a,'MSE',1,header=TRUE)
a<-table.element(a,'RMSE',1,header=TRUE)
a<-table.row.end(a)
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(perc.se[i],4))
a<-table.element(a,round(perf.pe[i],4))
a<-table.element(a,round(perf.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[i],4))
a<-table.element(a,round(perf.rmse[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')