Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 15 Dec 2007 10:48:28 -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/15/t11977400663i4zku4ed0t8o9d.htm/, Retrieved Thu, 02 May 2024 14:01:58 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4087, Retrieved Thu, 02 May 2024 14:01:58 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact201
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [paper forecast re...] [2007-12-15 17:48:28] [fef19078983b9fa83d10cb717d6f9786] [Current]
Feedback Forum

Post a new message
Dataseries X:
105,1
113,3
99,1
100,3
93,5
98,8
106,2
98,3
102,1
117,1
101,5
80,5
105,9
109,5
97,2
114,5
93,5
100,9
121,1
116,5
109,3
118,1
108,3
105,4
116,2
111,2
105,8
122,7
99,5
107,9
124,6
115
110,3
132,7
99,7
96,5
118,7
112,9
130,5
137,9
115
116,8
140,9
120,7
134,2
147,3
112,4
107,1
128,4
137,7
135
151
137,4
132,4
161,3
139,8
146
154,6
142,1
120,5




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4087&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])
3696.5-------
37118.7-------
38112.9-------
39130.5-------
40137.9-------
41115-------
42116.8-------
43140.9-------
44120.7-------
45134.2-------
46147.3-------
47112.4-------
48107.1-------
49128.4129.7376113.5142145.96110.43580.99690.90880.9969
50137.7124.682108.0102141.35380.0630.3310.9170.9806
51135134.947117.8561152.03790.49760.37610.6950.9993
52151144.4786126.9951161.96220.23240.8560.76961
53137.4121.7195103.8673139.57170.04267e-040.76970.9458
54132.4125.0218106.8229143.22060.21340.09120.81210.9732
55161.3146.8105128.2852165.33580.06260.93630.73411
56139.8129.7028110.8696148.5360.14675e-040.82560.9907
57146137.8693118.7453156.99330.20230.42160.64660.9992
58154.6152.4258133.0269171.82460.41310.74190.69771
59142.1119.566699.9076139.22560.01232e-040.76250.8931
60120.5114.29794.3916134.20230.27070.00310.76070.7607

