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 computationSat, 25 Dec 2010 11:22:17 +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/25/t1293276011oy9hmdkll4pvhx7.htm/, Retrieved Mon, 29 Apr 2024 05:00:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115353, Retrieved Mon, 29 Apr 2024 05:00:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact151
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD        [ARIMA Forecasting] [ARIMA forecasting] [2010-12-25 11:22:17] [03bcd8c83ef1a42b4029a16ba47a4880] [Current]
-               [ARIMA Forecasting] [ARIMA forecasting] [2010-12-28 19:06:55] [30b3e197115d238a51c18bcedc33a6a5]
Feedback Forum

Post a new message
Dataseries X:
336.02
333.15
314.95
302.48
307.31
305.50
308.57
322.58
337.09
323.81
333.06
331.90
327.90
319.93
331.51
336.42
319.77
323.20
324.51
328.34
331.88
336.45
337.95
330.75
323.87
325.26
328.73
331.72
332.54
354.25
352.69
356.15
372.50
390.90
404.65
430.04
453.54
464.98
463.31
497.20
528.62
470.91
499.53
493.51
469.97
464.41
487.15
476.45
484.91
509.61
495.19
504.75
493.43
488.58
484.82
488.46
512.32
530.29
549.38
551.45
604.41
625.29
623.56
577.42
572.28
571.69
596.28
560.00
577.93
606.51
597.31
607.58
648.14
737.48
708.73
674.01
679.90
674.93
663.38
665.69
684.21
703.71
755.42
772.43




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 10 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115353&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]10 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115353&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115353&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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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[72])
60551.45-------
61604.41-------
62625.29-------
63623.56-------
64577.42-------
65572.28-------
66571.69-------
67596.28-------
68560-------
69577.93-------
70606.51-------
71597.31-------
72607.58-------
73648.14607.58568.8022647.63640.02360.50.56160.5
74737.48607.58553.1144664.602800.08160.27140.5
75708.73607.58541.2255677.77030.00241e-040.32770.5
76674.01607.58531.303688.97140.05480.00740.76620.5
77679.9607.58522.6372698.91590.06030.0770.77560.5
78674.93607.58514.864707.96760.09430.0790.75830.5
79663.38607.58507.7672716.3430.15730.11240.58070.5
80665.69607.58501.206724.18280.16430.17410.78810.5
81684.21607.58495.0824731.58510.11290.17920.68030.5
82703.71607.58489.3252738.62090.07520.12590.50640.5
83755.42607.58483.8806745.34410.01770.08570.55810.5
84772.43607.58478.7067751.79650.01250.02230.50.5

