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, 20 Dec 2012 10:13:00 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/20/t1356016542od65rzv7vtxr7sd.htm/, Retrieved Sat, 27 Apr 2024 02:40:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=202746, Retrieved Sat, 27 Apr 2024 02:40:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact85
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [paper deel 4 fore...] [2012-12-16 20:45:27] [d78b9afa8f7e4cb23f8a65a6f0918ac0]
- R P     [ARIMA Forecasting] [forecasting 2] [2012-12-20 15:13:00] [4e0a07d67ff6ab1ee99ce2372e43edac] [Current]
Feedback Forum

Post a new message
Dataseries X:
369.07
369.32
370.38
371.63
371.32
371.51
369.69
368.18
366.87
366.94
368.27
369.62
370.47
371.44
372.39
373.32
373.77
373.13
371.51
369.59
368.12
368.38
369.64
371.11
372.38
373.08
373.87
374.93
375.58
375.44
373.91
371.77
370.72
370.5
372.19
373.71
374.92
375.63
376.51
377.75
378.54
378.21
376.65
374.28
373.12
373.1
374.67
375.97
377.03
377.87
378.88
380.42
380.62
379.66
377.48
376.07
374.1
374.47
376.15
377.51
378.43
379.7
380.91
382.2
382.45
382.14
380.6
378.6
376.72
376.98
378.29
380.07
381.36
382.19
382.65
384.65
384.94
384.01
382.15
380.33
378.81
379.06
380.17
381.85
382.88
383.77
384.42
386.36
386.53
386.01
384.45
381.96
380.81
381.09
382.37
383.84
385.42
385.72
385.96
387.18
388.5
387.88
386.38
384.15
383.07
382.98
384.11
385.54
386.92
387.41
388.77
389.46
390.18
389.43
387.74
385.91
384.77
384.38
385.99
387.26
388.45
389.7
391.08
392.46
392.96
392.03
390.13
388.15
386.8
387.18
388.59




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net

\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 & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=202746&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=202746&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=202746&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 time3 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net







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[119])
107384.11-------
108385.54-------
109386.92-------
110387.41-------
111388.77-------
112389.46-------
113390.18-------
114389.43-------
115387.74-------
116385.91-------
117384.77-------
118384.38-------
119385.99-------
120387.26387.5413386.9309388.15350.1839111
121388.45388.7971388.1118389.48470.1612111
122389.7389.5633388.8108390.31850.36130.998111
123391.08390.4749389.6593391.29370.07370.968211
124392.46391.8628390.9858392.74360.09190.959211
125392.96392.3356391.4038393.27170.09550.397311
126392.03391.8125390.8333392.79640.33240.011111
127390.13390.0301389.0124391.05290.42411e-0411
128388.15387.9504386.8985389.00760.355700.99990.9999
129386.8386.4989385.4122387.59140.29450.00150.9990.8194
130387.18386.5818385.454387.71590.15060.35310.99990.8468
131388.59388.0582386.8827389.24050.1890.92730.99970.9997

