Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Module--
Title produced by softwareARIMA Forecasting
Date of computationWed, 28 Nov 2012 13:35:44 -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/Nov/28/t1354127775q23u8umx8kuu7rg.htm/, Retrieved Thu, 28 Mar 2024 11:55:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=194212, Retrieved Thu, 28 Mar 2024 11:55:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact102
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Monthly US soldie...] [2010-11-02 12:07:39] [b98453cac15ba1066b407e146608df68]
- RMP   [Variance Reduction Matrix] [Soldiers] [2010-11-29 09:51:25] [b98453cac15ba1066b407e146608df68]
- RM      [Standard Deviation-Mean Plot] [Soldiers] [2010-11-29 11:02:42] [b98453cac15ba1066b407e146608df68]
- RMP       [ARIMA Forecasting] [Soldiers] [2010-11-29 21:04:02] [b98453cac15ba1066b407e146608df68]
- R           [ARIMA Forecasting] [ARIMA Forecasting...] [2012-11-21 15:11:31] [8fc56f6caf42131500698d1cf21d4abb]
- RM              [ARIMA Forecasting] [ARIMA Forecasting] [2012-11-28 18:35:44] [4c917d823355d00d361b7013e9f37760] [Current]
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 time2 seconds
R Server'George Udny Yule' @ yule.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 & 2 seconds \tabularnewline
R Server & 'George Udny Yule' @ yule.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=194212&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ yule.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=194212&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=194212&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 time2 seconds
R Server'George Udny Yule' @ yule.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[68])
5623-------
5740-------
5829-------
5937-------
6051-------
6120-------
6228-------
6313-------
6422-------
6525-------
6613-------
6716-------
6813-------
691616.4372-31.013563.8880.49280.55650.16520.5565
701716.4372-34.226267.10070.49130.50670.31350.5529
71916.4372-37.247170.12160.3930.49180.22640.5499
721716.4372-40.106872.98130.49220.60170.11540.5474
732516.4372-42.828675.70310.38850.49260.45310.5453
741416.4372-45.430878.30530.46920.39310.35710.5434
75816.4372-47.927980.80240.39860.52960.54170.5417
76716.4372-50.331783.20620.39090.59780.43510.5402
771016.4372-52.651985.52640.42750.60550.4040.5388
78716.4372-54.896787.77120.39770.57020.53760.5376
791016.4372-57.072989.94740.43190.59930.50470.5365
80316.4372-59.186692.06110.36380.56630.53550.5355

