Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 20 Dec 2007 15:18:11 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2007/Dec/20/t1198188059u6s2lwvj7o4ga8k.htm/, Retrieved Mon, 29 Apr 2024 11:49:24 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4770, Retrieved Mon, 29 Apr 2024 11:49:24 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact176
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper forecast wi...] [2007-12-20 22:18:11] [bd0e3b74339db15b9ec76abfe0d5b55e] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.0137
0.9834
0.9643
0.947
0.906
0.9492
0.9397
0.9041
0.8721
0.8552
0.8564
0.8973
0.9383
0.9217
0.9095
0.892
0.8742
0.8532
0.8607
0.9005
0.9111
0.9059
0.8883
0.8924
0.8833
0.87
0.8758
0.8858
0.917
0.9554
0.9922
0.9778
0.9808
0.9811
1.0014
1.0183
1.0622
1.0773
1.0807
1.0848
1.1582
1.1663
1.1372
1.1139
1.1222
1.1692
1.1702
1.2286
1.2613
1.2646
1.2262
1.1985
1.2007
1.2138
1.2266
1.2176
1.2218
1.249
1.2991
1.3408
1.3119
1.3014
1.3201
1.2938
1.2694
1.2165
1.2037
1.2292
1.2256
1.2015
1.1786
1.1856




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\begin{tabular}{lllllllll}
\hline
Summary of compuational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4770&T=0

[TABLE]
[ROW][C]Summary of compuational 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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4770&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4770&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[60])
481.2286-------
491.2613-------
501.2646-------
511.2262-------
521.1985-------
531.2007-------
541.2138-------
551.2266-------
561.2176-------
571.2218-------
581.249-------
591.2991-------
601.3408-------
611.31191.35081.29151.41220.10720.62520.99790.6252
621.30141.35081.25091.4570.18090.76360.94420.5733
631.32011.35071.22321.48860.33180.75820.96160.556
641.29381.35061.2011.51480.24870.64220.96530.5467
651.26941.35061.18211.53780.19750.72410.94180.541
661.21651.35071.16551.55870.1030.77810.90140.5371
671.20371.35071.15051.57790.10230.87650.85790.5341
681.22921.35071.13671.59580.16570.88010.85640.5315
691.22561.35071.12391.61270.17470.81830.83250.5295
701.20151.35081.1121.62890.14640.81110.76340.528
711.17861.35091.10091.64450.1250.84080.63530.5269
721.18561.3511.09031.65940.14650.86350.52590.5259

