Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 13 Dec 2007 10:50:39 -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/13/t11975673239yv4xixplhn5aqz.htm/, Retrieved Sun, 05 May 2024 16:59:33 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3677, Retrieved Sun, 05 May 2024 16:59:33 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordss0650062 s0650550
Estimated Impact227
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [ARIMA Parameter E...] [2007-12-04 14:51:31] [68a1fecd8f1c75119cd425050381cede]
- RMPD    [ARIMA Forecasting] [workshop6] [2007-12-13 17:50:39] [85ebbca709d200023cfec93009cd575f] [Current]
Feedback Forum

Post a new message
Dataseries X:
8.0
8.1
8.3
8.2
8.1
7.7
7.6
7.7
8.2
8.4
8.4
8.6
8.4
8.5
8.7
8.7
8.6
7.4
7.3
7.4
9.0
9.2
9.2
8.5
8.3
8.3
8.6
8.6
8.5
8.1
8.1
8.0
8.6
8.7
8.7
8.6
8.4
8.4
8.7
8.7
8.5
8.3
8.3
8.3
8.1
8.2
8.1
8.1
7.9
7.7
8.1
8.0
7.7
7.8
7.6
7.4
7.7
7.8
7.5
7.2




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3677&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3677&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3677&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 time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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.6-------
378.4-------
388.4-------
398.7-------
408.7-------
418.5-------
428.3-------
438.3-------
448.3-------
458.1-------
468.2-------
478.1-------
488.1-------
497.97.92457.36278.48620.4660.27010.04850.2701
507.77.98697.1848.78980.24190.5840.15660.3912
518.18.11477.1279.10240.48840.79470.12270.5116
5288.09627.08179.11080.42620.49710.12170.4971
537.77.88796.85038.92540.36130.41610.12380.3443
547.87.73116.67158.79060.44930.52290.14630.2475
557.67.74456.60288.88610.40210.4620.17010.2708
567.47.73836.51538.96120.29390.58770.1840.281
577.77.71996.429.01980.4880.68520.28330.2833
587.87.81046.47369.14730.49390.56430.28390.3356
597.57.72586.35549.09610.37340.45770.29620.2962
607.27.73356.33099.13620.2280.62790.30430.3043