\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[72]) \tabularnewline
60 & 551.45 & - & - & - & - & - & - & - \tabularnewline
61 & 604.41 & - & - & - & - & - & - & - \tabularnewline
62 & 625.29 & - & - & - & - & - & - & - \tabularnewline
63 & 623.56 & - & - & - & - & - & - & - \tabularnewline
64 & 577.42 & - & - & - & - & - & - & - \tabularnewline
65 & 572.28 & - & - & - & - & - & - & - \tabularnewline
66 & 571.69 & - & - & - & - & - & - & - \tabularnewline
67 & 596.28 & - & - & - & - & - & - & - \tabularnewline
68 & 560 & - & - & - & - & - & - & - \tabularnewline
69 & 577.93 & - & - & - & - & - & - & - \tabularnewline
70 & 606.51 & - & - & - & - & - & - & - \tabularnewline
71 & 597.31 & - & - & - & - & - & - & - \tabularnewline
72 & 607.58 & - & - & - & - & - & - & - \tabularnewline
73 & 648.14 & 607.58 & 568.8022 & 647.6364 & 0.0236 & 0.5 & 0.5616 & 0.5 \tabularnewline
74 & 737.48 & 607.58 & 553.1144 & 664.6028 & 0 & 0.0816 & 0.2714 & 0.5 \tabularnewline
75 & 708.73 & 607.58 & 541.2255 & 677.7703 & 0.0024 & 1e-04 & 0.3277 & 0.5 \tabularnewline
76 & 674.01 & 607.58 & 531.303 & 688.9714 & 0.0548 & 0.0074 & 0.7662 & 0.5 \tabularnewline
77 & 679.9 & 607.58 & 522.6372 & 698.9159 & 0.0603 & 0.077 & 0.7756 & 0.5 \tabularnewline
78 & 674.93 & 607.58 & 514.864 & 707.9676 & 0.0943 & 0.079 & 0.7583 & 0.5 \tabularnewline
79 & 663.38 & 607.58 & 507.7672 & 716.343 & 0.1573 & 0.1124 & 0.5807 & 0.5 \tabularnewline
80 & 665.69 & 607.58 & 501.206 & 724.1828 & 0.1643 & 0.1741 & 0.7881 & 0.5 \tabularnewline
81 & 684.21 & 607.58 & 495.0824 & 731.5851 & 0.1129 & 0.1792 & 0.6803 & 0.5 \tabularnewline
82 & 703.71 & 607.58 & 489.3252 & 738.6209 & 0.0752 & 0.1259 & 0.5064 & 0.5 \tabularnewline
83 & 755.42 & 607.58 & 483.8806 & 745.3441 & 0.0177 & 0.0857 & 0.5581 & 0.5 \tabularnewline
84 & 772.43 & 607.58 & 478.7067 & 751.7965 & 0.0125 & 0.0223 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115353&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[72])[/C][/ROW]
[ROW][C]60[/C][C]551.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]604.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]625.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]623.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]577.42[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]572.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]571.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]596.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]560[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]577.93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]606.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]597.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]607.58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]648.14[/C][C]607.58[/C][C]568.8022[/C][C]647.6364[/C][C]0.0236[/C][C]0.5[/C][C]0.5616[/C][C]0.5[/C][/ROW]
[ROW][C]74[/C][C]737.48[/C][C]607.58[/C][C]553.1144[/C][C]664.6028[/C][C]0[/C][C]0.0816[/C][C]0.2714[/C][C]0.5[/C][/ROW]
[ROW][C]75[/C][C]708.73[/C][C]607.58[/C][C]541.2255[/C][C]677.7703[/C][C]0.0024[/C][C]1e-04[/C][C]0.3277[/C][C]0.5[/C][/ROW]
[ROW][C]76[/C][C]674.01[/C][C]607.58[/C][C]531.303[/C][C]688.9714[/C][C]0.0548[/C][C]0.0074[/C][C]0.7662[/C][C]0.5[/C][/ROW]
[ROW][C]77[/C][C]679.9[/C][C]607.58[/C][C]522.6372[/C][C]698.9159[/C][C]0.0603[/C][C]0.077[/C][C]0.7756[/C][C]0.5[/C][/ROW]
[ROW][C]78[/C][C]674.93[/C][C]607.58[/C][C]514.864[/C][C]707.9676[/C][C]0.0943[/C][C]0.079[/C][C]0.7583[/C][C]0.5[/C][/ROW]
[ROW][C]79[/C][C]663.38[/C][C]607.58[/C][C]507.7672[/C][C]716.343[/C][C]0.1573[/C][C]0.1124[/C][C]0.5807[/C][C]0.5[/C][/ROW]
[ROW][C]80[/C][C]665.69[/C][C]607.58[/C][C]501.206[/C][C]724.1828[/C][C]0.1643[/C][C]0.1741[/C][C]0.7881[/C][C]0.5[/C][/ROW]
[ROW][C]81[/C][C]684.21[/C][C]607.58[/C][C]495.0824[/C][C]731.5851[/C][C]0.1129[/C][C]0.1792[/C][C]0.6803[/C][C]0.5[/C][/ROW]
[ROW][C]82[/C][C]703.71[/C][C]607.58[/C][C]489.3252[/C][C]738.6209[/C][C]0.0752[/C][C]0.1259[/C][C]0.5064[/C][C]0.5[/C][/ROW]
[ROW][C]83[/C][C]755.42[/C][C]607.58[/C][C]483.8806[/C][C]745.3441[/C][C]0.0177[/C][C]0.0857[/C][C]0.5581[/C][C]0.5[/C][/ROW]
[ROW][C]84[/C][C]772.43[/C][C]607.58[/C][C]478.7067[/C][C]751.7965[/C][C]0.0125[/C][C]0.0223[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115353&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115353&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[72])
60551.45-------
61604.41-------
62625.29-------
63623.56-------
64577.42-------
65572.28-------
66571.69-------
67596.28-------
68560-------
69577.93-------
70606.51-------
71597.31-------
72607.58-------
73648.14607.58568.8022647.63640.02360.50.56160.5
74737.48607.58553.1144664.602800.08160.27140.5
75708.73607.58541.2255677.77030.00241e-040.32770.5
76674.01607.58531.303688.97140.05480.00740.76620.5
77679.9607.58522.6372698.91590.06030.0770.77560.5
78674.93607.58514.864707.96760.09430.0790.75830.5
79663.38607.58507.7672716.3430.15730.11240.58070.5
80665.69607.58501.206724.18280.16430.17410.78810.5
81684.21607.58495.0824731.58510.11290.17920.68030.5
82703.71607.58489.3252738.62090.07520.12590.50640.5
83755.42607.58483.8806745.34410.01770.08570.55810.5
84772.43607.58478.7067751.79650.01250.02230.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.03360.066801645.113600
740.04790.21380.140316874.019259.561896.2266
750.05890.16650.14910231.32259583.48297.8953
760.06830.10930.13914412.94498290.847791.0541
770.07670.1190.13515230.18247678.714787.6283
780.08430.11080.1314536.02257154.932684.5868
790.09130.09180.12543113.646577.605181.1024
800.09790.09560.12173376.77216177.50178.5971
810.10410.12610.12225872.15696143.573978.381
820.110.15820.12589240.97696453.314280.3325
830.11570.24330.136521856.66567853.618988.6206
840.12110.27130.147727175.52259463.777597.2819

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0336 & 0.0668 & 0 & 1645.1136 & 0 & 0 \tabularnewline
74 & 0.0479 & 0.2138 & 0.1403 & 16874.01 & 9259.5618 & 96.2266 \tabularnewline
75 & 0.0589 & 0.1665 & 0.149 & 10231.3225 & 9583.482 & 97.8953 \tabularnewline
76 & 0.0683 & 0.1093 & 0.1391 & 4412.9449 & 8290.8477 & 91.0541 \tabularnewline
77 & 0.0767 & 0.119 & 0.1351 & 5230.1824 & 7678.7147 & 87.6283 \tabularnewline
78 & 0.0843 & 0.1108 & 0.131 & 4536.0225 & 7154.9326 & 84.5868 \tabularnewline
79 & 0.0913 & 0.0918 & 0.1254 & 3113.64 & 6577.6051 & 81.1024 \tabularnewline
80 & 0.0979 & 0.0956 & 0.1217 & 3376.7721 & 6177.501 & 78.5971 \tabularnewline
81 & 0.1041 & 0.1261 & 0.1222 & 5872.1569 & 6143.5739 & 78.381 \tabularnewline
82 & 0.11 & 0.1582 & 0.1258 & 9240.9769 & 6453.3142 & 80.3325 \tabularnewline
83 & 0.1157 & 0.2433 & 0.1365 & 21856.6656 & 7853.6189 & 88.6206 \tabularnewline
84 & 0.1211 & 0.2713 & 0.1477 & 27175.5225 & 9463.7775 & 97.2819 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115353&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]73[/C][C]0.0336[/C][C]0.0668[/C][C]0[/C][C]1645.1136[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.0479[/C][C]0.2138[/C][C]0.1403[/C][C]16874.01[/C][C]9259.5618[/C][C]96.2266[/C][/ROW]
[ROW][C]75[/C][C]0.0589[/C][C]0.1665[/C][C]0.149[/C][C]10231.3225[/C][C]9583.482[/C][C]97.8953[/C][/ROW]
[ROW][C]76[/C][C]0.0683[/C][C]0.1093[/C][C]0.1391[/C][C]4412.9449[/C][C]8290.8477[/C][C]91.0541[/C][/ROW]
[ROW][C]77[/C][C]0.0767[/C][C]0.119[/C][C]0.1351[/C][C]5230.1824[/C][C]7678.7147[/C][C]87.6283[/C][/ROW]
[ROW][C]78[/C][C]0.0843[/C][C]0.1108[/C][C]0.131[/C][C]4536.0225[/C][C]7154.9326[/C][C]84.5868[/C][/ROW]
[ROW][C]79[/C][C]0.0913[/C][C]0.0918[/C][C]0.1254[/C][C]3113.64[/C][C]6577.6051[/C][C]81.1024[/C][/ROW]
[ROW][C]80[/C][C]0.0979[/C][C]0.0956[/C][C]0.1217[/C][C]3376.7721[/C][C]6177.501[/C][C]78.5971[/C][/ROW]
[ROW][C]81[/C][C]0.1041[/C][C]0.1261[/C][C]0.1222[/C][C]5872.1569[/C][C]6143.5739[/C][C]78.381[/C][/ROW]
[ROW][C]82[/C][C]0.11[/C][C]0.1582[/C][C]0.1258[/C][C]9240.9769[/C][C]6453.3142[/C][C]80.3325[/C][/ROW]
[ROW][C]83[/C][C]0.1157[/C][C]0.2433[/C][C]0.1365[/C][C]21856.6656[/C][C]7853.6189[/C][C]88.6206[/C][/ROW]
[ROW][C]84[/C][C]0.1211[/C][C]0.2713[/C][C]0.1477[/C][C]27175.5225[/C][C]9463.7775[/C][C]97.2819[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115353&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115353&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
730.03360.066801645.113600
740.04790.21380.140316874.019259.561896.2266
750.05890.16650.14910231.32259583.48297.8953
760.06830.10930.13914412.94498290.847791.0541
770.07670.1190.13515230.18247678.714787.6283
780.08430.11080.1314536.02257154.932684.5868
790.09130.09180.12543113.646577.605181.1024
800.09790.09560.12173376.77216177.50178.5971
810.10410.12610.12225872.15696143.573978.381
820.110.15820.12589240.97696453.314280.3325
830.11570.24330.136521856.66567853.618988.6206
840.12110.27130.147727175.52259463.777597.2819



Parameters (Session):
par1 = 12 ; par2 = 0.5 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.5 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; 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')