Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 14 Dec 2007 08:21: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/14/t11976447492qjwl5jx896ppcz.htm/, Retrieved Thu, 02 May 2024 20:18:57 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3915, Retrieved Thu, 02 May 2024 20:18:57 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact187
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-14 15:21:11] [d9ccf6bb4f7743d5d52b9a9a992ccbd5] [Current]
Feedback Forum

Post a new message
Dataseries X:
88.8
93.4
92.6
90.7
81.6
84.1
88.1
85.3
82.9
84.8
71.2
68.9
94.3
97.6
85.6
91.9
75.8
79.8
99
88.5
86.7
97.9
94.3
72.9
91.8
93.2
86.5
98.9
77.2
79.4
90.4
81.4
85.8
103.6
73.6
75.7
99.2
88.7
94.6
98.7
84.2
87.7
103.3
88.2
93.4
106.3
73.1
78.6
101.6
101.4
98.5
99
89.5
83.5
97.4
87.8
90.4
97.1
79.4
85




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=3915&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=3915&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3915&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[48])
3675.7-------
3799.2-------
3888.7-------
3994.6-------
4098.7-------
4184.2-------
4287.7-------
43103.3-------
4488.2-------
4593.4-------
46106.3-------
4773.1-------
4878.6-------
49101.695.636382.0061109.26650.19560.99290.30420.9929
50101.491.326477.6962104.95660.07370.06980.64720.9664
5198.590.41776.7869104.04720.12260.05710.27380.9554
529998.258584.6283111.88870.45750.48610.47470.9976
5389.580.536866.906694.1670.09870.0040.29920.6097
5483.583.516369.886297.14650.49910.19480.27370.7602
5597.497.416783.7865111.04690.4990.97730.19880.9966
5687.885.297871.667798.9280.35950.04090.33820.8323
5790.489.610675.9804103.24080.45480.60270.29290.9433
5897.1104.486790.8565118.11690.14410.97860.39710.9999
5979.474.959961.329788.59010.26167e-040.60540.3003
608576.910263.2890.54040.12240.36020.4040.404