\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[60]) \tabularnewline
48 & 1.2286 & - & - & - & - & - & - & - \tabularnewline
49 & 1.2613 & - & - & - & - & - & - & - \tabularnewline
50 & 1.2646 & - & - & - & - & - & - & - \tabularnewline
51 & 1.2262 & - & - & - & - & - & - & - \tabularnewline
52 & 1.1985 & - & - & - & - & - & - & - \tabularnewline
53 & 1.2007 & - & - & - & - & - & - & - \tabularnewline
54 & 1.2138 & - & - & - & - & - & - & - \tabularnewline
55 & 1.2266 & - & - & - & - & - & - & - \tabularnewline
56 & 1.2176 & - & - & - & - & - & - & - \tabularnewline
57 & 1.2218 & - & - & - & - & - & - & - \tabularnewline
58 & 1.249 & - & - & - & - & - & - & - \tabularnewline
59 & 1.2991 & - & - & - & - & - & - & - \tabularnewline
60 & 1.3408 & - & - & - & - & - & - & - \tabularnewline
61 & 1.3119 & 1.3508 & 1.2915 & 1.4122 & 0.1072 & 0.6252 & 0.9979 & 0.6252 \tabularnewline
62 & 1.3014 & 1.3508 & 1.2509 & 1.457 & 0.1809 & 0.7636 & 0.9442 & 0.5733 \tabularnewline
63 & 1.3201 & 1.3507 & 1.2232 & 1.4886 & 0.3318 & 0.7582 & 0.9616 & 0.556 \tabularnewline
64 & 1.2938 & 1.3506 & 1.201 & 1.5148 & 0.2487 & 0.6422 & 0.9653 & 0.5467 \tabularnewline
65 & 1.2694 & 1.3506 & 1.1821 & 1.5378 & 0.1975 & 0.7241 & 0.9418 & 0.541 \tabularnewline
66 & 1.2165 & 1.3507 & 1.1655 & 1.5587 & 0.103 & 0.7781 & 0.9014 & 0.5371 \tabularnewline
67 & 1.2037 & 1.3507 & 1.1505 & 1.5779 & 0.1023 & 0.8765 & 0.8579 & 0.5341 \tabularnewline
68 & 1.2292 & 1.3507 & 1.1367 & 1.5958 & 0.1657 & 0.8801 & 0.8564 & 0.5315 \tabularnewline
69 & 1.2256 & 1.3507 & 1.1239 & 1.6127 & 0.1747 & 0.8183 & 0.8325 & 0.5295 \tabularnewline
70 & 1.2015 & 1.3508 & 1.112 & 1.6289 & 0.1464 & 0.8111 & 0.7634 & 0.528 \tabularnewline
71 & 1.1786 & 1.3509 & 1.1009 & 1.6445 & 0.125 & 0.8408 & 0.6353 & 0.5269 \tabularnewline
72 & 1.1856 & 1.351 & 1.0903 & 1.6594 & 0.1465 & 0.8635 & 0.5259 & 0.5259 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4770&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[60])[/C][/ROW]
[ROW][C]48[/C][C]1.2286[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1.2613[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]1.2646[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]1.2262[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]1.1985[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]1.2007[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]1.2138[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]1.2266[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]1.2176[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1.2218[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1.249[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]1.2991[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]1.3408[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]1.3119[/C][C]1.3508[/C][C]1.2915[/C][C]1.4122[/C][C]0.1072[/C][C]0.6252[/C][C]0.9979[/C][C]0.6252[/C][/ROW]
[ROW][C]62[/C][C]1.3014[/C][C]1.3508[/C][C]1.2509[/C][C]1.457[/C][C]0.1809[/C][C]0.7636[/C][C]0.9442[/C][C]0.5733[/C][/ROW]
[ROW][C]63[/C][C]1.3201[/C][C]1.3507[/C][C]1.2232[/C][C]1.4886[/C][C]0.3318[/C][C]0.7582[/C][C]0.9616[/C][C]0.556[/C][/ROW]
[ROW][C]64[/C][C]1.2938[/C][C]1.3506[/C][C]1.201[/C][C]1.5148[/C][C]0.2487[/C][C]0.6422[/C][C]0.9653[/C][C]0.5467[/C][/ROW]
[ROW][C]65[/C][C]1.2694[/C][C]1.3506[/C][C]1.1821[/C][C]1.5378[/C][C]0.1975[/C][C]0.7241[/C][C]0.9418[/C][C]0.541[/C][/ROW]
[ROW][C]66[/C][C]1.2165[/C][C]1.3507[/C][C]1.1655[/C][C]1.5587[/C][C]0.103[/C][C]0.7781[/C][C]0.9014[/C][C]0.5371[/C][/ROW]
[ROW][C]67[/C][C]1.2037[/C][C]1.3507[/C][C]1.1505[/C][C]1.5779[/C][C]0.1023[/C][C]0.8765[/C][C]0.8579[/C][C]0.5341[/C][/ROW]
[ROW][C]68[/C][C]1.2292[/C][C]1.3507[/C][C]1.1367[/C][C]1.5958[/C][C]0.1657[/C][C]0.8801[/C][C]0.8564[/C][C]0.5315[/C][/ROW]
[ROW][C]69[/C][C]1.2256[/C][C]1.3507[/C][C]1.1239[/C][C]1.6127[/C][C]0.1747[/C][C]0.8183[/C][C]0.8325[/C][C]0.5295[/C][/ROW]
[ROW][C]70[/C][C]1.2015[/C][C]1.3508[/C][C]1.112[/C][C]1.6289[/C][C]0.1464[/C][C]0.8111[/C][C]0.7634[/C][C]0.528[/C][/ROW]
[ROW][C]71[/C][C]1.1786[/C][C]1.3509[/C][C]1.1009[/C][C]1.6445[/C][C]0.125[/C][C]0.8408[/C][C]0.6353[/C][C]0.5269[/C][/ROW]
[ROW][C]72[/C][C]1.1856[/C][C]1.351[/C][C]1.0903[/C][C]1.6594[/C][C]0.1465[/C][C]0.8635[/C][C]0.5259[/C][C]0.5259[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4770&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4770&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[60])
481.2286-------
491.2613-------
501.2646-------
511.2262-------
521.1985-------
531.2007-------
541.2138-------
551.2266-------
561.2176-------
571.2218-------
581.249-------
591.2991-------
601.3408-------
611.31191.35081.29151.41220.10720.62520.99790.6252
621.30141.35081.25091.4570.18090.76360.94420.5733
631.32011.35071.22321.48860.33180.75820.96160.556
641.29381.35061.2011.51480.24870.64220.96530.5467
651.26941.35061.18211.53780.19750.72410.94180.541
661.21651.35071.16551.55870.1030.77810.90140.5371
671.20371.35071.15051.57790.10230.87650.85790.5341
681.22921.35071.13671.59580.16570.88010.85640.5315
691.22561.35071.12391.61270.17470.81830.83250.5295
701.20151.35081.1121.62890.14640.81110.76340.528
711.17861.35091.10091.64450.1250.84080.63530.5269
721.18561.3511.09031.65940.14650.86350.52590.5259







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0232-0.02880.00240.00151e-040.0112
620.0401-0.03660.0030.00242e-040.0143
630.0521-0.02270.00199e-041e-040.0088
640.062-0.04210.00350.00323e-040.0164
650.0707-0.06010.0050.00665e-040.0235
660.0786-0.09930.00830.0180.00150.0387
670.0858-0.10880.00910.02160.00180.0424
680.0926-0.08990.00750.01480.00120.0351
690.099-0.09260.00770.01560.00130.0361
700.1051-0.11050.00920.02230.00190.0431
710.1109-0.12760.01060.02970.00250.0497
720.1165-0.12240.01020.02740.00230.0478

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0232 & -0.0288 & 0.0024 & 0.0015 & 1e-04 & 0.0112 \tabularnewline
62 & 0.0401 & -0.0366 & 0.003 & 0.0024 & 2e-04 & 0.0143 \tabularnewline
63 & 0.0521 & -0.0227 & 0.0019 & 9e-04 & 1e-04 & 0.0088 \tabularnewline
64 & 0.062 & -0.0421 & 0.0035 & 0.0032 & 3e-04 & 0.0164 \tabularnewline
65 & 0.0707 & -0.0601 & 0.005 & 0.0066 & 5e-04 & 0.0235 \tabularnewline
66 & 0.0786 & -0.0993 & 0.0083 & 0.018 & 0.0015 & 0.0387 \tabularnewline
67 & 0.0858 & -0.1088 & 0.0091 & 0.0216 & 0.0018 & 0.0424 \tabularnewline
68 & 0.0926 & -0.0899 & 0.0075 & 0.0148 & 0.0012 & 0.0351 \tabularnewline
69 & 0.099 & -0.0926 & 0.0077 & 0.0156 & 0.0013 & 0.0361 \tabularnewline
70 & 0.1051 & -0.1105 & 0.0092 & 0.0223 & 0.0019 & 0.0431 \tabularnewline
71 & 0.1109 & -0.1276 & 0.0106 & 0.0297 & 0.0025 & 0.0497 \tabularnewline
72 & 0.1165 & -0.1224 & 0.0102 & 0.0274 & 0.0023 & 0.0478 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4770&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]61[/C][C]0.0232[/C][C]-0.0288[/C][C]0.0024[/C][C]0.0015[/C][C]1e-04[/C][C]0.0112[/C][/ROW]
[ROW][C]62[/C][C]0.0401[/C][C]-0.0366[/C][C]0.003[/C][C]0.0024[/C][C]2e-04[/C][C]0.0143[/C][/ROW]
[ROW][C]63[/C][C]0.0521[/C][C]-0.0227[/C][C]0.0019[/C][C]9e-04[/C][C]1e-04[/C][C]0.0088[/C][/ROW]
[ROW][C]64[/C][C]0.062[/C][C]-0.0421[/C][C]0.0035[/C][C]0.0032[/C][C]3e-04[/C][C]0.0164[/C][/ROW]
[ROW][C]65[/C][C]0.0707[/C][C]-0.0601[/C][C]0.005[/C][C]0.0066[/C][C]5e-04[/C][C]0.0235[/C][/ROW]
[ROW][C]66[/C][C]0.0786[/C][C]-0.0993[/C][C]0.0083[/C][C]0.018[/C][C]0.0015[/C][C]0.0387[/C][/ROW]
[ROW][C]67[/C][C]0.0858[/C][C]-0.1088[/C][C]0.0091[/C][C]0.0216[/C][C]0.0018[/C][C]0.0424[/C][/ROW]
[ROW][C]68[/C][C]0.0926[/C][C]-0.0899[/C][C]0.0075[/C][C]0.0148[/C][C]0.0012[/C][C]0.0351[/C][/ROW]
[ROW][C]69[/C][C]0.099[/C][C]-0.0926[/C][C]0.0077[/C][C]0.0156[/C][C]0.0013[/C][C]0.0361[/C][/ROW]
[ROW][C]70[/C][C]0.1051[/C][C]-0.1105[/C][C]0.0092[/C][C]0.0223[/C][C]0.0019[/C][C]0.0431[/C][/ROW]
[ROW][C]71[/C][C]0.1109[/C][C]-0.1276[/C][C]0.0106[/C][C]0.0297[/C][C]0.0025[/C][C]0.0497[/C][/ROW]
[ROW][C]72[/C][C]0.1165[/C][C]-0.1224[/C][C]0.0102[/C][C]0.0274[/C][C]0.0023[/C][C]0.0478[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4770&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4770&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
610.0232-0.02880.00240.00151e-040.0112
620.0401-0.03660.0030.00242e-040.0143
630.0521-0.02270.00199e-041e-040.0088
640.062-0.04210.00350.00323e-040.0164
650.0707-0.06010.0050.00665e-040.0235
660.0786-0.09930.00830.0180.00150.0387
670.0858-0.10880.00910.02160.00180.0424
680.0926-0.08990.00750.01480.00120.0351
690.099-0.09260.00770.01560.00130.0361
700.1051-0.11050.00920.02230.00190.0431
710.1109-0.12760.01060.02970.00250.0497
720.1165-0.12240.01020.02740.00230.0478



Parameters (Session):
par1 = FALSE ; par2 = 1 ; par3 = 2 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
Parameters (R input):
par1 = 12 ; par2 = 0.2 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 1 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')