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 computationSat, 18 Dec 2010 12:40:51 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/18/t1292675910od7ug46us0jlazk.htm/, Retrieved Tue, 30 Apr 2024 04:24:33 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=111904, Retrieved Tue, 30 Apr 2024 04:24:33 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact177
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecast] [2010-12-18 12:40:51] [aedc5b8e4f26bdca34b1a0cf88d6dfa2] [Current]
-   P     [ARIMA Forecasting] [ARIMA Forecast ve...] [2010-12-29 11:26:33] [2805bc4d0d3810b6cd96238758e5985d]
Feedback Forum

Post a new message
Dataseries X:
37
30
47
35
30
43
82
40
47
19
52
136
80
42
54
66
81
63
137
72
107
58
36
52
79
77
54
84
48
96
83
66
61
53
30
74
69
59
42
65
70
100
63
105
82
81
75
102
121
98
76
77
63
37
35
23
40
29
37
51
20
28
13
22
25
13
16
13
16
17
9
17
25
14
8
7
10
7
10
3




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 4 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111904&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]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111904&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111904&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 time4 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[68])
5623-------
5740-------
5829-------
5937-------
6051-------
6120-------
6228-------
6313-------
6422-------
6525-------
6613-------
6716-------
6813-------
691616.6228-36.747669.99310.49090.55290.19530.5529
701714.2786-61.198589.75570.47180.48220.35110.5132
71915.9835-76.4567108.42360.44110.49140.32790.5252
721718.9669-87.7738125.70760.48560.57260.27820.5436
732512.3607-106.9791131.70040.41780.46960.45010.4958
741414.0655-116.6646144.79570.49960.43490.41730.5064
75810.869-130.3357152.07360.48410.48270.48820.4882
76712.7869-138.1673163.74110.47010.52480.45240.4989
771013.4262-146.6849173.53730.48330.53140.44370.5021
78710.869-157.9029179.64080.48210.5040.49010.4901
791011.5083-165.5012188.51770.49330.51990.48020.4934
80310.869-174.0114195.74930.46680.50370.4910.491

