Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 11 Dec 2007 17:12:03 -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/12/t119741804171anu3ins6qbimj.htm/, Retrieved Thu, 02 May 2024 18:03:34 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3174, Retrieved Thu, 02 May 2024 18:03:34 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact235
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Voorspelling Tota...] [2007-12-12 00:12:03] [23ac93ee1f90519f073fd2a5f75c2fce] [Current]
Feedback Forum

Post a new message
Dataseries X:
117
103,8
100,8
110,6
104
112,6
107,3
98,9
109,8
104,9
102,2
123,9
124,9
112,7
121,9
100,6
104,3
120,4
107,5
102,9
125,6
107,5
108,8
128,4
121,1
119,5
128,7
108,7
105,5
119,8
111,3
110,6
120,1
97,5
107,7
127,3
117,2
119,8
116,2
111
112,4
130,6
109,1
118,8
123,9
101,6
112,8
128
129,6
125,8
119,5
115,7
113,6
129,7
112
116,8
127
112,9
113,3
121,7




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 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=3174&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]4 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=3174&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3174&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 time4 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])
36127.3-------
37117.2-------
38119.8-------
39116.2-------
40111-------
41112.4-------
42130.6-------
43109.1-------
44118.8-------
45123.9-------
46101.6-------
47112.8-------
48128-------
49129.6123.3962112.6003134.19210.130.20160.86970.2016
50125.8121.0505110.0817132.01930.1980.06330.58840.1072
51119.5119.8368108.7656130.9080.47620.14560.74020.0742
52115.7107.670294.9122120.42830.10870.03460.30459e-04
53113.6112.684699.7113125.65780.4450.32430.51710.0103
54129.7129.2223116.1083142.33640.47150.99020.41840.5725
55112109.82596.1031123.54690.3780.00230.54120.0047
56116.8113.663399.7648127.56170.32910.59270.23440.0216
57127127.7478113.7242141.77140.45840.9370.70460.4859
58112.9107.788993.4953122.08250.24170.00420.8020.0028
59113.3113.456199.0373127.87490.49150.53010.53550.024
60121.7130.0424115.5293144.55540.12990.98810.60870.6087