\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.4372 & -31.0135 & 63.888 & 0.4928 & 0.5565 & 0.1652 & 0.5565 \tabularnewline
70 & 17 & 16.4372 & -34.2262 & 67.1007 & 0.4913 & 0.5067 & 0.3135 & 0.5529 \tabularnewline
71 & 9 & 16.4372 & -37.2471 & 70.1216 & 0.393 & 0.4918 & 0.2264 & 0.5499 \tabularnewline
72 & 17 & 16.4372 & -40.1068 & 72.9813 & 0.4922 & 0.6017 & 0.1154 & 0.5474 \tabularnewline
73 & 25 & 16.4372 & -42.8286 & 75.7031 & 0.3885 & 0.4926 & 0.4531 & 0.5453 \tabularnewline
74 & 14 & 16.4372 & -45.4308 & 78.3053 & 0.4692 & 0.3931 & 0.3571 & 0.5434 \tabularnewline
75 & 8 & 16.4372 & -47.9279 & 80.8024 & 0.3986 & 0.5296 & 0.5417 & 0.5417 \tabularnewline
76 & 7 & 16.4372 & -50.3317 & 83.2062 & 0.3909 & 0.5978 & 0.4351 & 0.5402 \tabularnewline
77 & 10 & 16.4372 & -52.6519 & 85.5264 & 0.4275 & 0.6055 & 0.404 & 0.5388 \tabularnewline
78 & 7 & 16.4372 & -54.8967 & 87.7712 & 0.3977 & 0.5702 & 0.5376 & 0.5376 \tabularnewline
79 & 10 & 16.4372 & -57.0729 & 89.9474 & 0.4319 & 0.5993 & 0.5047 & 0.5365 \tabularnewline
80 & 3 & 16.4372 & -59.1866 & 92.0611 & 0.3638 & 0.5663 & 0.5355 & 0.5355 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=194212&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.4372[/C][C]-31.0135[/C][C]63.888[/C][C]0.4928[/C][C]0.5565[/C][C]0.1652[/C][C]0.5565[/C][/ROW]
[ROW][C]70[/C][C]17[/C][C]16.4372[/C][C]-34.2262[/C][C]67.1007[/C][C]0.4913[/C][C]0.5067[/C][C]0.3135[/C][C]0.5529[/C][/ROW]
[ROW][C]71[/C][C]9[/C][C]16.4372[/C][C]-37.2471[/C][C]70.1216[/C][C]0.393[/C][C]0.4918[/C][C]0.2264[/C][C]0.5499[/C][/ROW]
[ROW][C]72[/C][C]17[/C][C]16.4372[/C][C]-40.1068[/C][C]72.9813[/C][C]0.4922[/C][C]0.6017[/C][C]0.1154[/C][C]0.5474[/C][/ROW]
[ROW][C]73[/C][C]25[/C][C]16.4372[/C][C]-42.8286[/C][C]75.7031[/C][C]0.3885[/C][C]0.4926[/C][C]0.4531[/C][C]0.5453[/C][/ROW]
[ROW][C]74[/C][C]14[/C][C]16.4372[/C][C]-45.4308[/C][C]78.3053[/C][C]0.4692[/C][C]0.3931[/C][C]0.3571[/C][C]0.5434[/C][/ROW]
[ROW][C]75[/C][C]8[/C][C]16.4372[/C][C]-47.9279[/C][C]80.8024[/C][C]0.3986[/C][C]0.5296[/C][C]0.5417[/C][C]0.5417[/C][/ROW]
[ROW][C]76[/C][C]7[/C][C]16.4372[/C][C]-50.3317[/C][C]83.2062[/C][C]0.3909[/C][C]0.5978[/C][C]0.4351[/C][C]0.5402[/C][/ROW]
[ROW][C]77[/C][C]10[/C][C]16.4372[/C][C]-52.6519[/C][C]85.5264[/C][C]0.4275[/C][C]0.6055[/C][C]0.404[/C][C]0.5388[/C][/ROW]
[ROW][C]78[/C][C]7[/C][C]16.4372[/C][C]-54.8967[/C][C]87.7712[/C][C]0.3977[/C][C]0.5702[/C][C]0.5376[/C][C]0.5376[/C][/ROW]
[ROW][C]79[/C][C]10[/C][C]16.4372[/C][C]-57.0729[/C][C]89.9474[/C][C]0.4319[/C][C]0.5993[/C][C]0.5047[/C][C]0.5365[/C][/ROW]
[ROW][C]80[/C][C]3[/C][C]16.4372[/C][C]-59.1866[/C][C]92.0611[/C][C]0.3638[/C][C]0.5663[/C][C]0.5355[/C][C]0.5355[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=194212&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=194212&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.4372-31.013563.8880.49280.55650.16520.5565
701716.4372-34.226267.10070.49130.50670.31350.5529
71916.4372-37.247170.12160.3930.49180.22640.5499
721716.4372-40.106872.98130.49220.60170.11540.5474
732516.4372-42.828675.70310.38850.49260.45310.5453
741416.4372-45.430878.30530.46920.39310.35710.5434
75816.4372-47.927980.80240.39860.52960.54170.5417
76716.4372-50.331783.20620.39090.59780.43510.5402
771016.4372-52.651985.52640.42750.60550.4040.5388
78716.4372-54.896787.77120.39770.57020.53760.5376
791016.4372-57.072989.94740.43190.59930.50470.5365
80316.4372-59.186692.06110.36380.56630.53550.5355







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
691.4728-0.026600.191200
701.57260.03420.03040.31670.25390.5039
711.6663-0.45250.171155.312718.60684.3136
721.75510.03420.13690.316714.03433.7462
731.83960.52090.213773.320725.89165.0884
741.9204-0.14830.20285.940222.56644.7504
751.9979-0.51330.247171.187229.51225.4325
762.0725-0.57410.28889.061736.95596.0791
772.1445-0.39160.299541.438237.45396.12
782.2142-0.57410.32789.061742.61476.528
792.2817-0.39160.332941.438242.50776.5198
802.3473-0.81750.3733180.559754.01217.3493

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 1.4728 & -0.0266 & 0 & 0.1912 & 0 & 0 \tabularnewline
70 & 1.5726 & 0.0342 & 0.0304 & 0.3167 & 0.2539 & 0.5039 \tabularnewline
71 & 1.6663 & -0.4525 & 0.1711 & 55.3127 & 18.6068 & 4.3136 \tabularnewline
72 & 1.7551 & 0.0342 & 0.1369 & 0.3167 & 14.0343 & 3.7462 \tabularnewline
73 & 1.8396 & 0.5209 & 0.2137 & 73.3207 & 25.8916 & 5.0884 \tabularnewline
74 & 1.9204 & -0.1483 & 0.2028 & 5.9402 & 22.5664 & 4.7504 \tabularnewline
75 & 1.9979 & -0.5133 & 0.2471 & 71.1872 & 29.5122 & 5.4325 \tabularnewline
76 & 2.0725 & -0.5741 & 0.288 & 89.0617 & 36.9559 & 6.0791 \tabularnewline
77 & 2.1445 & -0.3916 & 0.2995 & 41.4382 & 37.4539 & 6.12 \tabularnewline
78 & 2.2142 & -0.5741 & 0.327 & 89.0617 & 42.6147 & 6.528 \tabularnewline
79 & 2.2817 & -0.3916 & 0.3329 & 41.4382 & 42.5077 & 6.5198 \tabularnewline
80 & 2.3473 & -0.8175 & 0.3733 & 180.5597 & 54.0121 & 7.3493 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=194212&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.4728[/C][C]-0.0266[/C][C]0[/C][C]0.1912[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]70[/C][C]1.5726[/C][C]0.0342[/C][C]0.0304[/C][C]0.3167[/C][C]0.2539[/C][C]0.5039[/C][/ROW]
[ROW][C]71[/C][C]1.6663[/C][C]-0.4525[/C][C]0.1711[/C][C]55.3127[/C][C]18.6068[/C][C]4.3136[/C][/ROW]
[ROW][C]72[/C][C]1.7551[/C][C]0.0342[/C][C]0.1369[/C][C]0.3167[/C][C]14.0343[/C][C]3.7462[/C][/ROW]
[ROW][C]73[/C][C]1.8396[/C][C]0.5209[/C][C]0.2137[/C][C]73.3207[/C][C]25.8916[/C][C]5.0884[/C][/ROW]
[ROW][C]74[/C][C]1.9204[/C][C]-0.1483[/C][C]0.2028[/C][C]5.9402[/C][C]22.5664[/C][C]4.7504[/C][/ROW]
[ROW][C]75[/C][C]1.9979[/C][C]-0.5133[/C][C]0.2471[/C][C]71.1872[/C][C]29.5122[/C][C]5.4325[/C][/ROW]
[ROW][C]76[/C][C]2.0725[/C][C]-0.5741[/C][C]0.288[/C][C]89.0617[/C][C]36.9559[/C][C]6.0791[/C][/ROW]
[ROW][C]77[/C][C]2.1445[/C][C]-0.3916[/C][C]0.2995[/C][C]41.4382[/C][C]37.4539[/C][C]6.12[/C][/ROW]
[ROW][C]78[/C][C]2.2142[/C][C]-0.5741[/C][C]0.327[/C][C]89.0617[/C][C]42.6147[/C][C]6.528[/C][/ROW]
[ROW][C]79[/C][C]2.2817[/C][C]-0.3916[/C][C]0.3329[/C][C]41.4382[/C][C]42.5077[/C][C]6.5198[/C][/ROW]
[ROW][C]80[/C][C]2.3473[/C][C]-0.8175[/C][C]0.3733[/C][C]180.5597[/C][C]54.0121[/C][C]7.3493[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=194212&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=194212&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.4728-0.026600.191200
701.57260.03420.03040.31670.25390.5039
711.6663-0.45250.171155.312718.60684.3136
721.75510.03420.13690.316714.03433.7462
731.83960.52090.213773.320725.89165.0884
741.9204-0.14830.20285.940222.56644.7504
751.9979-0.51330.247171.187229.51225.4325
762.0725-0.57410.28889.061736.95596.0791
772.1445-0.39160.299541.438237.45396.12
782.2142-0.57410.32789.061742.61476.528
792.2817-0.39160.332941.438242.50776.5198
802.3473-0.81750.3733180.559754.01217.3493



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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')