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 computationThu, 18 Dec 2008 08:41:01 -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/18/t1229614934qg8664zu129bc7r.htm/, Retrieved Sat, 11 May 2024 06:50:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34852, Retrieved Sat, 11 May 2024 06:50:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact123
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [forecast vrouwen] [2008-12-17 22:24:54] [e43247bc0ab243a5af99ac7f55ba0b41]
-   PD    [ARIMA Forecasting] [forecast vrouwen ...] [2008-12-18 15:41:01] [f24298b2e4c2a19d76cf4460ec5d2246] [Current]
Feedback Forum

Post a new message
Dataseries X:
9.0
9.1
8.7
8.2
7.9
7.9
9.1
9.4
9.5
9.1
9.0
9.3
9.9
9.8
9.4
8.3
8.0
8.5
10.4
11.1
10.9
9.9
9.2
9.2
9.5
9.6
9.5
9.1
8.9
9.0
10.1
10.3
10.2
9.6
9.2
9.3
9.4
9.4
9.2
9.0
9.0
9.0
9.8
10.0
9.9
9.3
9.0
9.0
9.1
9.1
9.1
9.2
8.8
8.3
8.4
8.1
7.8
7.9
7.9
8.0
7.9
7.5
7.2
6.9
6.6
6.7
7.3
7.5




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34852&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 time5 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[56])
4410-------
459.9-------
469.3-------
479-------
489-------
499.1-------
509.1-------
519.1-------
529.2-------
538.8-------
548.3-------
558.4-------
568.1-------
577.87.99717.53318.46110.20250.331900.3319
587.97.64436.66988.61880.30350.37714e-040.1797
597.97.53486.1678.90270.30040.30040.01790.209
6087.57565.95999.19140.30340.3470.0420.2624
617.97.57465.80099.34830.35960.31910.04590.2808
627.57.40475.5079.30240.46080.30450.040.2363
637.27.24235.21539.26930.48370.40160.03620.2035
646.97.08154.91229.25080.43490.45740.02780.1787
656.66.71734.40139.03340.46040.43860.0390.121
666.76.37013.91268.82760.39620.42730.06190.0838
677.36.70594.11529.29660.32650.50180.10.1458
687.56.55953.84179.27730.24880.29670.13330.1333

