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, 13 Dec 2008 07:51:04 -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/13/t1229180706ewh219zt60iavj4.htm/, Retrieved Mon, 27 May 2024 14:26:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33141, Retrieved Mon, 27 May 2024 14:26:17 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact162
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecast ] [2008-12-13 14:51:04] [8a1195ff8db4df756ce44b463a631c76] [Current]
Feedback Forum

Post a new message
Dataseries X:
82.7
88.9
105.9
100.8
94
105
58.5
87.6
113.1
112.5
89.6
74.5
82.7
90.1
109.4
96
89.2
109.1
49.1
92.9
107.7
103.5
91.1
79.8
71.9
82.9
90.1
100.7
90.7
108.8
44.1
93.6
107.4
96.5
93.6
76.5
76.7
84
103.3
88.5
99
105.9
44.7
94
107.1
104.8
102.5
77.7
85.2
91.3
106.5
92.4
97.5
107
51.1
98.6
102.2
114.3
99.4
72.5
92.3
99.4
85.9
109.4
97.6




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33141&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33141&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33141&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'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[53])
4199-------
42105.9-------
4344.7-------
4494-------
45107.1-------
46104.8-------
47102.5-------
4877.7-------
4985.2-------
5091.3-------
51106.5-------
5292.4-------
5397.5-------
54107107.068896.7321117.40560.49480.96520.58770.9652
5551.147.431737.003157.86030.245300.69620
5698.693.951883.3851104.51850.194310.49640.2552
57102.2107.342896.6594118.02610.17270.94560.51780.9645
58114.3104.470993.7851115.15670.03570.66150.47590.8995
5999.497.151586.4493107.85370.34028e-040.16370.4746
6072.578.745668.041789.44950.12641e-040.57593e-04
6192.378.908268.204389.61210.00710.87970.12463e-04
6299.487.331476.626698.03630.01360.18150.23370.0313
6385.998.597687.8928109.30250.010.44160.0740.5796
64109.496.485485.7805107.19030.0090.97370.77280.4263
6597.694.18483.4791104.8890.26580.00270.27190.2719

