Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 10 Dec 2007 13:13: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/10/t1197316774wxu1hchxu2olnow.htm/, Retrieved Mon, 06 May 2024 22:20:28 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3038, Retrieved Mon, 06 May 2024 22:20:28 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsvoorspelling, laatste workshop, algemeen indexcijfer
Estimated Impact212
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Extrapolation for...] [2007-12-06 17:17:39] [1520e6942bf3237bcdbd9ce1ad1c7791]
-   PD    [ARIMA Forecasting] [voorspelling] [2007-12-10 20:13:39] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
88,74
88,92
88,77
89,17
89,61
89,52
89,74
89,40
89,36
89,38
89,36
89,29
89,59
89,79
89,86
90,21
90,37
90,19
90,33
90,22
90,42
90,54
90,73
91,02
91,19
91,53
91,88
92,06
92,32
92,67
92,85
92,82
93,46
93,23
93,54
93,29
93,20
93,60
93,81
94,62
95,22
95,38
95,31
95,30
95,57
95,42
95,53
95,33
95,90
96,06
96,31
96,34
96,49
96,22
96,53
96,50
96,77
96,66
96,58
96,63
97,06
97,73
98,01
97,76
97,49
97,77
97,96
98,23
98,51
98,19
98,37
98,31
98,60
98,97
99,11
99,64
100,03
99,98
100,32
100,44
100,51
101,00
100,88
100,55
100,83
101,51
102,16
102,39
102,54
102,85
103,47
103,57
103,69
103,50
103,47
103,45
103,48
103,93
103,89
104,40
104,79
104,77
105,13
105,26
104,96





Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 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=3038&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]3 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=3038&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3038&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 time3 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[93])
81100.51-------
82101-------
83100.88-------
84100.55-------
85100.83-------
86101.51-------
87102.16-------
88102.39-------
89102.54-------
90102.85-------
91103.47-------
92103.57-------
93103.69-------
94103.5103.6862103.1736104.20130.23940.494210.4942
95103.47103.744103.0194104.47360.23090.743910.5576
96103.45103.654102.7681104.54760.32720.656810.4686
97103.48103.9087102.8838104.94370.20850.807510.6606
98103.93104.283103.1342105.44460.27570.912310.8415
99103.89104.5247103.2644105.80040.16470.81960.99990.9002
100104.4104.7675103.404106.1490.3010.89340.99960.9368
101104.79104.9599103.5005106.440.4110.77080.99930.9537
102104.77105.0368103.4885106.60820.36970.62090.99680.9535
103105.13105.2899103.6547106.95080.42520.73020.98410.9705
104105.26105.3176103.603107.06060.47420.58350.97530.9664
105104.96105.5081103.7147107.33250.2780.60510.97460.9746