\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 & 96.5 & - & - & - & - & - & - & - \tabularnewline
37 & 118.7 & - & - & - & - & - & - & - \tabularnewline
38 & 112.9 & - & - & - & - & - & - & - \tabularnewline
39 & 130.5 & - & - & - & - & - & - & - \tabularnewline
40 & 137.9 & - & - & - & - & - & - & - \tabularnewline
41 & 115 & - & - & - & - & - & - & - \tabularnewline
42 & 116.8 & - & - & - & - & - & - & - \tabularnewline
43 & 140.9 & - & - & - & - & - & - & - \tabularnewline
44 & 120.7 & - & - & - & - & - & - & - \tabularnewline
45 & 134.2 & - & - & - & - & - & - & - \tabularnewline
46 & 147.3 & - & - & - & - & - & - & - \tabularnewline
47 & 112.4 & - & - & - & - & - & - & - \tabularnewline
48 & 107.1 & - & - & - & - & - & - & - \tabularnewline
49 & 128.4 & 129.7376 & 113.5142 & 145.9611 & 0.4358 & 0.9969 & 0.9088 & 0.9969 \tabularnewline
50 & 137.7 & 124.682 & 108.0102 & 141.3538 & 0.063 & 0.331 & 0.917 & 0.9806 \tabularnewline
51 & 135 & 134.947 & 117.8561 & 152.0379 & 0.4976 & 0.3761 & 0.695 & 0.9993 \tabularnewline
52 & 151 & 144.4786 & 126.9951 & 161.9622 & 0.2324 & 0.856 & 0.7696 & 1 \tabularnewline
53 & 137.4 & 121.7195 & 103.8673 & 139.5717 & 0.0426 & 7e-04 & 0.7697 & 0.9458 \tabularnewline
54 & 132.4 & 125.0218 & 106.8229 & 143.2206 & 0.2134 & 0.0912 & 0.8121 & 0.9732 \tabularnewline
55 & 161.3 & 146.8105 & 128.2852 & 165.3358 & 0.0626 & 0.9363 & 0.7341 & 1 \tabularnewline
56 & 139.8 & 129.7028 & 110.8696 & 148.536 & 0.1467 & 5e-04 & 0.8256 & 0.9907 \tabularnewline
57 & 146 & 137.8693 & 118.7453 & 156.9933 & 0.2023 & 0.4216 & 0.6466 & 0.9992 \tabularnewline
58 & 154.6 & 152.4258 & 133.0269 & 171.8246 & 0.4131 & 0.7419 & 0.6977 & 1 \tabularnewline
59 & 142.1 & 119.5666 & 99.9076 & 139.2256 & 0.0123 & 2e-04 & 0.7625 & 0.8931 \tabularnewline
60 & 120.5 & 114.297 & 94.3916 & 134.2023 & 0.2707 & 0.0031 & 0.7607 & 0.7607 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4087&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]96.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]118.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]112.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]130.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]137.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]115[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]116.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]140.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]120.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]134.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]147.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]112.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]107.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]128.4[/C][C]129.7376[/C][C]113.5142[/C][C]145.9611[/C][C]0.4358[/C][C]0.9969[/C][C]0.9088[/C][C]0.9969[/C][/ROW]
[ROW][C]50[/C][C]137.7[/C][C]124.682[/C][C]108.0102[/C][C]141.3538[/C][C]0.063[/C][C]0.331[/C][C]0.917[/C][C]0.9806[/C][/ROW]
[ROW][C]51[/C][C]135[/C][C]134.947[/C][C]117.8561[/C][C]152.0379[/C][C]0.4976[/C][C]0.3761[/C][C]0.695[/C][C]0.9993[/C][/ROW]
[ROW][C]52[/C][C]151[/C][C]144.4786[/C][C]126.9951[/C][C]161.9622[/C][C]0.2324[/C][C]0.856[/C][C]0.7696[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]137.4[/C][C]121.7195[/C][C]103.8673[/C][C]139.5717[/C][C]0.0426[/C][C]7e-04[/C][C]0.7697[/C][C]0.9458[/C][/ROW]
[ROW][C]54[/C][C]132.4[/C][C]125.0218[/C][C]106.8229[/C][C]143.2206[/C][C]0.2134[/C][C]0.0912[/C][C]0.8121[/C][C]0.9732[/C][/ROW]
[ROW][C]55[/C][C]161.3[/C][C]146.8105[/C][C]128.2852[/C][C]165.3358[/C][C]0.0626[/C][C]0.9363[/C][C]0.7341[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]139.8[/C][C]129.7028[/C][C]110.8696[/C][C]148.536[/C][C]0.1467[/C][C]5e-04[/C][C]0.8256[/C][C]0.9907[/C][/ROW]
[ROW][C]57[/C][C]146[/C][C]137.8693[/C][C]118.7453[/C][C]156.9933[/C][C]0.2023[/C][C]0.4216[/C][C]0.6466[/C][C]0.9992[/C][/ROW]
[ROW][C]58[/C][C]154.6[/C][C]152.4258[/C][C]133.0269[/C][C]171.8246[/C][C]0.4131[/C][C]0.7419[/C][C]0.6977[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]142.1[/C][C]119.5666[/C][C]99.9076[/C][C]139.2256[/C][C]0.0123[/C][C]2e-04[/C][C]0.7625[/C][C]0.8931[/C][/ROW]
[ROW][C]60[/C][C]120.5[/C][C]114.297[/C][C]94.3916[/C][C]134.2023[/C][C]0.2707[/C][C]0.0031[/C][C]0.7607[/C][C]0.7607[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4087&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4087&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])
3696.5-------
37118.7-------
38112.9-------
39130.5-------
40137.9-------
41115-------
42116.8-------
43140.9-------
44120.7-------
45134.2-------
46147.3-------
47112.4-------
48107.1-------
49128.4129.7376113.5142145.96110.43580.99690.90880.9969
50137.7124.682108.0102141.35380.0630.3310.9170.9806
51135134.947117.8561152.03790.49760.37610.6950.9993
52151144.4786126.9951161.96220.23240.8560.76961
53137.4121.7195103.8673139.57170.04267e-040.76970.9458
54132.4125.0218106.8229143.22060.21340.09120.81210.9732
55161.3146.8105128.2852165.33580.06260.93630.73411
56139.8129.7028110.8696148.5360.14675e-040.82560.9907
57146137.8693118.7453156.99330.20230.42160.64660.9992
58154.6152.4258133.0269171.82460.41310.74190.69771
59142.1119.566699.9076139.22560.01232e-040.76250.8931
60120.5114.29794.3916134.20230.27070.00310.76070.7607







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0638-0.01039e-041.78930.14910.3861
500.06820.10440.0087169.468914.12243.758
510.06464e-0400.00282e-040.0153
520.06170.04510.003842.52823.5441.8826
530.07480.12880.0107245.877620.48984.5266
540.07430.0590.004954.43834.53652.1299
550.06440.09870.0082209.945817.49554.1828
560.07410.07780.0065101.95358.49612.9148
570.07080.0590.004966.10875.50912.3471
580.06490.01430.00124.72740.39390.6277
590.08390.18850.0157507.755442.31296.5048
600.08890.05430.004538.47783.20651.7907

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0638 & -0.0103 & 9e-04 & 1.7893 & 0.1491 & 0.3861 \tabularnewline
50 & 0.0682 & 0.1044 & 0.0087 & 169.4689 & 14.1224 & 3.758 \tabularnewline
51 & 0.0646 & 4e-04 & 0 & 0.0028 & 2e-04 & 0.0153 \tabularnewline
52 & 0.0617 & 0.0451 & 0.0038 & 42.5282 & 3.544 & 1.8826 \tabularnewline
53 & 0.0748 & 0.1288 & 0.0107 & 245.8776 & 20.4898 & 4.5266 \tabularnewline
54 & 0.0743 & 0.059 & 0.0049 & 54.4383 & 4.5365 & 2.1299 \tabularnewline
55 & 0.0644 & 0.0987 & 0.0082 & 209.9458 & 17.4955 & 4.1828 \tabularnewline
56 & 0.0741 & 0.0778 & 0.0065 & 101.9535 & 8.4961 & 2.9148 \tabularnewline
57 & 0.0708 & 0.059 & 0.0049 & 66.1087 & 5.5091 & 2.3471 \tabularnewline
58 & 0.0649 & 0.0143 & 0.0012 & 4.7274 & 0.3939 & 0.6277 \tabularnewline
59 & 0.0839 & 0.1885 & 0.0157 & 507.7554 & 42.3129 & 6.5048 \tabularnewline
60 & 0.0889 & 0.0543 & 0.0045 & 38.4778 & 3.2065 & 1.7907 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4087&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.0638[/C][C]-0.0103[/C][C]9e-04[/C][C]1.7893[/C][C]0.1491[/C][C]0.3861[/C][/ROW]
[ROW][C]50[/C][C]0.0682[/C][C]0.1044[/C][C]0.0087[/C][C]169.4689[/C][C]14.1224[/C][C]3.758[/C][/ROW]
[ROW][C]51[/C][C]0.0646[/C][C]4e-04[/C][C]0[/C][C]0.0028[/C][C]2e-04[/C][C]0.0153[/C][/ROW]
[ROW][C]52[/C][C]0.0617[/C][C]0.0451[/C][C]0.0038[/C][C]42.5282[/C][C]3.544[/C][C]1.8826[/C][/ROW]
[ROW][C]53[/C][C]0.0748[/C][C]0.1288[/C][C]0.0107[/C][C]245.8776[/C][C]20.4898[/C][C]4.5266[/C][/ROW]
[ROW][C]54[/C][C]0.0743[/C][C]0.059[/C][C]0.0049[/C][C]54.4383[/C][C]4.5365[/C][C]2.1299[/C][/ROW]
[ROW][C]55[/C][C]0.0644[/C][C]0.0987[/C][C]0.0082[/C][C]209.9458[/C][C]17.4955[/C][C]4.1828[/C][/ROW]
[ROW][C]56[/C][C]0.0741[/C][C]0.0778[/C][C]0.0065[/C][C]101.9535[/C][C]8.4961[/C][C]2.9148[/C][/ROW]
[ROW][C]57[/C][C]0.0708[/C][C]0.059[/C][C]0.0049[/C][C]66.1087[/C][C]5.5091[/C][C]2.3471[/C][/ROW]
[ROW][C]58[/C][C]0.0649[/C][C]0.0143[/C][C]0.0012[/C][C]4.7274[/C][C]0.3939[/C][C]0.6277[/C][/ROW]
[ROW][C]59[/C][C]0.0839[/C][C]0.1885[/C][C]0.0157[/C][C]507.7554[/C][C]42.3129[/C][C]6.5048[/C][/ROW]
[ROW][C]60[/C][C]0.0889[/C][C]0.0543[/C][C]0.0045[/C][C]38.4778[/C][C]3.2065[/C][C]1.7907[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4087&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4087&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.0638-0.01039e-041.78930.14910.3861
500.06820.10440.0087169.468914.12243.758
510.06464e-0400.00282e-040.0153
520.06170.04510.003842.52823.5441.8826
530.07480.12880.0107245.877620.48984.5266
540.07430.0590.004954.43834.53652.1299
550.06440.09870.0082209.945817.49554.1828
560.07410.07780.0065101.95358.49612.9148
570.07080.0590.004966.10875.50912.3471
580.06490.01430.00124.72740.39390.6277
590.08390.18850.0157507.755442.31296.5048
600.08890.05430.004538.47783.20651.7907



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