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 computationTue, 16 Dec 2008 13:54:52 -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/16/t1229460927zyed9s9ljkcmqfm.htm/, Retrieved Wed, 15 May 2024 21:07:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34195, Retrieved Wed, 15 May 2024 21:07:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact169
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [paper forecast] [2007-12-14 20:47:44] [22f18fc6a98517db16300404be421f9a]
-   PD  [ARIMA Forecasting] [Forecast mannen] [2008-12-16 20:51:44] [4ddbf81f78ea7c738951638c7e93f6ee]
-    D    [ARIMA Forecasting] [Forecast vrouwen] [2008-12-16 20:53:18] [4ddbf81f78ea7c738951638c7e93f6ee]
-    D        [ARIMA Forecasting] [Forecast totaal] [2008-12-16 20:54:52] [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 time2 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 & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34195&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]2 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=34195&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34195&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 time2 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[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.69657.26848.12460.03470.81580.03240.8158
5077.82536.95888.69170.0310.88260.26710.7691
5177.58026.40518.75530.16660.83340.29690.5532
5277.48386.13228.83550.24150.75850.27310.4906
537.27.43245.97218.89270.37750.71920.26510.4639
547.37.53985.98769.0920.3810.66610.28060.52
557.17.57025.91979.22070.28830.62580.30490.5332
566.87.48975.73339.24610.22080.66820.32350.4954
576.67.58995.72939.45050.14850.79730.33290.5377
586.27.28065.32429.2370.13950.75230.33720.413
596.26.77354.72968.81740.29120.70880.34130.243
606.87.07254.94639.19870.40080.78940.34680.3468

\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.6965 & 7.2684 & 8.1246 & 0.0347 & 0.8158 & 0.0324 & 0.8158 \tabularnewline
50 & 7 & 7.8253 & 6.9588 & 8.6917 & 0.031 & 0.8826 & 0.2671 & 0.7691 \tabularnewline
51 & 7 & 7.5802 & 6.4051 & 8.7553 & 0.1666 & 0.8334 & 0.2969 & 0.5532 \tabularnewline
52 & 7 & 7.4838 & 6.1322 & 8.8355 & 0.2415 & 0.7585 & 0.2731 & 0.4906 \tabularnewline
53 & 7.2 & 7.4324 & 5.9721 & 8.8927 & 0.3775 & 0.7192 & 0.2651 & 0.4639 \tabularnewline
54 & 7.3 & 7.5398 & 5.9876 & 9.092 & 0.381 & 0.6661 & 0.2806 & 0.52 \tabularnewline
55 & 7.1 & 7.5702 & 5.9197 & 9.2207 & 0.2883 & 0.6258 & 0.3049 & 0.5332 \tabularnewline
56 & 6.8 & 7.4897 & 5.7333 & 9.2461 & 0.2208 & 0.6682 & 0.3235 & 0.4954 \tabularnewline
57 & 6.6 & 7.5899 & 5.7293 & 9.4505 & 0.1485 & 0.7973 & 0.3329 & 0.5377 \tabularnewline
58 & 6.2 & 7.2806 & 5.3242 & 9.237 & 0.1395 & 0.7523 & 0.3372 & 0.413 \tabularnewline
59 & 6.2 & 6.7735 & 4.7296 & 8.8174 & 0.2912 & 0.7088 & 0.3413 & 0.243 \tabularnewline
60 & 6.8 & 7.0725 & 4.9463 & 9.1987 & 0.4008 & 0.7894 & 0.3468 & 0.3468 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34195&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.6965[/C][C]7.2684[/C][C]8.1246[/C][C]0.0347[/C][C]0.8158[/C][C]0.0324[/C][C]0.8158[/C][/ROW]
[ROW][C]50[/C][C]7[/C][C]7.8253[/C][C]6.9588[/C][C]8.6917[/C][C]0.031[/C][C]0.8826[/C][C]0.2671[/C][C]0.7691[/C][/ROW]
[ROW][C]51[/C][C]7[/C][C]7.5802[/C][C]6.4051[/C][C]8.7553[/C][C]0.1666[/C][C]0.8334[/C][C]0.2969[/C][C]0.5532[/C][/ROW]
[ROW][C]52[/C][C]7[/C][C]7.4838[/C][C]6.1322[/C][C]8.8355[/C][C]0.2415[/C][C]0.7585[/C][C]0.2731[/C][C]0.4906[/C][/ROW]
[ROW][C]53[/C][C]7.2[/C][C]7.4324[/C][C]5.9721[/C][C]8.8927[/C][C]0.3775[/C][C]0.7192[/C][C]0.2651[/C][C]0.4639[/C][/ROW]
[ROW][C]54[/C][C]7.3[/C][C]7.5398[/C][C]5.9876[/C][C]9.092[/C][C]0.381[/C][C]0.6661[/C][C]0.2806[/C][C]0.52[/C][/ROW]
[ROW][C]55[/C][C]7.1[/C][C]7.5702[/C][C]5.9197[/C][C]9.2207[/C][C]0.2883[/C][C]0.6258[/C][C]0.3049[/C][C]0.5332[/C][/ROW]
[ROW][C]56[/C][C]6.8[/C][C]7.4897[/C][C]5.7333[/C][C]9.2461[/C][C]0.2208[/C][C]0.6682[/C][C]0.3235[/C][C]0.4954[/C][/ROW]
[ROW][C]57[/C][C]6.6[/C][C]7.5899[/C][C]5.7293[/C][C]9.4505[/C][C]0.1485[/C][C]0.7973[/C][C]0.3329[/C][C]0.5377[/C][/ROW]
[ROW][C]58[/C][C]6.2[/C][C]7.2806[/C][C]5.3242[/C][C]9.237[/C][C]0.1395[/C][C]0.7523[/C][C]0.3372[/C][C]0.413[/C][/ROW]
[ROW][C]59[/C][C]6.2[/C][C]6.7735[/C][C]4.7296[/C][C]8.8174[/C][C]0.2912[/C][C]0.7088[/C][C]0.3413[/C][C]0.243[/C][/ROW]
[ROW][C]60[/C][C]6.8[/C][C]7.0725[/C][C]4.9463[/C][C]9.1987[/C][C]0.4008[/C][C]0.7894[/C][C]0.3468[/C][C]0.3468[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34195&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34195&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.69657.26848.12460.03470.81580.03240.8158
5077.82536.95888.69170.0310.88260.26710.7691
5177.58026.40518.75530.16660.83340.29690.5532
5277.48386.13228.83550.24150.75850.27310.4906
537.27.43245.97218.89270.37750.71920.26510.4639
547.37.53985.98769.0920.3810.66610.28060.52
557.17.57025.91979.22070.28830.62580.30490.5332
566.87.48975.73339.24610.22080.66820.32350.4954
576.67.58995.72939.45050.14850.79730.33290.5377
586.27.28065.32429.2370.13950.75230.33720.413
596.26.77354.72968.81740.29120.70880.34130.243
606.87.07254.94639.19870.40080.78940.34680.3468







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0284-0.05150.00430.15720.01310.1145
500.0565-0.10550.00880.68110.05680.2382
510.0791-0.07650.00640.33660.0280.1675
520.0921-0.06460.00540.23410.01950.1397
530.1002-0.03130.00260.0540.00450.0671
540.105-0.03180.00270.05750.00480.0692
550.1112-0.06210.00520.22110.01840.1357
560.1196-0.09210.00770.47570.03960.1991
570.1251-0.13040.01090.97990.08170.2858
580.1371-0.14840.01241.16770.09730.3119
590.154-0.08470.00710.32890.02740.1655
600.1534-0.03850.00320.07430.00620.0787

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0284 & -0.0515 & 0.0043 & 0.1572 & 0.0131 & 0.1145 \tabularnewline
50 & 0.0565 & -0.1055 & 0.0088 & 0.6811 & 0.0568 & 0.2382 \tabularnewline
51 & 0.0791 & -0.0765 & 0.0064 & 0.3366 & 0.028 & 0.1675 \tabularnewline
52 & 0.0921 & -0.0646 & 0.0054 & 0.2341 & 0.0195 & 0.1397 \tabularnewline
53 & 0.1002 & -0.0313 & 0.0026 & 0.054 & 0.0045 & 0.0671 \tabularnewline
54 & 0.105 & -0.0318 & 0.0027 & 0.0575 & 0.0048 & 0.0692 \tabularnewline
55 & 0.1112 & -0.0621 & 0.0052 & 0.2211 & 0.0184 & 0.1357 \tabularnewline
56 & 0.1196 & -0.0921 & 0.0077 & 0.4757 & 0.0396 & 0.1991 \tabularnewline
57 & 0.1251 & -0.1304 & 0.0109 & 0.9799 & 0.0817 & 0.2858 \tabularnewline
58 & 0.1371 & -0.1484 & 0.0124 & 1.1677 & 0.0973 & 0.3119 \tabularnewline
59 & 0.154 & -0.0847 & 0.0071 & 0.3289 & 0.0274 & 0.1655 \tabularnewline
60 & 0.1534 & -0.0385 & 0.0032 & 0.0743 & 0.0062 & 0.0787 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34195&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.0284[/C][C]-0.0515[/C][C]0.0043[/C][C]0.1572[/C][C]0.0131[/C][C]0.1145[/C][/ROW]
[ROW][C]50[/C][C]0.0565[/C][C]-0.1055[/C][C]0.0088[/C][C]0.6811[/C][C]0.0568[/C][C]0.2382[/C][/ROW]
[ROW][C]51[/C][C]0.0791[/C][C]-0.0765[/C][C]0.0064[/C][C]0.3366[/C][C]0.028[/C][C]0.1675[/C][/ROW]
[ROW][C]52[/C][C]0.0921[/C][C]-0.0646[/C][C]0.0054[/C][C]0.2341[/C][C]0.0195[/C][C]0.1397[/C][/ROW]
[ROW][C]53[/C][C]0.1002[/C][C]-0.0313[/C][C]0.0026[/C][C]0.054[/C][C]0.0045[/C][C]0.0671[/C][/ROW]
[ROW][C]54[/C][C]0.105[/C][C]-0.0318[/C][C]0.0027[/C][C]0.0575[/C][C]0.0048[/C][C]0.0692[/C][/ROW]
[ROW][C]55[/C][C]0.1112[/C][C]-0.0621[/C][C]0.0052[/C][C]0.2211[/C][C]0.0184[/C][C]0.1357[/C][/ROW]
[ROW][C]56[/C][C]0.1196[/C][C]-0.0921[/C][C]0.0077[/C][C]0.4757[/C][C]0.0396[/C][C]0.1991[/C][/ROW]
[ROW][C]57[/C][C]0.1251[/C][C]-0.1304[/C][C]0.0109[/C][C]0.9799[/C][C]0.0817[/C][C]0.2858[/C][/ROW]
[ROW][C]58[/C][C]0.1371[/C][C]-0.1484[/C][C]0.0124[/C][C]1.1677[/C][C]0.0973[/C][C]0.3119[/C][/ROW]
[ROW][C]59[/C][C]0.154[/C][C]-0.0847[/C][C]0.0071[/C][C]0.3289[/C][C]0.0274[/C][C]0.1655[/C][/ROW]
[ROW][C]60[/C][C]0.1534[/C][C]-0.0385[/C][C]0.0032[/C][C]0.0743[/C][C]0.0062[/C][C]0.0787[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34195&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34195&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.0284-0.05150.00430.15720.01310.1145
500.0565-0.10550.00880.68110.05680.2382
510.0791-0.07650.00640.33660.0280.1675
520.0921-0.06460.00540.23410.01950.1397
530.1002-0.03130.00260.0540.00450.0671
540.105-0.03180.00270.05750.00480.0692
550.1112-0.06210.00520.22110.01840.1357
560.1196-0.09210.00770.47570.03960.1991
570.1251-0.13040.01090.97990.08170.2858
580.1371-0.14840.01241.16770.09730.3119
590.154-0.08470.00710.32890.02740.1655
600.1534-0.03850.00320.07430.00620.0787



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