Free Statistics

of Irreproducible Research!

Author's title

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

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsWS 9 Foorspelling
Estimated Impact250
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [WS 9 Foorspelling] [2007-12-16 12:20:56] [0cecb02636bfe8ebd97a7fef80b2b9e7] [Current]
Feedback Forum

Post a new message
Dataseries X:
103.8
100.8
110.6
104.0
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.0
112.4
130.6
109.1
118.8
123.9
101.6
112.8
128.0
129.6
125.8
119.5
115.7
113.6
129.7
112.0
116.8
127.0
112.1
113.3
120.5
127.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=4150&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=4150&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4150&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])
36117.2-------
37119.8-------
38116.2-------
39111-------
40112.4-------
41130.6-------
42109.1-------
43118.8-------
44123.9-------
45101.6-------
46112.8-------
47128-------
48129.6-------
49125.8122.9169111.7846135.15790.32220.14230.69110.1423
50119.5119.1923108.2538131.23610.480.14110.68690.0452
51115.7110.7861100.581122.02670.19580.06430.48515e-04
52113.6115.0008102.6851128.79360.42110.46040.64420.019
53129.7131.6088117.3101147.65030.40780.98610.5490.5969
54112111.644399.4515125.3320.47970.00490.64220.0051
55116.8115.5137102.2569130.4890.43320.67720.33360.0326
56127129.5856114.5433146.60330.38290.92960.74370.4993
57112.1109.906597.084124.42250.38350.01050.8690.0039
58113.3115.2874101.556130.87550.40130.65570.62280.036
59120.5131.3649115.5932149.28850.11740.97590.64350.5765
60127.7131.5559115.6956149.59050.33760.88520.58420.5842