\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[48]) \tabularnewline
36 & 75.7 & - & - & - & - & - & - & - \tabularnewline
37 & 99.2 & - & - & - & - & - & - & - \tabularnewline
38 & 88.7 & - & - & - & - & - & - & - \tabularnewline
39 & 94.6 & - & - & - & - & - & - & - \tabularnewline
40 & 98.7 & - & - & - & - & - & - & - \tabularnewline
41 & 84.2 & - & - & - & - & - & - & - \tabularnewline
42 & 87.7 & - & - & - & - & - & - & - \tabularnewline
43 & 103.3 & - & - & - & - & - & - & - \tabularnewline
44 & 88.2 & - & - & - & - & - & - & - \tabularnewline
45 & 93.4 & - & - & - & - & - & - & - \tabularnewline
46 & 106.3 & - & - & - & - & - & - & - \tabularnewline
47 & 73.1 & - & - & - & - & - & - & - \tabularnewline
48 & 78.6 & - & - & - & - & - & - & - \tabularnewline
49 & 101.6 & 95.6363 & 82.0061 & 109.2665 & 0.1956 & 0.9929 & 0.3042 & 0.9929 \tabularnewline
50 & 101.4 & 91.3264 & 77.6962 & 104.9566 & 0.0737 & 0.0698 & 0.6472 & 0.9664 \tabularnewline
51 & 98.5 & 90.417 & 76.7869 & 104.0472 & 0.1226 & 0.0571 & 0.2738 & 0.9554 \tabularnewline
52 & 99 & 98.2585 & 84.6283 & 111.8887 & 0.4575 & 0.4861 & 0.4747 & 0.9976 \tabularnewline
53 & 89.5 & 80.5368 & 66.9066 & 94.167 & 0.0987 & 0.004 & 0.2992 & 0.6097 \tabularnewline
54 & 83.5 & 83.5163 & 69.8862 & 97.1465 & 0.4991 & 0.1948 & 0.2737 & 0.7602 \tabularnewline
55 & 97.4 & 97.4167 & 83.7865 & 111.0469 & 0.499 & 0.9773 & 0.1988 & 0.9966 \tabularnewline
56 & 87.8 & 85.2978 & 71.6677 & 98.928 & 0.3595 & 0.0409 & 0.3382 & 0.8323 \tabularnewline
57 & 90.4 & 89.6106 & 75.9804 & 103.2408 & 0.4548 & 0.6027 & 0.2929 & 0.9433 \tabularnewline
58 & 97.1 & 104.4867 & 90.8565 & 118.1169 & 0.1441 & 0.9786 & 0.3971 & 0.9999 \tabularnewline
59 & 79.4 & 74.9599 & 61.3297 & 88.5901 & 0.2616 & 7e-04 & 0.6054 & 0.3003 \tabularnewline
60 & 85 & 76.9102 & 63.28 & 90.5404 & 0.1224 & 0.3602 & 0.404 & 0.404 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3915&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[48])[/C][/ROW]
[ROW][C]36[/C][C]75.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]99.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]88.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]94.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]98.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]84.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]87.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]103.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]88.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]93.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]106.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]73.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]78.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]101.6[/C][C]95.6363[/C][C]82.0061[/C][C]109.2665[/C][C]0.1956[/C][C]0.9929[/C][C]0.3042[/C][C]0.9929[/C][/ROW]
[ROW][C]50[/C][C]101.4[/C][C]91.3264[/C][C]77.6962[/C][C]104.9566[/C][C]0.0737[/C][C]0.0698[/C][C]0.6472[/C][C]0.9664[/C][/ROW]
[ROW][C]51[/C][C]98.5[/C][C]90.417[/C][C]76.7869[/C][C]104.0472[/C][C]0.1226[/C][C]0.0571[/C][C]0.2738[/C][C]0.9554[/C][/ROW]
[ROW][C]52[/C][C]99[/C][C]98.2585[/C][C]84.6283[/C][C]111.8887[/C][C]0.4575[/C][C]0.4861[/C][C]0.4747[/C][C]0.9976[/C][/ROW]
[ROW][C]53[/C][C]89.5[/C][C]80.5368[/C][C]66.9066[/C][C]94.167[/C][C]0.0987[/C][C]0.004[/C][C]0.2992[/C][C]0.6097[/C][/ROW]
[ROW][C]54[/C][C]83.5[/C][C]83.5163[/C][C]69.8862[/C][C]97.1465[/C][C]0.4991[/C][C]0.1948[/C][C]0.2737[/C][C]0.7602[/C][/ROW]
[ROW][C]55[/C][C]97.4[/C][C]97.4167[/C][C]83.7865[/C][C]111.0469[/C][C]0.499[/C][C]0.9773[/C][C]0.1988[/C][C]0.9966[/C][/ROW]
[ROW][C]56[/C][C]87.8[/C][C]85.2978[/C][C]71.6677[/C][C]98.928[/C][C]0.3595[/C][C]0.0409[/C][C]0.3382[/C][C]0.8323[/C][/ROW]
[ROW][C]57[/C][C]90.4[/C][C]89.6106[/C][C]75.9804[/C][C]103.2408[/C][C]0.4548[/C][C]0.6027[/C][C]0.2929[/C][C]0.9433[/C][/ROW]
[ROW][C]58[/C][C]97.1[/C][C]104.4867[/C][C]90.8565[/C][C]118.1169[/C][C]0.1441[/C][C]0.9786[/C][C]0.3971[/C][C]0.9999[/C][/ROW]
[ROW][C]59[/C][C]79.4[/C][C]74.9599[/C][C]61.3297[/C][C]88.5901[/C][C]0.2616[/C][C]7e-04[/C][C]0.6054[/C][C]0.3003[/C][/ROW]
[ROW][C]60[/C][C]85[/C][C]76.9102[/C][C]63.28[/C][C]90.5404[/C][C]0.1224[/C][C]0.3602[/C][C]0.404[/C][C]0.404[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3915&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3915&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[48])
3675.7-------
3799.2-------
3888.7-------
3994.6-------
4098.7-------
4184.2-------
4287.7-------
43103.3-------
4488.2-------
4593.4-------
46106.3-------
4773.1-------
4878.6-------
49101.695.636382.0061109.26650.19560.99290.30420.9929
50101.491.326477.6962104.95660.07370.06980.64720.9664
5198.590.41776.7869104.04720.12260.05710.27380.9554
529998.258584.6283111.88870.45750.48610.47470.9976
5389.580.536866.906694.1670.09870.0040.29920.6097
5483.583.516369.886297.14650.49910.19480.27370.7602
5597.497.416783.7865111.04690.4990.97730.19880.9966
5687.885.297871.667798.9280.35950.04090.33820.8323
5790.489.610675.9804103.24080.45480.60270.29290.9433
5897.1104.486790.8565118.11690.14410.97860.39710.9999
5979.474.959961.329788.59010.26167e-040.60540.3003
608576.910263.2890.54040.12240.36020.4040.404







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.07270.06240.005235.56592.96381.7216
500.07610.11030.0092101.47678.45642.908
510.07690.08940.007465.33415.44452.3333
520.07080.00756e-040.54990.04580.2141
530.08630.11130.009380.33846.69492.5874
540.0833-2e-0403e-0400.0047
550.0714-2e-0403e-0400.0048
560.08150.02930.00246.26080.52170.7223
570.07760.00887e-040.62320.05190.2279
580.0666-0.07070.005954.56394.5472.1324
590.09280.05920.004919.71481.64291.2818
600.09040.10520.008865.44545.45382.3353

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0727 & 0.0624 & 0.0052 & 35.5659 & 2.9638 & 1.7216 \tabularnewline
50 & 0.0761 & 0.1103 & 0.0092 & 101.4767 & 8.4564 & 2.908 \tabularnewline
51 & 0.0769 & 0.0894 & 0.0074 & 65.3341 & 5.4445 & 2.3333 \tabularnewline
52 & 0.0708 & 0.0075 & 6e-04 & 0.5499 & 0.0458 & 0.2141 \tabularnewline
53 & 0.0863 & 0.1113 & 0.0093 & 80.3384 & 6.6949 & 2.5874 \tabularnewline
54 & 0.0833 & -2e-04 & 0 & 3e-04 & 0 & 0.0047 \tabularnewline
55 & 0.0714 & -2e-04 & 0 & 3e-04 & 0 & 0.0048 \tabularnewline
56 & 0.0815 & 0.0293 & 0.0024 & 6.2608 & 0.5217 & 0.7223 \tabularnewline
57 & 0.0776 & 0.0088 & 7e-04 & 0.6232 & 0.0519 & 0.2279 \tabularnewline
58 & 0.0666 & -0.0707 & 0.0059 & 54.5639 & 4.547 & 2.1324 \tabularnewline
59 & 0.0928 & 0.0592 & 0.0049 & 19.7148 & 1.6429 & 1.2818 \tabularnewline
60 & 0.0904 & 0.1052 & 0.0088 & 65.4454 & 5.4538 & 2.3353 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3915&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]49[/C][C]0.0727[/C][C]0.0624[/C][C]0.0052[/C][C]35.5659[/C][C]2.9638[/C][C]1.7216[/C][/ROW]
[ROW][C]50[/C][C]0.0761[/C][C]0.1103[/C][C]0.0092[/C][C]101.4767[/C][C]8.4564[/C][C]2.908[/C][/ROW]
[ROW][C]51[/C][C]0.0769[/C][C]0.0894[/C][C]0.0074[/C][C]65.3341[/C][C]5.4445[/C][C]2.3333[/C][/ROW]
[ROW][C]52[/C][C]0.0708[/C][C]0.0075[/C][C]6e-04[/C][C]0.5499[/C][C]0.0458[/C][C]0.2141[/C][/ROW]
[ROW][C]53[/C][C]0.0863[/C][C]0.1113[/C][C]0.0093[/C][C]80.3384[/C][C]6.6949[/C][C]2.5874[/C][/ROW]
[ROW][C]54[/C][C]0.0833[/C][C]-2e-04[/C][C]0[/C][C]3e-04[/C][C]0[/C][C]0.0047[/C][/ROW]
[ROW][C]55[/C][C]0.0714[/C][C]-2e-04[/C][C]0[/C][C]3e-04[/C][C]0[/C][C]0.0048[/C][/ROW]
[ROW][C]56[/C][C]0.0815[/C][C]0.0293[/C][C]0.0024[/C][C]6.2608[/C][C]0.5217[/C][C]0.7223[/C][/ROW]
[ROW][C]57[/C][C]0.0776[/C][C]0.0088[/C][C]7e-04[/C][C]0.6232[/C][C]0.0519[/C][C]0.2279[/C][/ROW]
[ROW][C]58[/C][C]0.0666[/C][C]-0.0707[/C][C]0.0059[/C][C]54.5639[/C][C]4.547[/C][C]2.1324[/C][/ROW]
[ROW][C]59[/C][C]0.0928[/C][C]0.0592[/C][C]0.0049[/C][C]19.7148[/C][C]1.6429[/C][C]1.2818[/C][/ROW]
[ROW][C]60[/C][C]0.0904[/C][C]0.1052[/C][C]0.0088[/C][C]65.4454[/C][C]5.4538[/C][C]2.3353[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3915&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3915&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
490.07270.06240.005235.56592.96381.7216
500.07610.11030.0092101.47678.45642.908
510.07690.08940.007465.33415.44452.3333
520.07080.00756e-040.54990.04580.2141
530.08630.11130.009380.33846.69492.5874
540.0833-2e-0403e-0400.0047
550.0714-2e-0403e-0400.0048
560.08150.02930.00246.26080.52170.7223
570.07760.00887e-040.62320.05190.2279
580.0666-0.07070.005954.56394.5472.1324
590.09280.05920.004919.71481.64291.2818
600.09040.10520.008865.44545.45382.3353



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