\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[119]) \tabularnewline
107 & 384.11 & - & - & - & - & - & - & - \tabularnewline
108 & 385.54 & - & - & - & - & - & - & - \tabularnewline
109 & 386.92 & - & - & - & - & - & - & - \tabularnewline
110 & 387.41 & - & - & - & - & - & - & - \tabularnewline
111 & 388.77 & - & - & - & - & - & - & - \tabularnewline
112 & 389.46 & - & - & - & - & - & - & - \tabularnewline
113 & 390.18 & - & - & - & - & - & - & - \tabularnewline
114 & 389.43 & - & - & - & - & - & - & - \tabularnewline
115 & 387.74 & - & - & - & - & - & - & - \tabularnewline
116 & 385.91 & - & - & - & - & - & - & - \tabularnewline
117 & 384.77 & - & - & - & - & - & - & - \tabularnewline
118 & 384.38 & - & - & - & - & - & - & - \tabularnewline
119 & 385.99 & - & - & - & - & - & - & - \tabularnewline
120 & 387.26 & 387.5413 & 386.9309 & 388.1535 & 0.1839 & 1 & 1 & 1 \tabularnewline
121 & 388.45 & 388.7971 & 388.1118 & 389.4847 & 0.1612 & 1 & 1 & 1 \tabularnewline
122 & 389.7 & 389.5633 & 388.8108 & 390.3185 & 0.3613 & 0.9981 & 1 & 1 \tabularnewline
123 & 391.08 & 390.4749 & 389.6593 & 391.2937 & 0.0737 & 0.9682 & 1 & 1 \tabularnewline
124 & 392.46 & 391.8628 & 390.9858 & 392.7436 & 0.0919 & 0.9592 & 1 & 1 \tabularnewline
125 & 392.96 & 392.3356 & 391.4038 & 393.2717 & 0.0955 & 0.3973 & 1 & 1 \tabularnewline
126 & 392.03 & 391.8125 & 390.8333 & 392.7964 & 0.3324 & 0.0111 & 1 & 1 \tabularnewline
127 & 390.13 & 390.0301 & 389.0124 & 391.0529 & 0.4241 & 1e-04 & 1 & 1 \tabularnewline
128 & 388.15 & 387.9504 & 386.8985 & 389.0076 & 0.3557 & 0 & 0.9999 & 0.9999 \tabularnewline
129 & 386.8 & 386.4989 & 385.4122 & 387.5914 & 0.2945 & 0.0015 & 0.999 & 0.8194 \tabularnewline
130 & 387.18 & 386.5818 & 385.454 & 387.7159 & 0.1506 & 0.3531 & 0.9999 & 0.8468 \tabularnewline
131 & 388.59 & 388.0582 & 386.8827 & 389.2405 & 0.189 & 0.9273 & 0.9997 & 0.9997 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=202746&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[119])[/C][/ROW]
[ROW][C]107[/C][C]384.11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]385.54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]386.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]387.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]388.77[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]389.46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]390.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]389.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]387.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]385.91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]384.77[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]384.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]385.99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]387.26[/C][C]387.5413[/C][C]386.9309[/C][C]388.1535[/C][C]0.1839[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]121[/C][C]388.45[/C][C]388.7971[/C][C]388.1118[/C][C]389.4847[/C][C]0.1612[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]122[/C][C]389.7[/C][C]389.5633[/C][C]388.8108[/C][C]390.3185[/C][C]0.3613[/C][C]0.9981[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]123[/C][C]391.08[/C][C]390.4749[/C][C]389.6593[/C][C]391.2937[/C][C]0.0737[/C][C]0.9682[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]124[/C][C]392.46[/C][C]391.8628[/C][C]390.9858[/C][C]392.7436[/C][C]0.0919[/C][C]0.9592[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]125[/C][C]392.96[/C][C]392.3356[/C][C]391.4038[/C][C]393.2717[/C][C]0.0955[/C][C]0.3973[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]126[/C][C]392.03[/C][C]391.8125[/C][C]390.8333[/C][C]392.7964[/C][C]0.3324[/C][C]0.0111[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]127[/C][C]390.13[/C][C]390.0301[/C][C]389.0124[/C][C]391.0529[/C][C]0.4241[/C][C]1e-04[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]128[/C][C]388.15[/C][C]387.9504[/C][C]386.8985[/C][C]389.0076[/C][C]0.3557[/C][C]0[/C][C]0.9999[/C][C]0.9999[/C][/ROW]
[ROW][C]129[/C][C]386.8[/C][C]386.4989[/C][C]385.4122[/C][C]387.5914[/C][C]0.2945[/C][C]0.0015[/C][C]0.999[/C][C]0.8194[/C][/ROW]
[ROW][C]130[/C][C]387.18[/C][C]386.5818[/C][C]385.454[/C][C]387.7159[/C][C]0.1506[/C][C]0.3531[/C][C]0.9999[/C][C]0.8468[/C][/ROW]
[ROW][C]131[/C][C]388.59[/C][C]388.0582[/C][C]386.8827[/C][C]389.2405[/C][C]0.189[/C][C]0.9273[/C][C]0.9997[/C][C]0.9997[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=202746&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=202746&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[119])
107384.11-------
108385.54-------
109386.92-------
110387.41-------
111388.77-------
112389.46-------
113390.18-------
114389.43-------
115387.74-------
116385.91-------
117384.77-------
118384.38-------
119385.99-------
120387.26387.5413386.9309388.15350.1839111
121388.45388.7971388.1118389.48470.1612111
122389.7389.5633388.8108390.31850.36130.998111
123391.08390.4749389.6593391.29370.07370.968211
124392.46391.8628390.9858392.74360.09190.959211
125392.96392.3356391.4038393.27170.09550.397311
126392.03391.8125390.8333392.79640.33240.011111
127390.13390.0301389.0124391.05290.42411e-0411
128388.15387.9504386.8985389.00760.355700.99990.9999
129386.8386.4989385.4122387.59140.29450.00150.9990.8194
130387.18386.5818385.454387.71590.15060.35310.99990.8468
131388.59388.0582386.8827389.24050.1890.92730.99970.9997







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1208e-04-7e-0400.079100
1219e-04-9e-048e-040.12050.09980.3159
1220.0014e-047e-040.01870.07280.2698
1230.00110.00159e-040.36620.14610.3823
1240.00110.00150.0010.35660.18820.4338
1250.00120.00160.00110.38980.22180.471
1260.00136e-040.0010.04730.19690.4437
1270.00133e-049e-040.010.17350.4166
1280.00145e-049e-040.03990.15870.3983
1290.00148e-049e-040.09070.15190.3897
1300.00150.00159e-040.35780.17060.413
1310.00160.00140.0010.28280.17990.4242

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
120 & 8e-04 & -7e-04 & 0 & 0.0791 & 0 & 0 \tabularnewline
121 & 9e-04 & -9e-04 & 8e-04 & 0.1205 & 0.0998 & 0.3159 \tabularnewline
122 & 0.001 & 4e-04 & 7e-04 & 0.0187 & 0.0728 & 0.2698 \tabularnewline
123 & 0.0011 & 0.0015 & 9e-04 & 0.3662 & 0.1461 & 0.3823 \tabularnewline
124 & 0.0011 & 0.0015 & 0.001 & 0.3566 & 0.1882 & 0.4338 \tabularnewline
125 & 0.0012 & 0.0016 & 0.0011 & 0.3898 & 0.2218 & 0.471 \tabularnewline
126 & 0.0013 & 6e-04 & 0.001 & 0.0473 & 0.1969 & 0.4437 \tabularnewline
127 & 0.0013 & 3e-04 & 9e-04 & 0.01 & 0.1735 & 0.4166 \tabularnewline
128 & 0.0014 & 5e-04 & 9e-04 & 0.0399 & 0.1587 & 0.3983 \tabularnewline
129 & 0.0014 & 8e-04 & 9e-04 & 0.0907 & 0.1519 & 0.3897 \tabularnewline
130 & 0.0015 & 0.0015 & 9e-04 & 0.3578 & 0.1706 & 0.413 \tabularnewline
131 & 0.0016 & 0.0014 & 0.001 & 0.2828 & 0.1799 & 0.4242 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=202746&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]120[/C][C]8e-04[/C][C]-7e-04[/C][C]0[/C][C]0.0791[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]121[/C][C]9e-04[/C][C]-9e-04[/C][C]8e-04[/C][C]0.1205[/C][C]0.0998[/C][C]0.3159[/C][/ROW]
[ROW][C]122[/C][C]0.001[/C][C]4e-04[/C][C]7e-04[/C][C]0.0187[/C][C]0.0728[/C][C]0.2698[/C][/ROW]
[ROW][C]123[/C][C]0.0011[/C][C]0.0015[/C][C]9e-04[/C][C]0.3662[/C][C]0.1461[/C][C]0.3823[/C][/ROW]
[ROW][C]124[/C][C]0.0011[/C][C]0.0015[/C][C]0.001[/C][C]0.3566[/C][C]0.1882[/C][C]0.4338[/C][/ROW]
[ROW][C]125[/C][C]0.0012[/C][C]0.0016[/C][C]0.0011[/C][C]0.3898[/C][C]0.2218[/C][C]0.471[/C][/ROW]
[ROW][C]126[/C][C]0.0013[/C][C]6e-04[/C][C]0.001[/C][C]0.0473[/C][C]0.1969[/C][C]0.4437[/C][/ROW]
[ROW][C]127[/C][C]0.0013[/C][C]3e-04[/C][C]9e-04[/C][C]0.01[/C][C]0.1735[/C][C]0.4166[/C][/ROW]
[ROW][C]128[/C][C]0.0014[/C][C]5e-04[/C][C]9e-04[/C][C]0.0399[/C][C]0.1587[/C][C]0.3983[/C][/ROW]
[ROW][C]129[/C][C]0.0014[/C][C]8e-04[/C][C]9e-04[/C][C]0.0907[/C][C]0.1519[/C][C]0.3897[/C][/ROW]
[ROW][C]130[/C][C]0.0015[/C][C]0.0015[/C][C]9e-04[/C][C]0.3578[/C][C]0.1706[/C][C]0.413[/C][/ROW]
[ROW][C]131[/C][C]0.0016[/C][C]0.0014[/C][C]0.001[/C][C]0.2828[/C][C]0.1799[/C][C]0.4242[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=202746&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=202746&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
1208e-04-7e-0400.079100
1219e-04-9e-048e-040.12050.09980.3159
1220.0014e-047e-040.01870.07280.2698
1230.00110.00159e-040.36620.14610.3823
1240.00110.00150.0010.35660.18820.4338
1250.00120.00160.00110.38980.22180.471
1260.00136e-040.0010.04730.19690.4437
1270.00133e-049e-040.010.17350.4166
1280.00145e-049e-040.03990.15870.3983
1290.00148e-049e-040.09070.15190.3897
1300.00150.00159e-040.35780.17060.413
1310.00160.00140.0010.28280.17990.4242



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