\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 & 127.3 & - & - & - & - & - & - & - \tabularnewline
37 & 117.2 & - & - & - & - & - & - & - \tabularnewline
38 & 119.8 & - & - & - & - & - & - & - \tabularnewline
39 & 116.2 & - & - & - & - & - & - & - \tabularnewline
40 & 111 & - & - & - & - & - & - & - \tabularnewline
41 & 112.4 & - & - & - & - & - & - & - \tabularnewline
42 & 130.6 & - & - & - & - & - & - & - \tabularnewline
43 & 109.1 & - & - & - & - & - & - & - \tabularnewline
44 & 118.8 & - & - & - & - & - & - & - \tabularnewline
45 & 123.9 & - & - & - & - & - & - & - \tabularnewline
46 & 101.6 & - & - & - & - & - & - & - \tabularnewline
47 & 112.8 & - & - & - & - & - & - & - \tabularnewline
48 & 128 & - & - & - & - & - & - & - \tabularnewline
49 & 129.6 & 123.3962 & 112.6003 & 134.1921 & 0.13 & 0.2016 & 0.8697 & 0.2016 \tabularnewline
50 & 125.8 & 121.0505 & 110.0817 & 132.0193 & 0.198 & 0.0633 & 0.5884 & 0.1072 \tabularnewline
51 & 119.5 & 119.8368 & 108.7656 & 130.908 & 0.4762 & 0.1456 & 0.7402 & 0.0742 \tabularnewline
52 & 115.7 & 107.6702 & 94.9122 & 120.4283 & 0.1087 & 0.0346 & 0.3045 & 9e-04 \tabularnewline
53 & 113.6 & 112.6846 & 99.7113 & 125.6578 & 0.445 & 0.3243 & 0.5171 & 0.0103 \tabularnewline
54 & 129.7 & 129.2223 & 116.1083 & 142.3364 & 0.4715 & 0.9902 & 0.4184 & 0.5725 \tabularnewline
55 & 112 & 109.825 & 96.1031 & 123.5469 & 0.378 & 0.0023 & 0.5412 & 0.0047 \tabularnewline
56 & 116.8 & 113.6633 & 99.7648 & 127.5617 & 0.3291 & 0.5927 & 0.2344 & 0.0216 \tabularnewline
57 & 127 & 127.7478 & 113.7242 & 141.7714 & 0.4584 & 0.937 & 0.7046 & 0.4859 \tabularnewline
58 & 112.9 & 107.7889 & 93.4953 & 122.0825 & 0.2417 & 0.0042 & 0.802 & 0.0028 \tabularnewline
59 & 113.3 & 113.4561 & 99.0373 & 127.8749 & 0.4915 & 0.5301 & 0.5355 & 0.024 \tabularnewline
60 & 121.7 & 130.0424 & 115.5293 & 144.5554 & 0.1299 & 0.9881 & 0.6087 & 0.6087 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3174&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]127.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]119.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]116.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]112.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]130.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]109.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]118.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]123.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]101.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]112.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]128[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]129.6[/C][C]123.3962[/C][C]112.6003[/C][C]134.1921[/C][C]0.13[/C][C]0.2016[/C][C]0.8697[/C][C]0.2016[/C][/ROW]
[ROW][C]50[/C][C]125.8[/C][C]121.0505[/C][C]110.0817[/C][C]132.0193[/C][C]0.198[/C][C]0.0633[/C][C]0.5884[/C][C]0.1072[/C][/ROW]
[ROW][C]51[/C][C]119.5[/C][C]119.8368[/C][C]108.7656[/C][C]130.908[/C][C]0.4762[/C][C]0.1456[/C][C]0.7402[/C][C]0.0742[/C][/ROW]
[ROW][C]52[/C][C]115.7[/C][C]107.6702[/C][C]94.9122[/C][C]120.4283[/C][C]0.1087[/C][C]0.0346[/C][C]0.3045[/C][C]9e-04[/C][/ROW]
[ROW][C]53[/C][C]113.6[/C][C]112.6846[/C][C]99.7113[/C][C]125.6578[/C][C]0.445[/C][C]0.3243[/C][C]0.5171[/C][C]0.0103[/C][/ROW]
[ROW][C]54[/C][C]129.7[/C][C]129.2223[/C][C]116.1083[/C][C]142.3364[/C][C]0.4715[/C][C]0.9902[/C][C]0.4184[/C][C]0.5725[/C][/ROW]
[ROW][C]55[/C][C]112[/C][C]109.825[/C][C]96.1031[/C][C]123.5469[/C][C]0.378[/C][C]0.0023[/C][C]0.5412[/C][C]0.0047[/C][/ROW]
[ROW][C]56[/C][C]116.8[/C][C]113.6633[/C][C]99.7648[/C][C]127.5617[/C][C]0.3291[/C][C]0.5927[/C][C]0.2344[/C][C]0.0216[/C][/ROW]
[ROW][C]57[/C][C]127[/C][C]127.7478[/C][C]113.7242[/C][C]141.7714[/C][C]0.4584[/C][C]0.937[/C][C]0.7046[/C][C]0.4859[/C][/ROW]
[ROW][C]58[/C][C]112.9[/C][C]107.7889[/C][C]93.4953[/C][C]122.0825[/C][C]0.2417[/C][C]0.0042[/C][C]0.802[/C][C]0.0028[/C][/ROW]
[ROW][C]59[/C][C]113.3[/C][C]113.4561[/C][C]99.0373[/C][C]127.8749[/C][C]0.4915[/C][C]0.5301[/C][C]0.5355[/C][C]0.024[/C][/ROW]
[ROW][C]60[/C][C]121.7[/C][C]130.0424[/C][C]115.5293[/C][C]144.5554[/C][C]0.1299[/C][C]0.9881[/C][C]0.6087[/C][C]0.6087[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3174&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3174&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])
36127.3-------
37117.2-------
38119.8-------
39116.2-------
40111-------
41112.4-------
42130.6-------
43109.1-------
44118.8-------
45123.9-------
46101.6-------
47112.8-------
48128-------
49129.6123.3962112.6003134.19210.130.20160.86970.2016
50125.8121.0505110.0817132.01930.1980.06330.58840.1072
51119.5119.8368108.7656130.9080.47620.14560.74020.0742
52115.7107.670294.9122120.42830.10870.03460.30459e-04
53113.6112.684699.7113125.65780.4450.32430.51710.0103
54129.7129.2223116.1083142.33640.47150.99020.41840.5725
55112109.82596.1031123.54690.3780.00230.54120.0047
56116.8113.663399.7648127.56170.32910.59270.23440.0216
57127127.7478113.7242141.77140.45840.9370.70460.4859
58112.9107.788993.4953122.08250.24170.00420.8020.0028
59113.3113.456199.0373127.87490.49150.53010.53550.024
60121.7130.0424115.5293144.55540.12990.98810.60870.6087







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.04460.05030.004238.48713.20731.7909
500.04620.03920.003322.55791.87981.3711
510.0471-0.00282e-040.11340.00950.0972
520.06050.07460.006264.47725.37312.318
530.05870.00817e-040.8380.06980.2643
540.05180.00373e-040.22820.0190.1379
550.06370.01980.00174.73050.39420.6279
560.06240.02760.00239.8390.81990.9055
570.056-0.00595e-040.55920.04660.2159
580.06770.04740.00426.12322.17691.4754
590.0648-0.00141e-040.02440.0020.0451
600.0569-0.06420.005369.5955.79962.4082

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0446 & 0.0503 & 0.0042 & 38.4871 & 3.2073 & 1.7909 \tabularnewline
50 & 0.0462 & 0.0392 & 0.0033 & 22.5579 & 1.8798 & 1.3711 \tabularnewline
51 & 0.0471 & -0.0028 & 2e-04 & 0.1134 & 0.0095 & 0.0972 \tabularnewline
52 & 0.0605 & 0.0746 & 0.0062 & 64.4772 & 5.3731 & 2.318 \tabularnewline
53 & 0.0587 & 0.0081 & 7e-04 & 0.838 & 0.0698 & 0.2643 \tabularnewline
54 & 0.0518 & 0.0037 & 3e-04 & 0.2282 & 0.019 & 0.1379 \tabularnewline
55 & 0.0637 & 0.0198 & 0.0017 & 4.7305 & 0.3942 & 0.6279 \tabularnewline
56 & 0.0624 & 0.0276 & 0.0023 & 9.839 & 0.8199 & 0.9055 \tabularnewline
57 & 0.056 & -0.0059 & 5e-04 & 0.5592 & 0.0466 & 0.2159 \tabularnewline
58 & 0.0677 & 0.0474 & 0.004 & 26.1232 & 2.1769 & 1.4754 \tabularnewline
59 & 0.0648 & -0.0014 & 1e-04 & 0.0244 & 0.002 & 0.0451 \tabularnewline
60 & 0.0569 & -0.0642 & 0.0053 & 69.595 & 5.7996 & 2.4082 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3174&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.0446[/C][C]0.0503[/C][C]0.0042[/C][C]38.4871[/C][C]3.2073[/C][C]1.7909[/C][/ROW]
[ROW][C]50[/C][C]0.0462[/C][C]0.0392[/C][C]0.0033[/C][C]22.5579[/C][C]1.8798[/C][C]1.3711[/C][/ROW]
[ROW][C]51[/C][C]0.0471[/C][C]-0.0028[/C][C]2e-04[/C][C]0.1134[/C][C]0.0095[/C][C]0.0972[/C][/ROW]
[ROW][C]52[/C][C]0.0605[/C][C]0.0746[/C][C]0.0062[/C][C]64.4772[/C][C]5.3731[/C][C]2.318[/C][/ROW]
[ROW][C]53[/C][C]0.0587[/C][C]0.0081[/C][C]7e-04[/C][C]0.838[/C][C]0.0698[/C][C]0.2643[/C][/ROW]
[ROW][C]54[/C][C]0.0518[/C][C]0.0037[/C][C]3e-04[/C][C]0.2282[/C][C]0.019[/C][C]0.1379[/C][/ROW]
[ROW][C]55[/C][C]0.0637[/C][C]0.0198[/C][C]0.0017[/C][C]4.7305[/C][C]0.3942[/C][C]0.6279[/C][/ROW]
[ROW][C]56[/C][C]0.0624[/C][C]0.0276[/C][C]0.0023[/C][C]9.839[/C][C]0.8199[/C][C]0.9055[/C][/ROW]
[ROW][C]57[/C][C]0.056[/C][C]-0.0059[/C][C]5e-04[/C][C]0.5592[/C][C]0.0466[/C][C]0.2159[/C][/ROW]
[ROW][C]58[/C][C]0.0677[/C][C]0.0474[/C][C]0.004[/C][C]26.1232[/C][C]2.1769[/C][C]1.4754[/C][/ROW]
[ROW][C]59[/C][C]0.0648[/C][C]-0.0014[/C][C]1e-04[/C][C]0.0244[/C][C]0.002[/C][C]0.0451[/C][/ROW]
[ROW][C]60[/C][C]0.0569[/C][C]-0.0642[/C][C]0.0053[/C][C]69.595[/C][C]5.7996[/C][C]2.4082[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3174&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3174&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.04460.05030.004238.48713.20731.7909
500.04620.03920.003322.55791.87981.3711
510.0471-0.00282e-040.11340.00950.0972
520.06050.07460.006264.47725.37312.318
530.05870.00817e-040.8380.06980.2643
540.05180.00373e-040.22820.0190.1379
550.06370.01980.00174.73050.39420.6279
560.06240.02760.00239.8390.81990.9055
570.056-0.00595e-040.55920.04660.2159
580.06770.04740.00426.12322.17691.4754
590.0648-0.00141e-040.02440.0020.0451
600.0569-0.06420.005369.5955.79962.4082



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)
}
(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')