\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[56]) \tabularnewline
44 & 10 & - & - & - & - & - & - & - \tabularnewline
45 & 9.9 & - & - & - & - & - & - & - \tabularnewline
46 & 9.3 & - & - & - & - & - & - & - \tabularnewline
47 & 9 & - & - & - & - & - & - & - \tabularnewline
48 & 9 & - & - & - & - & - & - & - \tabularnewline
49 & 9.1 & - & - & - & - & - & - & - \tabularnewline
50 & 9.1 & - & - & - & - & - & - & - \tabularnewline
51 & 9.1 & - & - & - & - & - & - & - \tabularnewline
52 & 9.2 & - & - & - & - & - & - & - \tabularnewline
53 & 8.8 & - & - & - & - & - & - & - \tabularnewline
54 & 8.3 & - & - & - & - & - & - & - \tabularnewline
55 & 8.4 & - & - & - & - & - & - & - \tabularnewline
56 & 8.1 & - & - & - & - & - & - & - \tabularnewline
57 & 7.8 & 7.9971 & 7.5331 & 8.4611 & 0.2025 & 0.3319 & 0 & 0.3319 \tabularnewline
58 & 7.9 & 7.6443 & 6.6698 & 8.6188 & 0.3035 & 0.3771 & 4e-04 & 0.1797 \tabularnewline
59 & 7.9 & 7.5348 & 6.167 & 8.9027 & 0.3004 & 0.3004 & 0.0179 & 0.209 \tabularnewline
60 & 8 & 7.5756 & 5.9599 & 9.1914 & 0.3034 & 0.347 & 0.042 & 0.2624 \tabularnewline
61 & 7.9 & 7.5746 & 5.8009 & 9.3483 & 0.3596 & 0.3191 & 0.0459 & 0.2808 \tabularnewline
62 & 7.5 & 7.4047 & 5.507 & 9.3024 & 0.4608 & 0.3045 & 0.04 & 0.2363 \tabularnewline
63 & 7.2 & 7.2423 & 5.2153 & 9.2693 & 0.4837 & 0.4016 & 0.0362 & 0.2035 \tabularnewline
64 & 6.9 & 7.0815 & 4.9122 & 9.2508 & 0.4349 & 0.4574 & 0.0278 & 0.1787 \tabularnewline
65 & 6.6 & 6.7173 & 4.4013 & 9.0334 & 0.4604 & 0.4386 & 0.039 & 0.121 \tabularnewline
66 & 6.7 & 6.3701 & 3.9126 & 8.8276 & 0.3962 & 0.4273 & 0.0619 & 0.0838 \tabularnewline
67 & 7.3 & 6.7059 & 4.1152 & 9.2966 & 0.3265 & 0.5018 & 0.1 & 0.1458 \tabularnewline
68 & 7.5 & 6.5595 & 3.8417 & 9.2773 & 0.2488 & 0.2967 & 0.1333 & 0.1333 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34852&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[56])[/C][/ROW]
[ROW][C]44[/C][C]10[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]9.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]9.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]9.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]9.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]9.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]9.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]8.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]7.8[/C][C]7.9971[/C][C]7.5331[/C][C]8.4611[/C][C]0.2025[/C][C]0.3319[/C][C]0[/C][C]0.3319[/C][/ROW]
[ROW][C]58[/C][C]7.9[/C][C]7.6443[/C][C]6.6698[/C][C]8.6188[/C][C]0.3035[/C][C]0.3771[/C][C]4e-04[/C][C]0.1797[/C][/ROW]
[ROW][C]59[/C][C]7.9[/C][C]7.5348[/C][C]6.167[/C][C]8.9027[/C][C]0.3004[/C][C]0.3004[/C][C]0.0179[/C][C]0.209[/C][/ROW]
[ROW][C]60[/C][C]8[/C][C]7.5756[/C][C]5.9599[/C][C]9.1914[/C][C]0.3034[/C][C]0.347[/C][C]0.042[/C][C]0.2624[/C][/ROW]
[ROW][C]61[/C][C]7.9[/C][C]7.5746[/C][C]5.8009[/C][C]9.3483[/C][C]0.3596[/C][C]0.3191[/C][C]0.0459[/C][C]0.2808[/C][/ROW]
[ROW][C]62[/C][C]7.5[/C][C]7.4047[/C][C]5.507[/C][C]9.3024[/C][C]0.4608[/C][C]0.3045[/C][C]0.04[/C][C]0.2363[/C][/ROW]
[ROW][C]63[/C][C]7.2[/C][C]7.2423[/C][C]5.2153[/C][C]9.2693[/C][C]0.4837[/C][C]0.4016[/C][C]0.0362[/C][C]0.2035[/C][/ROW]
[ROW][C]64[/C][C]6.9[/C][C]7.0815[/C][C]4.9122[/C][C]9.2508[/C][C]0.4349[/C][C]0.4574[/C][C]0.0278[/C][C]0.1787[/C][/ROW]
[ROW][C]65[/C][C]6.6[/C][C]6.7173[/C][C]4.4013[/C][C]9.0334[/C][C]0.4604[/C][C]0.4386[/C][C]0.039[/C][C]0.121[/C][/ROW]
[ROW][C]66[/C][C]6.7[/C][C]6.3701[/C][C]3.9126[/C][C]8.8276[/C][C]0.3962[/C][C]0.4273[/C][C]0.0619[/C][C]0.0838[/C][/ROW]
[ROW][C]67[/C][C]7.3[/C][C]6.7059[/C][C]4.1152[/C][C]9.2966[/C][C]0.3265[/C][C]0.5018[/C][C]0.1[/C][C]0.1458[/C][/ROW]
[ROW][C]68[/C][C]7.5[/C][C]6.5595[/C][C]3.8417[/C][C]9.2773[/C][C]0.2488[/C][C]0.2967[/C][C]0.1333[/C][C]0.1333[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34852&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34852&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[56])
4410-------
459.9-------
469.3-------
479-------
489-------
499.1-------
509.1-------
519.1-------
529.2-------
538.8-------
548.3-------
558.4-------
568.1-------
577.87.99717.53318.46110.20250.331900.3319
587.97.64436.66988.61880.30350.37714e-040.1797
597.97.53486.1678.90270.30040.30040.01790.209
6087.57565.95999.19140.30340.3470.0420.2624
617.97.57465.80099.34830.35960.31910.04590.2808
627.57.40475.5079.30240.46080.30450.040.2363
637.27.24235.21539.26930.48370.40160.03620.2035
646.97.08154.91229.25080.43490.45740.02780.1787
656.66.71734.40139.03340.46040.43860.0390.121
666.76.37013.91268.82760.39620.42730.06190.0838
677.36.70594.11529.29660.32650.50180.10.1458
687.56.55953.84179.27730.24880.29670.13330.1333







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
570.0296-0.02460.00210.03890.00320.0569
580.0650.03350.00280.06540.00540.0738
590.09260.04850.0040.13330.01110.1054
600.10880.0560.00470.18010.0150.1225
610.11950.0430.00360.10590.00880.0939
620.13080.01290.00110.00918e-040.0275
630.1428-0.00585e-040.00181e-040.0122
640.1563-0.02560.00210.03290.00270.0524
650.1759-0.01750.00150.01380.00110.0339
660.19680.05180.00430.10880.00910.0952
670.19710.08860.00740.3530.02940.1715
680.21140.14340.01190.88450.07370.2715

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
57 & 0.0296 & -0.0246 & 0.0021 & 0.0389 & 0.0032 & 0.0569 \tabularnewline
58 & 0.065 & 0.0335 & 0.0028 & 0.0654 & 0.0054 & 0.0738 \tabularnewline
59 & 0.0926 & 0.0485 & 0.004 & 0.1333 & 0.0111 & 0.1054 \tabularnewline
60 & 0.1088 & 0.056 & 0.0047 & 0.1801 & 0.015 & 0.1225 \tabularnewline
61 & 0.1195 & 0.043 & 0.0036 & 0.1059 & 0.0088 & 0.0939 \tabularnewline
62 & 0.1308 & 0.0129 & 0.0011 & 0.0091 & 8e-04 & 0.0275 \tabularnewline
63 & 0.1428 & -0.0058 & 5e-04 & 0.0018 & 1e-04 & 0.0122 \tabularnewline
64 & 0.1563 & -0.0256 & 0.0021 & 0.0329 & 0.0027 & 0.0524 \tabularnewline
65 & 0.1759 & -0.0175 & 0.0015 & 0.0138 & 0.0011 & 0.0339 \tabularnewline
66 & 0.1968 & 0.0518 & 0.0043 & 0.1088 & 0.0091 & 0.0952 \tabularnewline
67 & 0.1971 & 0.0886 & 0.0074 & 0.353 & 0.0294 & 0.1715 \tabularnewline
68 & 0.2114 & 0.1434 & 0.0119 & 0.8845 & 0.0737 & 0.2715 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34852&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]57[/C][C]0.0296[/C][C]-0.0246[/C][C]0.0021[/C][C]0.0389[/C][C]0.0032[/C][C]0.0569[/C][/ROW]
[ROW][C]58[/C][C]0.065[/C][C]0.0335[/C][C]0.0028[/C][C]0.0654[/C][C]0.0054[/C][C]0.0738[/C][/ROW]
[ROW][C]59[/C][C]0.0926[/C][C]0.0485[/C][C]0.004[/C][C]0.1333[/C][C]0.0111[/C][C]0.1054[/C][/ROW]
[ROW][C]60[/C][C]0.1088[/C][C]0.056[/C][C]0.0047[/C][C]0.1801[/C][C]0.015[/C][C]0.1225[/C][/ROW]
[ROW][C]61[/C][C]0.1195[/C][C]0.043[/C][C]0.0036[/C][C]0.1059[/C][C]0.0088[/C][C]0.0939[/C][/ROW]
[ROW][C]62[/C][C]0.1308[/C][C]0.0129[/C][C]0.0011[/C][C]0.0091[/C][C]8e-04[/C][C]0.0275[/C][/ROW]
[ROW][C]63[/C][C]0.1428[/C][C]-0.0058[/C][C]5e-04[/C][C]0.0018[/C][C]1e-04[/C][C]0.0122[/C][/ROW]
[ROW][C]64[/C][C]0.1563[/C][C]-0.0256[/C][C]0.0021[/C][C]0.0329[/C][C]0.0027[/C][C]0.0524[/C][/ROW]
[ROW][C]65[/C][C]0.1759[/C][C]-0.0175[/C][C]0.0015[/C][C]0.0138[/C][C]0.0011[/C][C]0.0339[/C][/ROW]
[ROW][C]66[/C][C]0.1968[/C][C]0.0518[/C][C]0.0043[/C][C]0.1088[/C][C]0.0091[/C][C]0.0952[/C][/ROW]
[ROW][C]67[/C][C]0.1971[/C][C]0.0886[/C][C]0.0074[/C][C]0.353[/C][C]0.0294[/C][C]0.1715[/C][/ROW]
[ROW][C]68[/C][C]0.2114[/C][C]0.1434[/C][C]0.0119[/C][C]0.8845[/C][C]0.0737[/C][C]0.2715[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34852&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34852&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
570.0296-0.02460.00210.03890.00320.0569
580.0650.03350.00280.06540.00540.0738
590.09260.04850.0040.13330.01110.1054
600.10880.0560.00470.18010.0150.1225
610.11950.0430.00360.10590.00880.0939
620.13080.01290.00110.00918e-040.0275
630.1428-0.00585e-040.00181e-040.0122
640.1563-0.02560.00210.03290.00270.0524
650.1759-0.01750.00150.01380.00110.0339
660.19680.05180.00430.10880.00910.0952
670.19710.08860.00740.3530.02940.1715
680.21140.14340.01190.88450.07370.2715



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