\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[68]) \tabularnewline
56 & 23 & - & - & - & - & - & - & - \tabularnewline
57 & 40 & - & - & - & - & - & - & - \tabularnewline
58 & 29 & - & - & - & - & - & - & - \tabularnewline
59 & 37 & - & - & - & - & - & - & - \tabularnewline
60 & 51 & - & - & - & - & - & - & - \tabularnewline
61 & 20 & - & - & - & - & - & - & - \tabularnewline
62 & 28 & - & - & - & - & - & - & - \tabularnewline
63 & 13 & - & - & - & - & - & - & - \tabularnewline
64 & 22 & - & - & - & - & - & - & - \tabularnewline
65 & 25 & - & - & - & - & - & - & - \tabularnewline
66 & 13 & - & - & - & - & - & - & - \tabularnewline
67 & 16 & - & - & - & - & - & - & - \tabularnewline
68 & 13 & - & - & - & - & - & - & - \tabularnewline
69 & 16 & 16.6228 & -36.7476 & 69.9931 & 0.4909 & 0.5529 & 0.1953 & 0.5529 \tabularnewline
70 & 17 & 14.2786 & -61.1985 & 89.7557 & 0.4718 & 0.4822 & 0.3511 & 0.5132 \tabularnewline
71 & 9 & 15.9835 & -76.4567 & 108.4236 & 0.4411 & 0.4914 & 0.3279 & 0.5252 \tabularnewline
72 & 17 & 18.9669 & -87.7738 & 125.7076 & 0.4856 & 0.5726 & 0.2782 & 0.5436 \tabularnewline
73 & 25 & 12.3607 & -106.9791 & 131.7004 & 0.4178 & 0.4696 & 0.4501 & 0.4958 \tabularnewline
74 & 14 & 14.0655 & -116.6646 & 144.7957 & 0.4996 & 0.4349 & 0.4173 & 0.5064 \tabularnewline
75 & 8 & 10.869 & -130.3357 & 152.0736 & 0.4841 & 0.4827 & 0.4882 & 0.4882 \tabularnewline
76 & 7 & 12.7869 & -138.1673 & 163.7411 & 0.4701 & 0.5248 & 0.4524 & 0.4989 \tabularnewline
77 & 10 & 13.4262 & -146.6849 & 173.5373 & 0.4833 & 0.5314 & 0.4437 & 0.5021 \tabularnewline
78 & 7 & 10.869 & -157.9029 & 179.6408 & 0.4821 & 0.504 & 0.4901 & 0.4901 \tabularnewline
79 & 10 & 11.5083 & -165.5012 & 188.5177 & 0.4933 & 0.5199 & 0.4802 & 0.4934 \tabularnewline
80 & 3 & 10.869 & -174.0114 & 195.7493 & 0.4668 & 0.5037 & 0.491 & 0.491 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111904&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[68])[/C][/ROW]
[ROW][C]56[/C][C]23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]40[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]20[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]25[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]16[/C][C]16.6228[/C][C]-36.7476[/C][C]69.9931[/C][C]0.4909[/C][C]0.5529[/C][C]0.1953[/C][C]0.5529[/C][/ROW]
[ROW][C]70[/C][C]17[/C][C]14.2786[/C][C]-61.1985[/C][C]89.7557[/C][C]0.4718[/C][C]0.4822[/C][C]0.3511[/C][C]0.5132[/C][/ROW]
[ROW][C]71[/C][C]9[/C][C]15.9835[/C][C]-76.4567[/C][C]108.4236[/C][C]0.4411[/C][C]0.4914[/C][C]0.3279[/C][C]0.5252[/C][/ROW]
[ROW][C]72[/C][C]17[/C][C]18.9669[/C][C]-87.7738[/C][C]125.7076[/C][C]0.4856[/C][C]0.5726[/C][C]0.2782[/C][C]0.5436[/C][/ROW]
[ROW][C]73[/C][C]25[/C][C]12.3607[/C][C]-106.9791[/C][C]131.7004[/C][C]0.4178[/C][C]0.4696[/C][C]0.4501[/C][C]0.4958[/C][/ROW]
[ROW][C]74[/C][C]14[/C][C]14.0655[/C][C]-116.6646[/C][C]144.7957[/C][C]0.4996[/C][C]0.4349[/C][C]0.4173[/C][C]0.5064[/C][/ROW]
[ROW][C]75[/C][C]8[/C][C]10.869[/C][C]-130.3357[/C][C]152.0736[/C][C]0.4841[/C][C]0.4827[/C][C]0.4882[/C][C]0.4882[/C][/ROW]
[ROW][C]76[/C][C]7[/C][C]12.7869[/C][C]-138.1673[/C][C]163.7411[/C][C]0.4701[/C][C]0.5248[/C][C]0.4524[/C][C]0.4989[/C][/ROW]
[ROW][C]77[/C][C]10[/C][C]13.4262[/C][C]-146.6849[/C][C]173.5373[/C][C]0.4833[/C][C]0.5314[/C][C]0.4437[/C][C]0.5021[/C][/ROW]
[ROW][C]78[/C][C]7[/C][C]10.869[/C][C]-157.9029[/C][C]179.6408[/C][C]0.4821[/C][C]0.504[/C][C]0.4901[/C][C]0.4901[/C][/ROW]
[ROW][C]79[/C][C]10[/C][C]11.5083[/C][C]-165.5012[/C][C]188.5177[/C][C]0.4933[/C][C]0.5199[/C][C]0.4802[/C][C]0.4934[/C][/ROW]
[ROW][C]80[/C][C]3[/C][C]10.869[/C][C]-174.0114[/C][C]195.7493[/C][C]0.4668[/C][C]0.5037[/C][C]0.491[/C][C]0.491[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111904&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111904&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[68])
5623-------
5740-------
5829-------
5937-------
6051-------
6120-------
6228-------
6313-------
6422-------
6525-------
6613-------
6716-------
6813-------
691616.6228-36.747669.99310.49090.55290.19530.5529
701714.2786-61.198589.75570.47180.48220.35110.5132
71915.9835-76.4567108.42360.44110.49140.32790.5252
721718.9669-87.7738125.70760.48560.57260.27820.5436
732512.3607-106.9791131.70040.41780.46960.45010.4958
741414.0655-116.6646144.79570.49960.43490.41730.5064
75810.869-130.3357152.07360.48410.48270.48820.4882
76712.7869-138.1673163.74110.47010.52480.45240.4989
771013.4262-146.6849173.53730.48330.53140.44370.5021
78710.869-157.9029179.64080.48210.5040.49010.4901
791011.5083-165.5012188.51770.49330.51990.48020.4934
80310.869-174.0114195.74930.46680.50370.4910.491







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
691.6381-0.037500.387900
702.69690.19060.1147.40593.89691.974
712.9508-0.43690.221748.768818.85424.3421
722.8713-0.10370.19223.868815.10783.8869
734.92591.02250.3582159.752244.03676.636
744.742-0.00470.29930.004336.6986.0579
756.6283-0.2640.29438.230932.63125.7124
766.0232-0.45260.31433.488232.73845.7217
776.0843-0.25520.307511.738930.40515.5141
787.9224-0.3560.312414.968828.86155.3723
797.8475-0.13110.29592.274926.44455.1424
808.6785-0.7240.331561.920529.40085.4223

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 1.6381 & -0.0375 & 0 & 0.3879 & 0 & 0 \tabularnewline
70 & 2.6969 & 0.1906 & 0.114 & 7.4059 & 3.8969 & 1.974 \tabularnewline
71 & 2.9508 & -0.4369 & 0.2217 & 48.7688 & 18.8542 & 4.3421 \tabularnewline
72 & 2.8713 & -0.1037 & 0.1922 & 3.8688 & 15.1078 & 3.8869 \tabularnewline
73 & 4.9259 & 1.0225 & 0.3582 & 159.7522 & 44.0367 & 6.636 \tabularnewline
74 & 4.742 & -0.0047 & 0.2993 & 0.0043 & 36.698 & 6.0579 \tabularnewline
75 & 6.6283 & -0.264 & 0.2943 & 8.2309 & 32.6312 & 5.7124 \tabularnewline
76 & 6.0232 & -0.4526 & 0.314 & 33.4882 & 32.7384 & 5.7217 \tabularnewline
77 & 6.0843 & -0.2552 & 0.3075 & 11.7389 & 30.4051 & 5.5141 \tabularnewline
78 & 7.9224 & -0.356 & 0.3124 & 14.9688 & 28.8615 & 5.3723 \tabularnewline
79 & 7.8475 & -0.1311 & 0.2959 & 2.2749 & 26.4445 & 5.1424 \tabularnewline
80 & 8.6785 & -0.724 & 0.3315 & 61.9205 & 29.4008 & 5.4223 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111904&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]69[/C][C]1.6381[/C][C]-0.0375[/C][C]0[/C][C]0.3879[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]70[/C][C]2.6969[/C][C]0.1906[/C][C]0.114[/C][C]7.4059[/C][C]3.8969[/C][C]1.974[/C][/ROW]
[ROW][C]71[/C][C]2.9508[/C][C]-0.4369[/C][C]0.2217[/C][C]48.7688[/C][C]18.8542[/C][C]4.3421[/C][/ROW]
[ROW][C]72[/C][C]2.8713[/C][C]-0.1037[/C][C]0.1922[/C][C]3.8688[/C][C]15.1078[/C][C]3.8869[/C][/ROW]
[ROW][C]73[/C][C]4.9259[/C][C]1.0225[/C][C]0.3582[/C][C]159.7522[/C][C]44.0367[/C][C]6.636[/C][/ROW]
[ROW][C]74[/C][C]4.742[/C][C]-0.0047[/C][C]0.2993[/C][C]0.0043[/C][C]36.698[/C][C]6.0579[/C][/ROW]
[ROW][C]75[/C][C]6.6283[/C][C]-0.264[/C][C]0.2943[/C][C]8.2309[/C][C]32.6312[/C][C]5.7124[/C][/ROW]
[ROW][C]76[/C][C]6.0232[/C][C]-0.4526[/C][C]0.314[/C][C]33.4882[/C][C]32.7384[/C][C]5.7217[/C][/ROW]
[ROW][C]77[/C][C]6.0843[/C][C]-0.2552[/C][C]0.3075[/C][C]11.7389[/C][C]30.4051[/C][C]5.5141[/C][/ROW]
[ROW][C]78[/C][C]7.9224[/C][C]-0.356[/C][C]0.3124[/C][C]14.9688[/C][C]28.8615[/C][C]5.3723[/C][/ROW]
[ROW][C]79[/C][C]7.8475[/C][C]-0.1311[/C][C]0.2959[/C][C]2.2749[/C][C]26.4445[/C][C]5.1424[/C][/ROW]
[ROW][C]80[/C][C]8.6785[/C][C]-0.724[/C][C]0.3315[/C][C]61.9205[/C][C]29.4008[/C][C]5.4223[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111904&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111904&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
691.6381-0.037500.387900
702.69690.19060.1147.40593.89691.974
712.9508-0.43690.221748.768818.85424.3421
722.8713-0.10370.19223.868815.10783.8869
734.92591.02250.3582159.752244.03676.636
744.742-0.00470.29930.004336.6986.0579
756.6283-0.2640.29438.230932.63125.7124
766.0232-0.45260.31433.488232.73845.7217
776.0843-0.25520.307511.738930.40515.5141
787.9224-0.3560.312414.968828.86155.3723
797.8475-0.13110.29592.274926.44455.1424
808.6785-0.7240.331561.920529.40085.4223



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 1 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 1 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')