\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[93]) \tabularnewline
81 & 100.51 & - & - & - & - & - & - & - \tabularnewline
82 & 101 & - & - & - & - & - & - & - \tabularnewline
83 & 100.88 & - & - & - & - & - & - & - \tabularnewline
84 & 100.55 & - & - & - & - & - & - & - \tabularnewline
85 & 100.83 & - & - & - & - & - & - & - \tabularnewline
86 & 101.51 & - & - & - & - & - & - & - \tabularnewline
87 & 102.16 & - & - & - & - & - & - & - \tabularnewline
88 & 102.39 & - & - & - & - & - & - & - \tabularnewline
89 & 102.54 & - & - & - & - & - & - & - \tabularnewline
90 & 102.85 & - & - & - & - & - & - & - \tabularnewline
91 & 103.47 & - & - & - & - & - & - & - \tabularnewline
92 & 103.57 & - & - & - & - & - & - & - \tabularnewline
93 & 103.69 & - & - & - & - & - & - & - \tabularnewline
94 & 103.5 & 103.6862 & 103.1736 & 104.2013 & 0.2394 & 0.4942 & 1 & 0.4942 \tabularnewline
95 & 103.47 & 103.744 & 103.0194 & 104.4736 & 0.2309 & 0.7439 & 1 & 0.5576 \tabularnewline
96 & 103.45 & 103.654 & 102.7681 & 104.5476 & 0.3272 & 0.6568 & 1 & 0.4686 \tabularnewline
97 & 103.48 & 103.9087 & 102.8838 & 104.9437 & 0.2085 & 0.8075 & 1 & 0.6606 \tabularnewline
98 & 103.93 & 104.283 & 103.1342 & 105.4446 & 0.2757 & 0.9123 & 1 & 0.8415 \tabularnewline
99 & 103.89 & 104.5247 & 103.2644 & 105.8004 & 0.1647 & 0.8196 & 0.9999 & 0.9002 \tabularnewline
100 & 104.4 & 104.7675 & 103.404 & 106.149 & 0.301 & 0.8934 & 0.9996 & 0.9368 \tabularnewline
101 & 104.79 & 104.9599 & 103.5005 & 106.44 & 0.411 & 0.7708 & 0.9993 & 0.9537 \tabularnewline
102 & 104.77 & 105.0368 & 103.4885 & 106.6082 & 0.3697 & 0.6209 & 0.9968 & 0.9535 \tabularnewline
103 & 105.13 & 105.2899 & 103.6547 & 106.9508 & 0.4252 & 0.7302 & 0.9841 & 0.9705 \tabularnewline
104 & 105.26 & 105.3176 & 103.603 & 107.0606 & 0.4742 & 0.5835 & 0.9753 & 0.9664 \tabularnewline
105 & 104.96 & 105.5081 & 103.7147 & 107.3325 & 0.278 & 0.6051 & 0.9746 & 0.9746 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3038&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[93])[/C][/ROW]
[ROW][C]81[/C][C]100.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]101[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]100.88[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]100.55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]100.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]101.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]102.16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]102.39[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]102.54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]102.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]103.47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]103.57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]103.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]103.5[/C][C]103.6862[/C][C]103.1736[/C][C]104.2013[/C][C]0.2394[/C][C]0.4942[/C][C]1[/C][C]0.4942[/C][/ROW]
[ROW][C]95[/C][C]103.47[/C][C]103.744[/C][C]103.0194[/C][C]104.4736[/C][C]0.2309[/C][C]0.7439[/C][C]1[/C][C]0.5576[/C][/ROW]
[ROW][C]96[/C][C]103.45[/C][C]103.654[/C][C]102.7681[/C][C]104.5476[/C][C]0.3272[/C][C]0.6568[/C][C]1[/C][C]0.4686[/C][/ROW]
[ROW][C]97[/C][C]103.48[/C][C]103.9087[/C][C]102.8838[/C][C]104.9437[/C][C]0.2085[/C][C]0.8075[/C][C]1[/C][C]0.6606[/C][/ROW]
[ROW][C]98[/C][C]103.93[/C][C]104.283[/C][C]103.1342[/C][C]105.4446[/C][C]0.2757[/C][C]0.9123[/C][C]1[/C][C]0.8415[/C][/ROW]
[ROW][C]99[/C][C]103.89[/C][C]104.5247[/C][C]103.2644[/C][C]105.8004[/C][C]0.1647[/C][C]0.8196[/C][C]0.9999[/C][C]0.9002[/C][/ROW]
[ROW][C]100[/C][C]104.4[/C][C]104.7675[/C][C]103.404[/C][C]106.149[/C][C]0.301[/C][C]0.8934[/C][C]0.9996[/C][C]0.9368[/C][/ROW]
[ROW][C]101[/C][C]104.79[/C][C]104.9599[/C][C]103.5005[/C][C]106.44[/C][C]0.411[/C][C]0.7708[/C][C]0.9993[/C][C]0.9537[/C][/ROW]
[ROW][C]102[/C][C]104.77[/C][C]105.0368[/C][C]103.4885[/C][C]106.6082[/C][C]0.3697[/C][C]0.6209[/C][C]0.9968[/C][C]0.9535[/C][/ROW]
[ROW][C]103[/C][C]105.13[/C][C]105.2899[/C][C]103.6547[/C][C]106.9508[/C][C]0.4252[/C][C]0.7302[/C][C]0.9841[/C][C]0.9705[/C][/ROW]
[ROW][C]104[/C][C]105.26[/C][C]105.3176[/C][C]103.603[/C][C]107.0606[/C][C]0.4742[/C][C]0.5835[/C][C]0.9753[/C][C]0.9664[/C][/ROW]
[ROW][C]105[/C][C]104.96[/C][C]105.5081[/C][C]103.7147[/C][C]107.3325[/C][C]0.278[/C][C]0.6051[/C][C]0.9746[/C][C]0.9746[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3038&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3038&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[93])
81100.51-------
82101-------
83100.88-------
84100.55-------
85100.83-------
86101.51-------
87102.16-------
88102.39-------
89102.54-------
90102.85-------
91103.47-------
92103.57-------
93103.69-------
94103.5103.6862103.1736104.20130.23940.494210.4942
95103.47103.744103.0194104.47360.23090.743910.5576
96103.45103.654102.7681104.54760.32720.656810.4686
97103.48103.9087102.8838104.94370.20850.807510.6606
98103.93104.283103.1342105.44460.27570.912310.8415
99103.89104.5247103.2644105.80040.16470.81960.99990.9002
100104.4104.7675103.404106.1490.3010.89340.99960.9368
101104.79104.9599103.5005106.440.4110.77080.99930.9537
102104.77105.0368103.4885106.60820.36970.62090.99680.9535
103105.13105.2899103.6547106.95080.42520.73020.98410.9705
104105.26105.3176103.603107.06060.47420.58350.97530.9664
105104.96105.5081103.7147107.33250.2780.60510.97460.9746







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
940.0025-0.00181e-040.03470.00290.0537
950.0036-0.00262e-040.07510.00630.0791
960.0044-0.0022e-040.04160.00350.0589
970.0051-0.00413e-040.18370.01530.1237
980.0057-0.00343e-040.12460.01040.1019
990.0062-0.00615e-040.40280.03360.1832
1000.0067-0.00353e-040.13510.01130.1061
1010.0072-0.00161e-040.02890.00240.0491
1020.0076-0.00252e-040.07120.00590.077
1030.008-0.00151e-040.02560.00210.0462
1040.0084-5e-0400.00333e-040.0166
1050.0088-0.00524e-040.30040.0250.1582

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
94 & 0.0025 & -0.0018 & 1e-04 & 0.0347 & 0.0029 & 0.0537 \tabularnewline
95 & 0.0036 & -0.0026 & 2e-04 & 0.0751 & 0.0063 & 0.0791 \tabularnewline
96 & 0.0044 & -0.002 & 2e-04 & 0.0416 & 0.0035 & 0.0589 \tabularnewline
97 & 0.0051 & -0.0041 & 3e-04 & 0.1837 & 0.0153 & 0.1237 \tabularnewline
98 & 0.0057 & -0.0034 & 3e-04 & 0.1246 & 0.0104 & 0.1019 \tabularnewline
99 & 0.0062 & -0.0061 & 5e-04 & 0.4028 & 0.0336 & 0.1832 \tabularnewline
100 & 0.0067 & -0.0035 & 3e-04 & 0.1351 & 0.0113 & 0.1061 \tabularnewline
101 & 0.0072 & -0.0016 & 1e-04 & 0.0289 & 0.0024 & 0.0491 \tabularnewline
102 & 0.0076 & -0.0025 & 2e-04 & 0.0712 & 0.0059 & 0.077 \tabularnewline
103 & 0.008 & -0.0015 & 1e-04 & 0.0256 & 0.0021 & 0.0462 \tabularnewline
104 & 0.0084 & -5e-04 & 0 & 0.0033 & 3e-04 & 0.0166 \tabularnewline
105 & 0.0088 & -0.0052 & 4e-04 & 0.3004 & 0.025 & 0.1582 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3038&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]94[/C][C]0.0025[/C][C]-0.0018[/C][C]1e-04[/C][C]0.0347[/C][C]0.0029[/C][C]0.0537[/C][/ROW]
[ROW][C]95[/C][C]0.0036[/C][C]-0.0026[/C][C]2e-04[/C][C]0.0751[/C][C]0.0063[/C][C]0.0791[/C][/ROW]
[ROW][C]96[/C][C]0.0044[/C][C]-0.002[/C][C]2e-04[/C][C]0.0416[/C][C]0.0035[/C][C]0.0589[/C][/ROW]
[ROW][C]97[/C][C]0.0051[/C][C]-0.0041[/C][C]3e-04[/C][C]0.1837[/C][C]0.0153[/C][C]0.1237[/C][/ROW]
[ROW][C]98[/C][C]0.0057[/C][C]-0.0034[/C][C]3e-04[/C][C]0.1246[/C][C]0.0104[/C][C]0.1019[/C][/ROW]
[ROW][C]99[/C][C]0.0062[/C][C]-0.0061[/C][C]5e-04[/C][C]0.4028[/C][C]0.0336[/C][C]0.1832[/C][/ROW]
[ROW][C]100[/C][C]0.0067[/C][C]-0.0035[/C][C]3e-04[/C][C]0.1351[/C][C]0.0113[/C][C]0.1061[/C][/ROW]
[ROW][C]101[/C][C]0.0072[/C][C]-0.0016[/C][C]1e-04[/C][C]0.0289[/C][C]0.0024[/C][C]0.0491[/C][/ROW]
[ROW][C]102[/C][C]0.0076[/C][C]-0.0025[/C][C]2e-04[/C][C]0.0712[/C][C]0.0059[/C][C]0.077[/C][/ROW]
[ROW][C]103[/C][C]0.008[/C][C]-0.0015[/C][C]1e-04[/C][C]0.0256[/C][C]0.0021[/C][C]0.0462[/C][/ROW]
[ROW][C]104[/C][C]0.0084[/C][C]-5e-04[/C][C]0[/C][C]0.0033[/C][C]3e-04[/C][C]0.0166[/C][/ROW]
[ROW][C]105[/C][C]0.0088[/C][C]-0.0052[/C][C]4e-04[/C][C]0.3004[/C][C]0.025[/C][C]0.1582[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3038&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3038&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
940.0025-0.00181e-040.03470.00290.0537
950.0036-0.00262e-040.07510.00630.0791
960.0044-0.0022e-040.04160.00350.0589
970.0051-0.00413e-040.18370.01530.1237
980.0057-0.00343e-040.12460.01040.1019
990.0062-0.00615e-040.40280.03360.1832
1000.0067-0.00353e-040.13510.01130.1061
1010.0072-0.00161e-040.02890.00240.0491
1020.0076-0.00252e-040.07120.00590.077
1030.008-0.00151e-040.02560.00210.0462
1040.0084-5e-0400.00333e-040.0166
1050.0088-0.00524e-040.30040.0250.1582



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