\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 & 117.2 & - & - & - & - & - & - & - \tabularnewline
37 & 119.8 & - & - & - & - & - & - & - \tabularnewline
38 & 116.2 & - & - & - & - & - & - & - \tabularnewline
39 & 111 & - & - & - & - & - & - & - \tabularnewline
40 & 112.4 & - & - & - & - & - & - & - \tabularnewline
41 & 130.6 & - & - & - & - & - & - & - \tabularnewline
42 & 109.1 & - & - & - & - & - & - & - \tabularnewline
43 & 118.8 & - & - & - & - & - & - & - \tabularnewline
44 & 123.9 & - & - & - & - & - & - & - \tabularnewline
45 & 101.6 & - & - & - & - & - & - & - \tabularnewline
46 & 112.8 & - & - & - & - & - & - & - \tabularnewline
47 & 128 & - & - & - & - & - & - & - \tabularnewline
48 & 129.6 & - & - & - & - & - & - & - \tabularnewline
49 & 125.8 & 122.9169 & 111.7846 & 135.1579 & 0.3222 & 0.1423 & 0.6911 & 0.1423 \tabularnewline
50 & 119.5 & 119.1923 & 108.2538 & 131.2361 & 0.48 & 0.1411 & 0.6869 & 0.0452 \tabularnewline
51 & 115.7 & 110.7861 & 100.581 & 122.0267 & 0.1958 & 0.0643 & 0.4851 & 5e-04 \tabularnewline
52 & 113.6 & 115.0008 & 102.6851 & 128.7936 & 0.4211 & 0.4604 & 0.6442 & 0.019 \tabularnewline
53 & 129.7 & 131.6088 & 117.3101 & 147.6503 & 0.4078 & 0.9861 & 0.549 & 0.5969 \tabularnewline
54 & 112 & 111.6443 & 99.4515 & 125.332 & 0.4797 & 0.0049 & 0.6422 & 0.0051 \tabularnewline
55 & 116.8 & 115.5137 & 102.2569 & 130.489 & 0.4332 & 0.6772 & 0.3336 & 0.0326 \tabularnewline
56 & 127 & 129.5856 & 114.5433 & 146.6033 & 0.3829 & 0.9296 & 0.7437 & 0.4993 \tabularnewline
57 & 112.1 & 109.9065 & 97.084 & 124.4225 & 0.3835 & 0.0105 & 0.869 & 0.0039 \tabularnewline
58 & 113.3 & 115.2874 & 101.556 & 130.8755 & 0.4013 & 0.6557 & 0.6228 & 0.036 \tabularnewline
59 & 120.5 & 131.3649 & 115.5932 & 149.2885 & 0.1174 & 0.9759 & 0.6435 & 0.5765 \tabularnewline
60 & 127.7 & 131.5559 & 115.6956 & 149.5905 & 0.3376 & 0.8852 & 0.5842 & 0.5842 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4150&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]117.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]119.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]116.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]112.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]130.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]109.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]118.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]123.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]101.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]112.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]128[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]129.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]125.8[/C][C]122.9169[/C][C]111.7846[/C][C]135.1579[/C][C]0.3222[/C][C]0.1423[/C][C]0.6911[/C][C]0.1423[/C][/ROW]
[ROW][C]50[/C][C]119.5[/C][C]119.1923[/C][C]108.2538[/C][C]131.2361[/C][C]0.48[/C][C]0.1411[/C][C]0.6869[/C][C]0.0452[/C][/ROW]
[ROW][C]51[/C][C]115.7[/C][C]110.7861[/C][C]100.581[/C][C]122.0267[/C][C]0.1958[/C][C]0.0643[/C][C]0.4851[/C][C]5e-04[/C][/ROW]
[ROW][C]52[/C][C]113.6[/C][C]115.0008[/C][C]102.6851[/C][C]128.7936[/C][C]0.4211[/C][C]0.4604[/C][C]0.6442[/C][C]0.019[/C][/ROW]
[ROW][C]53[/C][C]129.7[/C][C]131.6088[/C][C]117.3101[/C][C]147.6503[/C][C]0.4078[/C][C]0.9861[/C][C]0.549[/C][C]0.5969[/C][/ROW]
[ROW][C]54[/C][C]112[/C][C]111.6443[/C][C]99.4515[/C][C]125.332[/C][C]0.4797[/C][C]0.0049[/C][C]0.6422[/C][C]0.0051[/C][/ROW]
[ROW][C]55[/C][C]116.8[/C][C]115.5137[/C][C]102.2569[/C][C]130.489[/C][C]0.4332[/C][C]0.6772[/C][C]0.3336[/C][C]0.0326[/C][/ROW]
[ROW][C]56[/C][C]127[/C][C]129.5856[/C][C]114.5433[/C][C]146.6033[/C][C]0.3829[/C][C]0.9296[/C][C]0.7437[/C][C]0.4993[/C][/ROW]
[ROW][C]57[/C][C]112.1[/C][C]109.9065[/C][C]97.084[/C][C]124.4225[/C][C]0.3835[/C][C]0.0105[/C][C]0.869[/C][C]0.0039[/C][/ROW]
[ROW][C]58[/C][C]113.3[/C][C]115.2874[/C][C]101.556[/C][C]130.8755[/C][C]0.4013[/C][C]0.6557[/C][C]0.6228[/C][C]0.036[/C][/ROW]
[ROW][C]59[/C][C]120.5[/C][C]131.3649[/C][C]115.5932[/C][C]149.2885[/C][C]0.1174[/C][C]0.9759[/C][C]0.6435[/C][C]0.5765[/C][/ROW]
[ROW][C]60[/C][C]127.7[/C][C]131.5559[/C][C]115.6956[/C][C]149.5905[/C][C]0.3376[/C][C]0.8852[/C][C]0.5842[/C][C]0.5842[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4150&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4150&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])
36117.2-------
37119.8-------
38116.2-------
39111-------
40112.4-------
41130.6-------
42109.1-------
43118.8-------
44123.9-------
45101.6-------
46112.8-------
47128-------
48129.6-------
49125.8122.9169111.7846135.15790.32220.14230.69110.1423
50119.5119.1923108.2538131.23610.480.14110.68690.0452
51115.7110.7861100.581122.02670.19580.06430.48515e-04
52113.6115.0008102.6851128.79360.42110.46040.64420.019
53129.7131.6088117.3101147.65030.40780.98610.5490.5969
54112111.644399.4515125.3320.47970.00490.64220.0051
55116.8115.5137102.2569130.4890.43320.67720.33360.0326
56127129.5856114.5433146.60330.38290.92960.74370.4993
57112.1109.906597.084124.42250.38350.01050.8690.0039
58113.3115.2874101.556130.87550.40130.65570.62280.036
59120.5131.3649115.5932149.28850.11740.97590.64350.5765
60127.7131.5559115.6956149.59050.33760.88520.58420.5842







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.05080.02350.0028.31220.69270.8323
500.05160.00262e-040.09470.00790.0888
510.05180.04440.003724.1462.01221.4185
520.0612-0.01220.0011.96230.16350.4044
530.0622-0.01450.00123.64350.30360.551
540.06260.00323e-040.12650.01050.1027
550.06610.01119e-041.65460.13790.3713
560.067-0.020.00176.68510.55710.7464
570.06740.020.00174.81150.4010.6332
580.069-0.01720.00143.94980.32920.5737
590.0696-0.08270.0069118.04559.83713.1364
600.0699-0.02930.002414.86811.2391.1131

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0508 & 0.0235 & 0.002 & 8.3122 & 0.6927 & 0.8323 \tabularnewline
50 & 0.0516 & 0.0026 & 2e-04 & 0.0947 & 0.0079 & 0.0888 \tabularnewline
51 & 0.0518 & 0.0444 & 0.0037 & 24.146 & 2.0122 & 1.4185 \tabularnewline
52 & 0.0612 & -0.0122 & 0.001 & 1.9623 & 0.1635 & 0.4044 \tabularnewline
53 & 0.0622 & -0.0145 & 0.0012 & 3.6435 & 0.3036 & 0.551 \tabularnewline
54 & 0.0626 & 0.0032 & 3e-04 & 0.1265 & 0.0105 & 0.1027 \tabularnewline
55 & 0.0661 & 0.0111 & 9e-04 & 1.6546 & 0.1379 & 0.3713 \tabularnewline
56 & 0.067 & -0.02 & 0.0017 & 6.6851 & 0.5571 & 0.7464 \tabularnewline
57 & 0.0674 & 0.02 & 0.0017 & 4.8115 & 0.401 & 0.6332 \tabularnewline
58 & 0.069 & -0.0172 & 0.0014 & 3.9498 & 0.3292 & 0.5737 \tabularnewline
59 & 0.0696 & -0.0827 & 0.0069 & 118.0455 & 9.8371 & 3.1364 \tabularnewline
60 & 0.0699 & -0.0293 & 0.0024 & 14.8681 & 1.239 & 1.1131 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4150&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.0508[/C][C]0.0235[/C][C]0.002[/C][C]8.3122[/C][C]0.6927[/C][C]0.8323[/C][/ROW]
[ROW][C]50[/C][C]0.0516[/C][C]0.0026[/C][C]2e-04[/C][C]0.0947[/C][C]0.0079[/C][C]0.0888[/C][/ROW]
[ROW][C]51[/C][C]0.0518[/C][C]0.0444[/C][C]0.0037[/C][C]24.146[/C][C]2.0122[/C][C]1.4185[/C][/ROW]
[ROW][C]52[/C][C]0.0612[/C][C]-0.0122[/C][C]0.001[/C][C]1.9623[/C][C]0.1635[/C][C]0.4044[/C][/ROW]
[ROW][C]53[/C][C]0.0622[/C][C]-0.0145[/C][C]0.0012[/C][C]3.6435[/C][C]0.3036[/C][C]0.551[/C][/ROW]
[ROW][C]54[/C][C]0.0626[/C][C]0.0032[/C][C]3e-04[/C][C]0.1265[/C][C]0.0105[/C][C]0.1027[/C][/ROW]
[ROW][C]55[/C][C]0.0661[/C][C]0.0111[/C][C]9e-04[/C][C]1.6546[/C][C]0.1379[/C][C]0.3713[/C][/ROW]
[ROW][C]56[/C][C]0.067[/C][C]-0.02[/C][C]0.0017[/C][C]6.6851[/C][C]0.5571[/C][C]0.7464[/C][/ROW]
[ROW][C]57[/C][C]0.0674[/C][C]0.02[/C][C]0.0017[/C][C]4.8115[/C][C]0.401[/C][C]0.6332[/C][/ROW]
[ROW][C]58[/C][C]0.069[/C][C]-0.0172[/C][C]0.0014[/C][C]3.9498[/C][C]0.3292[/C][C]0.5737[/C][/ROW]
[ROW][C]59[/C][C]0.0696[/C][C]-0.0827[/C][C]0.0069[/C][C]118.0455[/C][C]9.8371[/C][C]3.1364[/C][/ROW]
[ROW][C]60[/C][C]0.0699[/C][C]-0.0293[/C][C]0.0024[/C][C]14.8681[/C][C]1.239[/C][C]1.1131[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4150&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4150&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.05080.02350.0028.31220.69270.8323
500.05160.00262e-040.09470.00790.0888
510.05180.04440.003724.1462.01221.4185
520.0612-0.01220.0011.96230.16350.4044
530.0622-0.01450.00123.64350.30360.551
540.06260.00323e-040.12650.01050.1027
550.06610.01119e-041.65460.13790.3713
560.067-0.020.00176.68510.55710.7464
570.06740.020.00174.81150.4010.6332
580.069-0.01720.00143.94980.32920.5737
590.0696-0.08270.0069118.04559.83713.1364
600.0699-0.02930.002414.86811.2391.1131



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