\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.6 & - & - & - & - & - & - & - \tabularnewline
37 & 8.4 & - & - & - & - & - & - & - \tabularnewline
38 & 8.4 & - & - & - & - & - & - & - \tabularnewline
39 & 8.7 & - & - & - & - & - & - & - \tabularnewline
40 & 8.7 & - & - & - & - & - & - & - \tabularnewline
41 & 8.5 & - & - & - & - & - & - & - \tabularnewline
42 & 8.3 & - & - & - & - & - & - & - \tabularnewline
43 & 8.3 & - & - & - & - & - & - & - \tabularnewline
44 & 8.3 & - & - & - & - & - & - & - \tabularnewline
45 & 8.1 & - & - & - & - & - & - & - \tabularnewline
46 & 8.2 & - & - & - & - & - & - & - \tabularnewline
47 & 8.1 & - & - & - & - & - & - & - \tabularnewline
48 & 8.1 & - & - & - & - & - & - & - \tabularnewline
49 & 7.9 & 7.9245 & 7.3627 & 8.4862 & 0.466 & 0.2701 & 0.0485 & 0.2701 \tabularnewline
50 & 7.7 & 7.9869 & 7.184 & 8.7898 & 0.2419 & 0.584 & 0.1566 & 0.3912 \tabularnewline
51 & 8.1 & 8.1147 & 7.127 & 9.1024 & 0.4884 & 0.7947 & 0.1227 & 0.5116 \tabularnewline
52 & 8 & 8.0962 & 7.0817 & 9.1108 & 0.4262 & 0.4971 & 0.1217 & 0.4971 \tabularnewline
53 & 7.7 & 7.8879 & 6.8503 & 8.9254 & 0.3613 & 0.4161 & 0.1238 & 0.3443 \tabularnewline
54 & 7.8 & 7.7311 & 6.6715 & 8.7906 & 0.4493 & 0.5229 & 0.1463 & 0.2475 \tabularnewline
55 & 7.6 & 7.7445 & 6.6028 & 8.8861 & 0.4021 & 0.462 & 0.1701 & 0.2708 \tabularnewline
56 & 7.4 & 7.7383 & 6.5153 & 8.9612 & 0.2939 & 0.5877 & 0.184 & 0.281 \tabularnewline
57 & 7.7 & 7.7199 & 6.42 & 9.0198 & 0.488 & 0.6852 & 0.2833 & 0.2833 \tabularnewline
58 & 7.8 & 7.8104 & 6.4736 & 9.1473 & 0.4939 & 0.5643 & 0.2839 & 0.3356 \tabularnewline
59 & 7.5 & 7.7258 & 6.3554 & 9.0961 & 0.3734 & 0.4577 & 0.2962 & 0.2962 \tabularnewline
60 & 7.2 & 7.7335 & 6.3309 & 9.1362 & 0.228 & 0.6279 & 0.3043 & 0.3043 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3677&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.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]8.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]8.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]7.9[/C][C]7.9245[/C][C]7.3627[/C][C]8.4862[/C][C]0.466[/C][C]0.2701[/C][C]0.0485[/C][C]0.2701[/C][/ROW]
[ROW][C]50[/C][C]7.7[/C][C]7.9869[/C][C]7.184[/C][C]8.7898[/C][C]0.2419[/C][C]0.584[/C][C]0.1566[/C][C]0.3912[/C][/ROW]
[ROW][C]51[/C][C]8.1[/C][C]8.1147[/C][C]7.127[/C][C]9.1024[/C][C]0.4884[/C][C]0.7947[/C][C]0.1227[/C][C]0.5116[/C][/ROW]
[ROW][C]52[/C][C]8[/C][C]8.0962[/C][C]7.0817[/C][C]9.1108[/C][C]0.4262[/C][C]0.4971[/C][C]0.1217[/C][C]0.4971[/C][/ROW]
[ROW][C]53[/C][C]7.7[/C][C]7.8879[/C][C]6.8503[/C][C]8.9254[/C][C]0.3613[/C][C]0.4161[/C][C]0.1238[/C][C]0.3443[/C][/ROW]
[ROW][C]54[/C][C]7.8[/C][C]7.7311[/C][C]6.6715[/C][C]8.7906[/C][C]0.4493[/C][C]0.5229[/C][C]0.1463[/C][C]0.2475[/C][/ROW]
[ROW][C]55[/C][C]7.6[/C][C]7.7445[/C][C]6.6028[/C][C]8.8861[/C][C]0.4021[/C][C]0.462[/C][C]0.1701[/C][C]0.2708[/C][/ROW]
[ROW][C]56[/C][C]7.4[/C][C]7.7383[/C][C]6.5153[/C][C]8.9612[/C][C]0.2939[/C][C]0.5877[/C][C]0.184[/C][C]0.281[/C][/ROW]
[ROW][C]57[/C][C]7.7[/C][C]7.7199[/C][C]6.42[/C][C]9.0198[/C][C]0.488[/C][C]0.6852[/C][C]0.2833[/C][C]0.2833[/C][/ROW]
[ROW][C]58[/C][C]7.8[/C][C]7.8104[/C][C]6.4736[/C][C]9.1473[/C][C]0.4939[/C][C]0.5643[/C][C]0.2839[/C][C]0.3356[/C][/ROW]
[ROW][C]59[/C][C]7.5[/C][C]7.7258[/C][C]6.3554[/C][C]9.0961[/C][C]0.3734[/C][C]0.4577[/C][C]0.2962[/C][C]0.2962[/C][/ROW]
[ROW][C]60[/C][C]7.2[/C][C]7.7335[/C][C]6.3309[/C][C]9.1362[/C][C]0.228[/C][C]0.6279[/C][C]0.3043[/C][C]0.3043[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3677&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3677&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.6-------
378.4-------
388.4-------
398.7-------
408.7-------
418.5-------
428.3-------
438.3-------
448.3-------
458.1-------
468.2-------
478.1-------
488.1-------
497.97.92457.36278.48620.4660.27010.04850.2701
507.77.98697.1848.78980.24190.5840.15660.3912
518.18.11477.1279.10240.48840.79470.12270.5116
5288.09627.08179.11080.42620.49710.12170.4971
537.77.88796.85038.92540.36130.41610.12380.3443
547.87.73116.67158.79060.44930.52290.14630.2475
557.67.74456.60288.88610.40210.4620.17010.2708
567.47.73836.51538.96120.29390.58770.1840.281
577.77.71996.429.01980.4880.68520.28330.2833
587.87.81046.47369.14730.49390.56430.28390.3356
597.57.72586.35549.09610.37340.45770.29620.2962
607.27.73356.33099.13620.2280.62790.30430.3043







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0362-0.00313e-046e-0400.0071
500.0513-0.03590.0030.08230.00690.0828
510.0621-0.00182e-042e-0400.0042
520.0639-0.01190.0010.00938e-040.0278
530.0671-0.02380.0020.03530.00290.0542
540.06990.00897e-040.00484e-040.0199
550.0752-0.01870.00160.02090.00170.0417
560.0806-0.04370.00360.11440.00950.0976
570.0859-0.00262e-044e-0400.0057
580.0873-0.00131e-041e-0400.003
590.0905-0.02920.00240.0510.00420.0652
600.0925-0.0690.00570.28470.02370.154

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0362 & -0.0031 & 3e-04 & 6e-04 & 0 & 0.0071 \tabularnewline
50 & 0.0513 & -0.0359 & 0.003 & 0.0823 & 0.0069 & 0.0828 \tabularnewline
51 & 0.0621 & -0.0018 & 2e-04 & 2e-04 & 0 & 0.0042 \tabularnewline
52 & 0.0639 & -0.0119 & 0.001 & 0.0093 & 8e-04 & 0.0278 \tabularnewline
53 & 0.0671 & -0.0238 & 0.002 & 0.0353 & 0.0029 & 0.0542 \tabularnewline
54 & 0.0699 & 0.0089 & 7e-04 & 0.0048 & 4e-04 & 0.0199 \tabularnewline
55 & 0.0752 & -0.0187 & 0.0016 & 0.0209 & 0.0017 & 0.0417 \tabularnewline
56 & 0.0806 & -0.0437 & 0.0036 & 0.1144 & 0.0095 & 0.0976 \tabularnewline
57 & 0.0859 & -0.0026 & 2e-04 & 4e-04 & 0 & 0.0057 \tabularnewline
58 & 0.0873 & -0.0013 & 1e-04 & 1e-04 & 0 & 0.003 \tabularnewline
59 & 0.0905 & -0.0292 & 0.0024 & 0.051 & 0.0042 & 0.0652 \tabularnewline
60 & 0.0925 & -0.069 & 0.0057 & 0.2847 & 0.0237 & 0.154 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3677&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.0362[/C][C]-0.0031[/C][C]3e-04[/C][C]6e-04[/C][C]0[/C][C]0.0071[/C][/ROW]
[ROW][C]50[/C][C]0.0513[/C][C]-0.0359[/C][C]0.003[/C][C]0.0823[/C][C]0.0069[/C][C]0.0828[/C][/ROW]
[ROW][C]51[/C][C]0.0621[/C][C]-0.0018[/C][C]2e-04[/C][C]2e-04[/C][C]0[/C][C]0.0042[/C][/ROW]
[ROW][C]52[/C][C]0.0639[/C][C]-0.0119[/C][C]0.001[/C][C]0.0093[/C][C]8e-04[/C][C]0.0278[/C][/ROW]
[ROW][C]53[/C][C]0.0671[/C][C]-0.0238[/C][C]0.002[/C][C]0.0353[/C][C]0.0029[/C][C]0.0542[/C][/ROW]
[ROW][C]54[/C][C]0.0699[/C][C]0.0089[/C][C]7e-04[/C][C]0.0048[/C][C]4e-04[/C][C]0.0199[/C][/ROW]
[ROW][C]55[/C][C]0.0752[/C][C]-0.0187[/C][C]0.0016[/C][C]0.0209[/C][C]0.0017[/C][C]0.0417[/C][/ROW]
[ROW][C]56[/C][C]0.0806[/C][C]-0.0437[/C][C]0.0036[/C][C]0.1144[/C][C]0.0095[/C][C]0.0976[/C][/ROW]
[ROW][C]57[/C][C]0.0859[/C][C]-0.0026[/C][C]2e-04[/C][C]4e-04[/C][C]0[/C][C]0.0057[/C][/ROW]
[ROW][C]58[/C][C]0.0873[/C][C]-0.0013[/C][C]1e-04[/C][C]1e-04[/C][C]0[/C][C]0.003[/C][/ROW]
[ROW][C]59[/C][C]0.0905[/C][C]-0.0292[/C][C]0.0024[/C][C]0.051[/C][C]0.0042[/C][C]0.0652[/C][/ROW]
[ROW][C]60[/C][C]0.0925[/C][C]-0.069[/C][C]0.0057[/C][C]0.2847[/C][C]0.0237[/C][C]0.154[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3677&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3677&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.0362-0.00313e-046e-0400.0071
500.0513-0.03590.0030.08230.00690.0828
510.0621-0.00182e-042e-0400.0042
520.0639-0.01190.0010.00938e-040.0278
530.0671-0.02380.0020.03530.00290.0542
540.06990.00897e-040.00484e-040.0199
550.0752-0.01870.00160.02090.00170.0417
560.0806-0.04370.00360.11440.00950.0976
570.0859-0.00262e-044e-0400.0057
580.0873-0.00131e-041e-0400.003
590.0905-0.02920.00240.0510.00420.0652
600.0925-0.0690.00570.28470.02370.154



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