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 computationThu, 18 Dec 2008 09:45:58 -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/2008/Dec/18/t1229618806a41xaxj1y3js2tj.htm/, Retrieved Sat, 11 May 2024 06:20:25 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34884, Retrieved Sat, 11 May 2024 06:20:25 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact153
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Arima forecasting...] [2008-12-18 16:22:35] [4ddbf81f78ea7c738951638c7e93f6ee]
-   PD  [ARIMA Forecasting] [Arima forecasting...] [2008-12-18 16:37:07] [4ddbf81f78ea7c738951638c7e93f6ee]
-   PD      [ARIMA Forecasting] [Arima forecasting...] [2008-12-18 16:45:58] [e8f764b122b426f433a1e1038b457077] [Current]
Feedback Forum

Post a new message
Dataseries X:
8,3
8,4
8,4
8,4
8,6
8,9
8,8
8,3
7,5
7,2
7,5
8,8
9,3
9,3
8,7
8,2
8,3
8,5
8,6
8,6
8,2
8,1
8
8,6
8,7
8,8
8,5
8,4
8,5
8,7
8,7
8,6
8,5
8,3
8,1
8,2
8,1
8,1
7,9
7,9
7,9
8
8
7,9
8
7,7
7,2
7,5
7,3
7
7
7
7,2
7,3
7,1
6,8
6,6
6,2
6,2
6,8




Summary of computational 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 computational 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=34884&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]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=34884&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34884&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 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])
368.2-------
378.1-------
388.1-------
397.9-------
407.9-------
417.9-------
428-------
438-------
447.9-------
458-------
467.7-------
477.2-------
487.5-------
497.37.6587.22468.09130.05270.76250.02280.7625
5077.76216.86778.65650.04750.84440.22950.7171
5177.4796.2448.71410.22360.77640.2520.4867
5277.33765.8958.78010.32320.67680.22240.4127
537.27.26755.6898.84610.46660.63010.21610.3864
547.37.35045.65259.04840.47680.56890.22670.4315
557.17.3445.51599.17210.39680.51880.24090.4336
566.87.22965.25849.20070.33460.55130.25250.394
576.67.25795.1429.37390.27110.66430.24590.4113
586.26.9324.67839.18570.26220.61360.25210.3107
596.26.43954.0568.8230.42190.57810.26590.1916
606.86.68664.17759.19560.46470.64810.26260.2626