\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[53]) \tabularnewline
41 & 99 & - & - & - & - & - & - & - \tabularnewline
42 & 105.9 & - & - & - & - & - & - & - \tabularnewline
43 & 44.7 & - & - & - & - & - & - & - \tabularnewline
44 & 94 & - & - & - & - & - & - & - \tabularnewline
45 & 107.1 & - & - & - & - & - & - & - \tabularnewline
46 & 104.8 & - & - & - & - & - & - & - \tabularnewline
47 & 102.5 & - & - & - & - & - & - & - \tabularnewline
48 & 77.7 & - & - & - & - & - & - & - \tabularnewline
49 & 85.2 & - & - & - & - & - & - & - \tabularnewline
50 & 91.3 & - & - & - & - & - & - & - \tabularnewline
51 & 106.5 & - & - & - & - & - & - & - \tabularnewline
52 & 92.4 & - & - & - & - & - & - & - \tabularnewline
53 & 97.5 & - & - & - & - & - & - & - \tabularnewline
54 & 107 & 107.0688 & 96.7321 & 117.4056 & 0.4948 & 0.9652 & 0.5877 & 0.9652 \tabularnewline
55 & 51.1 & 47.4317 & 37.0031 & 57.8603 & 0.2453 & 0 & 0.6962 & 0 \tabularnewline
56 & 98.6 & 93.9518 & 83.3851 & 104.5185 & 0.1943 & 1 & 0.4964 & 0.2552 \tabularnewline
57 & 102.2 & 107.3428 & 96.6594 & 118.0261 & 0.1727 & 0.9456 & 0.5178 & 0.9645 \tabularnewline
58 & 114.3 & 104.4709 & 93.7851 & 115.1567 & 0.0357 & 0.6615 & 0.4759 & 0.8995 \tabularnewline
59 & 99.4 & 97.1515 & 86.4493 & 107.8537 & 0.3402 & 8e-04 & 0.1637 & 0.4746 \tabularnewline
60 & 72.5 & 78.7456 & 68.0417 & 89.4495 & 0.1264 & 1e-04 & 0.5759 & 3e-04 \tabularnewline
61 & 92.3 & 78.9082 & 68.2043 & 89.6121 & 0.0071 & 0.8797 & 0.1246 & 3e-04 \tabularnewline
62 & 99.4 & 87.3314 & 76.6266 & 98.0363 & 0.0136 & 0.1815 & 0.2337 & 0.0313 \tabularnewline
63 & 85.9 & 98.5976 & 87.8928 & 109.3025 & 0.01 & 0.4416 & 0.074 & 0.5796 \tabularnewline
64 & 109.4 & 96.4854 & 85.7805 & 107.1903 & 0.009 & 0.9737 & 0.7728 & 0.4263 \tabularnewline
65 & 97.6 & 94.184 & 83.4791 & 104.889 & 0.2658 & 0.0027 & 0.2719 & 0.2719 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33141&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[53])[/C][/ROW]
[ROW][C]41[/C][C]99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]105.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]44.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]94[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]107.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]104.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]102.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]77.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]85.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]91.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]106.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]92.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]97.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]107[/C][C]107.0688[/C][C]96.7321[/C][C]117.4056[/C][C]0.4948[/C][C]0.9652[/C][C]0.5877[/C][C]0.9652[/C][/ROW]
[ROW][C]55[/C][C]51.1[/C][C]47.4317[/C][C]37.0031[/C][C]57.8603[/C][C]0.2453[/C][C]0[/C][C]0.6962[/C][C]0[/C][/ROW]
[ROW][C]56[/C][C]98.6[/C][C]93.9518[/C][C]83.3851[/C][C]104.5185[/C][C]0.1943[/C][C]1[/C][C]0.4964[/C][C]0.2552[/C][/ROW]
[ROW][C]57[/C][C]102.2[/C][C]107.3428[/C][C]96.6594[/C][C]118.0261[/C][C]0.1727[/C][C]0.9456[/C][C]0.5178[/C][C]0.9645[/C][/ROW]
[ROW][C]58[/C][C]114.3[/C][C]104.4709[/C][C]93.7851[/C][C]115.1567[/C][C]0.0357[/C][C]0.6615[/C][C]0.4759[/C][C]0.8995[/C][/ROW]
[ROW][C]59[/C][C]99.4[/C][C]97.1515[/C][C]86.4493[/C][C]107.8537[/C][C]0.3402[/C][C]8e-04[/C][C]0.1637[/C][C]0.4746[/C][/ROW]
[ROW][C]60[/C][C]72.5[/C][C]78.7456[/C][C]68.0417[/C][C]89.4495[/C][C]0.1264[/C][C]1e-04[/C][C]0.5759[/C][C]3e-04[/C][/ROW]
[ROW][C]61[/C][C]92.3[/C][C]78.9082[/C][C]68.2043[/C][C]89.6121[/C][C]0.0071[/C][C]0.8797[/C][C]0.1246[/C][C]3e-04[/C][/ROW]
[ROW][C]62[/C][C]99.4[/C][C]87.3314[/C][C]76.6266[/C][C]98.0363[/C][C]0.0136[/C][C]0.1815[/C][C]0.2337[/C][C]0.0313[/C][/ROW]
[ROW][C]63[/C][C]85.9[/C][C]98.5976[/C][C]87.8928[/C][C]109.3025[/C][C]0.01[/C][C]0.4416[/C][C]0.074[/C][C]0.5796[/C][/ROW]
[ROW][C]64[/C][C]109.4[/C][C]96.4854[/C][C]85.7805[/C][C]107.1903[/C][C]0.009[/C][C]0.9737[/C][C]0.7728[/C][C]0.4263[/C][/ROW]
[ROW][C]65[/C][C]97.6[/C][C]94.184[/C][C]83.4791[/C][C]104.889[/C][C]0.2658[/C][C]0.0027[/C][C]0.2719[/C][C]0.2719[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33141&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33141&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[53])
4199-------
42105.9-------
4344.7-------
4494-------
45107.1-------
46104.8-------
47102.5-------
4877.7-------
4985.2-------
5091.3-------
51106.5-------
5292.4-------
5397.5-------
54107107.068896.7321117.40560.49480.96520.58770.9652
5551.147.431737.003157.86030.245300.69620
5698.693.951883.3851104.51850.194310.49640.2552
57102.2107.342896.6594118.02610.17270.94560.51780.9645
58114.3104.470993.7851115.15670.03570.66150.47590.8995
5999.497.151586.4493107.85370.34028e-040.16370.4746
6072.578.745668.041789.44950.12641e-040.57593e-04
6192.378.908268.204389.61210.00710.87970.12463e-04
6299.487.331476.626698.03630.01360.18150.23370.0313
6385.998.597687.8928109.30250.010.44160.0740.5796
64109.496.485485.7805107.19030.0090.97370.77280.4263
6597.694.18483.4791104.8890.26580.00270.27190.2719







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
540.0493-6e-041e-040.00474e-040.0199
550.11220.07730.006413.45641.12141.0589
560.05740.04950.004121.60571.80051.3418
570.0508-0.04790.00426.44812.2041.4846
580.05220.09410.007896.61078.05092.8374
590.05620.02310.00195.05590.42130.6491
600.0694-0.07930.006639.00763.25061.803
610.06920.16970.0141179.340314.9453.8659
620.06250.13820.0115145.650712.13763.4839
630.0554-0.12880.0107161.230313.43593.6655
640.05660.13380.0112166.785913.89883.7281
650.0580.03630.00311.66890.97240.9861

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
54 & 0.0493 & -6e-04 & 1e-04 & 0.0047 & 4e-04 & 0.0199 \tabularnewline
55 & 0.1122 & 0.0773 & 0.0064 & 13.4564 & 1.1214 & 1.0589 \tabularnewline
56 & 0.0574 & 0.0495 & 0.0041 & 21.6057 & 1.8005 & 1.3418 \tabularnewline
57 & 0.0508 & -0.0479 & 0.004 & 26.4481 & 2.204 & 1.4846 \tabularnewline
58 & 0.0522 & 0.0941 & 0.0078 & 96.6107 & 8.0509 & 2.8374 \tabularnewline
59 & 0.0562 & 0.0231 & 0.0019 & 5.0559 & 0.4213 & 0.6491 \tabularnewline
60 & 0.0694 & -0.0793 & 0.0066 & 39.0076 & 3.2506 & 1.803 \tabularnewline
61 & 0.0692 & 0.1697 & 0.0141 & 179.3403 & 14.945 & 3.8659 \tabularnewline
62 & 0.0625 & 0.1382 & 0.0115 & 145.6507 & 12.1376 & 3.4839 \tabularnewline
63 & 0.0554 & -0.1288 & 0.0107 & 161.2303 & 13.4359 & 3.6655 \tabularnewline
64 & 0.0566 & 0.1338 & 0.0112 & 166.7859 & 13.8988 & 3.7281 \tabularnewline
65 & 0.058 & 0.0363 & 0.003 & 11.6689 & 0.9724 & 0.9861 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33141&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]54[/C][C]0.0493[/C][C]-6e-04[/C][C]1e-04[/C][C]0.0047[/C][C]4e-04[/C][C]0.0199[/C][/ROW]
[ROW][C]55[/C][C]0.1122[/C][C]0.0773[/C][C]0.0064[/C][C]13.4564[/C][C]1.1214[/C][C]1.0589[/C][/ROW]
[ROW][C]56[/C][C]0.0574[/C][C]0.0495[/C][C]0.0041[/C][C]21.6057[/C][C]1.8005[/C][C]1.3418[/C][/ROW]
[ROW][C]57[/C][C]0.0508[/C][C]-0.0479[/C][C]0.004[/C][C]26.4481[/C][C]2.204[/C][C]1.4846[/C][/ROW]
[ROW][C]58[/C][C]0.0522[/C][C]0.0941[/C][C]0.0078[/C][C]96.6107[/C][C]8.0509[/C][C]2.8374[/C][/ROW]
[ROW][C]59[/C][C]0.0562[/C][C]0.0231[/C][C]0.0019[/C][C]5.0559[/C][C]0.4213[/C][C]0.6491[/C][/ROW]
[ROW][C]60[/C][C]0.0694[/C][C]-0.0793[/C][C]0.0066[/C][C]39.0076[/C][C]3.2506[/C][C]1.803[/C][/ROW]
[ROW][C]61[/C][C]0.0692[/C][C]0.1697[/C][C]0.0141[/C][C]179.3403[/C][C]14.945[/C][C]3.8659[/C][/ROW]
[ROW][C]62[/C][C]0.0625[/C][C]0.1382[/C][C]0.0115[/C][C]145.6507[/C][C]12.1376[/C][C]3.4839[/C][/ROW]
[ROW][C]63[/C][C]0.0554[/C][C]-0.1288[/C][C]0.0107[/C][C]161.2303[/C][C]13.4359[/C][C]3.6655[/C][/ROW]
[ROW][C]64[/C][C]0.0566[/C][C]0.1338[/C][C]0.0112[/C][C]166.7859[/C][C]13.8988[/C][C]3.7281[/C][/ROW]
[ROW][C]65[/C][C]0.058[/C][C]0.0363[/C][C]0.003[/C][C]11.6689[/C][C]0.9724[/C][C]0.9861[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33141&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33141&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
540.0493-6e-041e-040.00474e-040.0199
550.11220.07730.006413.45641.12141.0589
560.05740.04950.004121.60571.80051.3418
570.0508-0.04790.00426.44812.2041.4846
580.05220.09410.007896.61078.05092.8374
590.05620.02310.00195.05590.42130.6491
600.0694-0.07930.006639.00763.25061.803
610.06920.16970.0141179.340314.9453.8659
620.06250.13820.0115145.650712.13763.4839
630.0554-0.12880.0107161.230313.43593.6655
640.05660.13380.0112166.785913.89883.7281
650.0580.03630.00311.66890.97240.9861



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