\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 & 8.2 & - & - & - & - & - & - & - \tabularnewline
37 & 8.1 & - & - & - & - & - & - & - \tabularnewline
38 & 8.1 & - & - & - & - & - & - & - \tabularnewline
39 & 7.9 & - & - & - & - & - & - & - \tabularnewline
40 & 7.9 & - & - & - & - & - & - & - \tabularnewline
41 & 7.9 & - & - & - & - & - & - & - \tabularnewline
42 & 8 & - & - & - & - & - & - & - \tabularnewline
43 & 8 & - & - & - & - & - & - & - \tabularnewline
44 & 7.9 & - & - & - & - & - & - & - \tabularnewline
45 & 8 & - & - & - & - & - & - & - \tabularnewline
46 & 7.7 & - & - & - & - & - & - & - \tabularnewline
47 & 7.2 & - & - & - & - & - & - & - \tabularnewline
48 & 7.5 & - & - & - & - & - & - & - \tabularnewline
49 & 7.3 & 7.658 & 7.2246 & 8.0913 & 0.0527 & 0.7625 & 0.0228 & 0.7625 \tabularnewline
50 & 7 & 7.7621 & 6.8677 & 8.6565 & 0.0475 & 0.8444 & 0.2295 & 0.7171 \tabularnewline
51 & 7 & 7.479 & 6.244 & 8.7141 & 0.2236 & 0.7764 & 0.252 & 0.4867 \tabularnewline
52 & 7 & 7.3376 & 5.895 & 8.7801 & 0.3232 & 0.6768 & 0.2224 & 0.4127 \tabularnewline
53 & 7.2 & 7.2675 & 5.689 & 8.8461 & 0.4666 & 0.6301 & 0.2161 & 0.3864 \tabularnewline
54 & 7.3 & 7.3504 & 5.6525 & 9.0484 & 0.4768 & 0.5689 & 0.2267 & 0.4315 \tabularnewline
55 & 7.1 & 7.344 & 5.5159 & 9.1721 & 0.3968 & 0.5188 & 0.2409 & 0.4336 \tabularnewline
56 & 6.8 & 7.2296 & 5.2584 & 9.2007 & 0.3346 & 0.5513 & 0.2525 & 0.394 \tabularnewline
57 & 6.6 & 7.2579 & 5.142 & 9.3739 & 0.2711 & 0.6643 & 0.2459 & 0.4113 \tabularnewline
58 & 6.2 & 6.932 & 4.6783 & 9.1857 & 0.2622 & 0.6136 & 0.2521 & 0.3107 \tabularnewline
59 & 6.2 & 6.4395 & 4.056 & 8.823 & 0.4219 & 0.5781 & 0.2659 & 0.1916 \tabularnewline
60 & 6.8 & 6.6866 & 4.1775 & 9.1956 & 0.4647 & 0.6481 & 0.2626 & 0.2626 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34884&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]8.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]7.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]7.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]7.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]7.3[/C][C]7.658[/C][C]7.2246[/C][C]8.0913[/C][C]0.0527[/C][C]0.7625[/C][C]0.0228[/C][C]0.7625[/C][/ROW]
[ROW][C]50[/C][C]7[/C][C]7.7621[/C][C]6.8677[/C][C]8.6565[/C][C]0.0475[/C][C]0.8444[/C][C]0.2295[/C][C]0.7171[/C][/ROW]
[ROW][C]51[/C][C]7[/C][C]7.479[/C][C]6.244[/C][C]8.7141[/C][C]0.2236[/C][C]0.7764[/C][C]0.252[/C][C]0.4867[/C][/ROW]
[ROW][C]52[/C][C]7[/C][C]7.3376[/C][C]5.895[/C][C]8.7801[/C][C]0.3232[/C][C]0.6768[/C][C]0.2224[/C][C]0.4127[/C][/ROW]
[ROW][C]53[/C][C]7.2[/C][C]7.2675[/C][C]5.689[/C][C]8.8461[/C][C]0.4666[/C][C]0.6301[/C][C]0.2161[/C][C]0.3864[/C][/ROW]
[ROW][C]54[/C][C]7.3[/C][C]7.3504[/C][C]5.6525[/C][C]9.0484[/C][C]0.4768[/C][C]0.5689[/C][C]0.2267[/C][C]0.4315[/C][/ROW]
[ROW][C]55[/C][C]7.1[/C][C]7.344[/C][C]5.5159[/C][C]9.1721[/C][C]0.3968[/C][C]0.5188[/C][C]0.2409[/C][C]0.4336[/C][/ROW]
[ROW][C]56[/C][C]6.8[/C][C]7.2296[/C][C]5.2584[/C][C]9.2007[/C][C]0.3346[/C][C]0.5513[/C][C]0.2525[/C][C]0.394[/C][/ROW]
[ROW][C]57[/C][C]6.6[/C][C]7.2579[/C][C]5.142[/C][C]9.3739[/C][C]0.2711[/C][C]0.6643[/C][C]0.2459[/C][C]0.4113[/C][/ROW]
[ROW][C]58[/C][C]6.2[/C][C]6.932[/C][C]4.6783[/C][C]9.1857[/C][C]0.2622[/C][C]0.6136[/C][C]0.2521[/C][C]0.3107[/C][/ROW]
[ROW][C]59[/C][C]6.2[/C][C]6.4395[/C][C]4.056[/C][C]8.823[/C][C]0.4219[/C][C]0.5781[/C][C]0.2659[/C][C]0.1916[/C][/ROW]
[ROW][C]60[/C][C]6.8[/C][C]6.6866[/C][C]4.1775[/C][C]9.1956[/C][C]0.4647[/C][C]0.6481[/C][C]0.2626[/C][C]0.2626[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34884&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34884&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])
368.2-------
378.1-------
388.1-------
397.9-------
407.9-------
417.9-------
428-------
438-------
447.9-------
458-------
467.7-------
477.2-------
487.5-------
497.37.6587.22468.09130.05270.76250.02280.7625
5077.76216.86778.65650.04750.84440.22950.7171
5177.4796.2448.71410.22360.77640.2520.4867
5277.33765.8958.78010.32320.67680.22240.4127
537.27.26755.6898.84610.46660.63010.21610.3864
547.37.35045.65259.04840.47680.56890.22670.4315
557.17.3445.51599.17210.39680.51880.24090.4336
566.87.22965.25849.20070.33460.55130.25250.394
576.67.25795.1429.37390.27110.66430.24590.4113
586.26.9324.67839.18570.26220.61360.25210.3107
596.26.43954.0568.8230.42190.57810.26590.1916
606.86.68664.17759.19560.46470.64810.26260.2626







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0289-0.04670.00390.12810.01070.1033
500.0588-0.09820.00820.58080.04840.22
510.0843-0.0640.00530.22950.01910.1383
520.1003-0.0460.00380.1140.00950.0975
530.1108-0.00938e-040.00464e-040.0195
540.1179-0.00696e-040.00252e-040.0146
550.127-0.03320.00280.05960.0050.0704
560.1391-0.05940.0050.18450.01540.124
570.1487-0.09060.00760.43290.03610.1899
580.1659-0.10560.00880.53580.04470.2113
590.1888-0.03720.00310.05740.00480.0691
600.19140.0170.00140.01290.00110.0327

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0289 & -0.0467 & 0.0039 & 0.1281 & 0.0107 & 0.1033 \tabularnewline
50 & 0.0588 & -0.0982 & 0.0082 & 0.5808 & 0.0484 & 0.22 \tabularnewline
51 & 0.0843 & -0.064 & 0.0053 & 0.2295 & 0.0191 & 0.1383 \tabularnewline
52 & 0.1003 & -0.046 & 0.0038 & 0.114 & 0.0095 & 0.0975 \tabularnewline
53 & 0.1108 & -0.0093 & 8e-04 & 0.0046 & 4e-04 & 0.0195 \tabularnewline
54 & 0.1179 & -0.0069 & 6e-04 & 0.0025 & 2e-04 & 0.0146 \tabularnewline
55 & 0.127 & -0.0332 & 0.0028 & 0.0596 & 0.005 & 0.0704 \tabularnewline
56 & 0.1391 & -0.0594 & 0.005 & 0.1845 & 0.0154 & 0.124 \tabularnewline
57 & 0.1487 & -0.0906 & 0.0076 & 0.4329 & 0.0361 & 0.1899 \tabularnewline
58 & 0.1659 & -0.1056 & 0.0088 & 0.5358 & 0.0447 & 0.2113 \tabularnewline
59 & 0.1888 & -0.0372 & 0.0031 & 0.0574 & 0.0048 & 0.0691 \tabularnewline
60 & 0.1914 & 0.017 & 0.0014 & 0.0129 & 0.0011 & 0.0327 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34884&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.0289[/C][C]-0.0467[/C][C]0.0039[/C][C]0.1281[/C][C]0.0107[/C][C]0.1033[/C][/ROW]
[ROW][C]50[/C][C]0.0588[/C][C]-0.0982[/C][C]0.0082[/C][C]0.5808[/C][C]0.0484[/C][C]0.22[/C][/ROW]
[ROW][C]51[/C][C]0.0843[/C][C]-0.064[/C][C]0.0053[/C][C]0.2295[/C][C]0.0191[/C][C]0.1383[/C][/ROW]
[ROW][C]52[/C][C]0.1003[/C][C]-0.046[/C][C]0.0038[/C][C]0.114[/C][C]0.0095[/C][C]0.0975[/C][/ROW]
[ROW][C]53[/C][C]0.1108[/C][C]-0.0093[/C][C]8e-04[/C][C]0.0046[/C][C]4e-04[/C][C]0.0195[/C][/ROW]
[ROW][C]54[/C][C]0.1179[/C][C]-0.0069[/C][C]6e-04[/C][C]0.0025[/C][C]2e-04[/C][C]0.0146[/C][/ROW]
[ROW][C]55[/C][C]0.127[/C][C]-0.0332[/C][C]0.0028[/C][C]0.0596[/C][C]0.005[/C][C]0.0704[/C][/ROW]
[ROW][C]56[/C][C]0.1391[/C][C]-0.0594[/C][C]0.005[/C][C]0.1845[/C][C]0.0154[/C][C]0.124[/C][/ROW]
[ROW][C]57[/C][C]0.1487[/C][C]-0.0906[/C][C]0.0076[/C][C]0.4329[/C][C]0.0361[/C][C]0.1899[/C][/ROW]
[ROW][C]58[/C][C]0.1659[/C][C]-0.1056[/C][C]0.0088[/C][C]0.5358[/C][C]0.0447[/C][C]0.2113[/C][/ROW]
[ROW][C]59[/C][C]0.1888[/C][C]-0.0372[/C][C]0.0031[/C][C]0.0574[/C][C]0.0048[/C][C]0.0691[/C][/ROW]
[ROW][C]60[/C][C]0.1914[/C][C]0.017[/C][C]0.0014[/C][C]0.0129[/C][C]0.0011[/C][C]0.0327[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34884&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34884&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.0289-0.04670.00390.12810.01070.1033
500.0588-0.09820.00820.58080.04840.22
510.0843-0.0640.00530.22950.01910.1383
520.1003-0.0460.00380.1140.00950.0975
530.1108-0.00938e-040.00464e-040.0195
540.1179-0.00696e-040.00252e-040.0146
550.127-0.03320.00280.05960.0050.0704
560.1391-0.05940.0050.18450.01540.124
570.1487-0.09060.00760.43290.03610.1899
580.1659-0.10560.00880.53580.04470.2113
590.1888-0.03720.00310.05740.00480.0691
600.19140.0170.00140.01290.00110.0327



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