Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 12 Dec 2007 02:36:22 -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/12/t1197451296r0kcq77w9qzhvt6.htm/, Retrieved Fri, 03 May 2024 00:21:33 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3184, Retrieved Fri, 03 May 2024 00:21:33 +0000
QR Codes:

Original text written by user:workshop 5 vraag 1
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact238
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [forecast] [2007-12-12 09:36:22] [0eafefa7b02d47065fceb6c46f54fbf9] [Current]
Feedback Forum

Post a new message
Dataseries X:
108,9
108,8
108,8
108,8
108,8
108,8
108,8
108,8
108,8
108,8
108,8
108,8
108,8
108,8
109,1
113,2
112,1
112,1
116,2
118,1
119,2
119,2
119,2
120,0
121,5
123,5
123,5
128,3
126,9
122,5
119,7
122,6
123,3
123,7
121,7
121,0
121,0
121,0
121,0
129,4
130,8
130,8
129,6
129,6
134,7
131,0
126,9
130,4
130,4
131,6
131,6
131,6
131,6
128,8




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3184&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]4 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=3184&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3184&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 time4 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[42])
30122.5-------
31119.7-------
32122.6-------
33123.3-------
34123.7-------
35121.7-------
36121-------
37121-------
38121-------
39121-------
40129.4-------
41130.8-------
42130.8-------
43129.6132.4817128.7532136.31820.07050.804910.8049
44129.6135.5462129.1651142.24240.04090.95910.99990.9176
45134.7136.2868128.201144.88260.35870.93630.99850.8945
46131136.0867126.86145.98440.15690.60820.99290.8524
47126.9134.1735124.1946144.95410.0930.7180.98830.7302
48130.4133.891123.1995145.51020.2780.88090.98520.699
49130.4134.6868123.2994147.12590.24970.75030.98450.7299
50131.6135.8726123.8326149.08330.26310.79160.98630.7742
51131.6135.3752122.8992149.11770.29510.70490.97980.743
52131.6143.1553129.5164158.23040.06650.93350.96310.9459
53131.6143.2981129.2512158.87170.07050.92950.94210.9421
54128.8139.466125.4538155.04320.08980.83880.86220.8622

\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[42]) \tabularnewline
30 & 122.5 & - & - & - & - & - & - & - \tabularnewline
31 & 119.7 & - & - & - & - & - & - & - \tabularnewline
32 & 122.6 & - & - & - & - & - & - & - \tabularnewline
33 & 123.3 & - & - & - & - & - & - & - \tabularnewline
34 & 123.7 & - & - & - & - & - & - & - \tabularnewline
35 & 121.7 & - & - & - & - & - & - & - \tabularnewline
36 & 121 & - & - & - & - & - & - & - \tabularnewline
37 & 121 & - & - & - & - & - & - & - \tabularnewline
38 & 121 & - & - & - & - & - & - & - \tabularnewline
39 & 121 & - & - & - & - & - & - & - \tabularnewline
40 & 129.4 & - & - & - & - & - & - & - \tabularnewline
41 & 130.8 & - & - & - & - & - & - & - \tabularnewline
42 & 130.8 & - & - & - & - & - & - & - \tabularnewline
43 & 129.6 & 132.4817 & 128.7532 & 136.3182 & 0.0705 & 0.8049 & 1 & 0.8049 \tabularnewline
44 & 129.6 & 135.5462 & 129.1651 & 142.2424 & 0.0409 & 0.9591 & 0.9999 & 0.9176 \tabularnewline
45 & 134.7 & 136.2868 & 128.201 & 144.8826 & 0.3587 & 0.9363 & 0.9985 & 0.8945 \tabularnewline
46 & 131 & 136.0867 & 126.86 & 145.9844 & 0.1569 & 0.6082 & 0.9929 & 0.8524 \tabularnewline
47 & 126.9 & 134.1735 & 124.1946 & 144.9541 & 0.093 & 0.718 & 0.9883 & 0.7302 \tabularnewline
48 & 130.4 & 133.891 & 123.1995 & 145.5102 & 0.278 & 0.8809 & 0.9852 & 0.699 \tabularnewline
49 & 130.4 & 134.6868 & 123.2994 & 147.1259 & 0.2497 & 0.7503 & 0.9845 & 0.7299 \tabularnewline
50 & 131.6 & 135.8726 & 123.8326 & 149.0833 & 0.2631 & 0.7916 & 0.9863 & 0.7742 \tabularnewline
51 & 131.6 & 135.3752 & 122.8992 & 149.1177 & 0.2951 & 0.7049 & 0.9798 & 0.743 \tabularnewline
52 & 131.6 & 143.1553 & 129.5164 & 158.2304 & 0.0665 & 0.9335 & 0.9631 & 0.9459 \tabularnewline
53 & 131.6 & 143.2981 & 129.2512 & 158.8717 & 0.0705 & 0.9295 & 0.9421 & 0.9421 \tabularnewline
54 & 128.8 & 139.466 & 125.4538 & 155.0432 & 0.0898 & 0.8388 & 0.8622 & 0.8622 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3184&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[42])[/C][/ROW]
[ROW][C]30[/C][C]122.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]119.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]122.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]123.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]123.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]121.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]121[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]121[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]121[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]121[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]129.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]130.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]130.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]129.6[/C][C]132.4817[/C][C]128.7532[/C][C]136.3182[/C][C]0.0705[/C][C]0.8049[/C][C]1[/C][C]0.8049[/C][/ROW]
[ROW][C]44[/C][C]129.6[/C][C]135.5462[/C][C]129.1651[/C][C]142.2424[/C][C]0.0409[/C][C]0.9591[/C][C]0.9999[/C][C]0.9176[/C][/ROW]
[ROW][C]45[/C][C]134.7[/C][C]136.2868[/C][C]128.201[/C][C]144.8826[/C][C]0.3587[/C][C]0.9363[/C][C]0.9985[/C][C]0.8945[/C][/ROW]
[ROW][C]46[/C][C]131[/C][C]136.0867[/C][C]126.86[/C][C]145.9844[/C][C]0.1569[/C][C]0.6082[/C][C]0.9929[/C][C]0.8524[/C][/ROW]
[ROW][C]47[/C][C]126.9[/C][C]134.1735[/C][C]124.1946[/C][C]144.9541[/C][C]0.093[/C][C]0.718[/C][C]0.9883[/C][C]0.7302[/C][/ROW]
[ROW][C]48[/C][C]130.4[/C][C]133.891[/C][C]123.1995[/C][C]145.5102[/C][C]0.278[/C][C]0.8809[/C][C]0.9852[/C][C]0.699[/C][/ROW]
[ROW][C]49[/C][C]130.4[/C][C]134.6868[/C][C]123.2994[/C][C]147.1259[/C][C]0.2497[/C][C]0.7503[/C][C]0.9845[/C][C]0.7299[/C][/ROW]
[ROW][C]50[/C][C]131.6[/C][C]135.8726[/C][C]123.8326[/C][C]149.0833[/C][C]0.2631[/C][C]0.7916[/C][C]0.9863[/C][C]0.7742[/C][/ROW]
[ROW][C]51[/C][C]131.6[/C][C]135.3752[/C][C]122.8992[/C][C]149.1177[/C][C]0.2951[/C][C]0.7049[/C][C]0.9798[/C][C]0.743[/C][/ROW]
[ROW][C]52[/C][C]131.6[/C][C]143.1553[/C][C]129.5164[/C][C]158.2304[/C][C]0.0665[/C][C]0.9335[/C][C]0.9631[/C][C]0.9459[/C][/ROW]
[ROW][C]53[/C][C]131.6[/C][C]143.2981[/C][C]129.2512[/C][C]158.8717[/C][C]0.0705[/C][C]0.9295[/C][C]0.9421[/C][C]0.9421[/C][/ROW]
[ROW][C]54[/C][C]128.8[/C][C]139.466[/C][C]125.4538[/C][C]155.0432[/C][C]0.0898[/C][C]0.8388[/C][C]0.8622[/C][C]0.8622[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3184&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3184&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[42])
30122.5-------
31119.7-------
32122.6-------
33123.3-------
34123.7-------
35121.7-------
36121-------
37121-------
38121-------
39121-------
40129.4-------
41130.8-------
42130.8-------
43129.6132.4817128.7532136.31820.07050.804910.8049
44129.6135.5462129.1651142.24240.04090.95910.99990.9176
45134.7136.2868128.201144.88260.35870.93630.99850.8945
46131136.0867126.86145.98440.15690.60820.99290.8524
47126.9134.1735124.1946144.95410.0930.7180.98830.7302
48130.4133.891123.1995145.51020.2780.88090.98520.699
49130.4134.6868123.2994147.12590.24970.75030.98450.7299
50131.6135.8726123.8326149.08330.26310.79160.98630.7742
51131.6135.3752122.8992149.11770.29510.70490.97980.743
52131.6143.1553129.5164158.23040.06650.93350.96310.9459
53131.6143.2981129.2512158.87170.07050.92950.94210.9421
54128.8139.466125.4538155.04320.08980.83880.86220.8622







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
430.0148-0.02180.00188.30410.6920.8319
440.0252-0.04390.003735.35682.94641.7165
450.0322-0.01160.0012.5180.20980.4581
460.0371-0.03740.003125.87432.15621.4684
470.041-0.05420.004552.90314.40862.0997
480.0443-0.02610.002212.1871.01561.0078
490.0471-0.03180.002718.37661.53141.2375
500.0496-0.03140.002618.25531.52131.2334
510.0518-0.02790.002314.25231.18771.0898
520.0537-0.08070.0067133.524411.1273.3357
530.0554-0.08160.0068136.846511.40393.377
540.057-0.07650.0064113.76419.48033.079

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
43 & 0.0148 & -0.0218 & 0.0018 & 8.3041 & 0.692 & 0.8319 \tabularnewline
44 & 0.0252 & -0.0439 & 0.0037 & 35.3568 & 2.9464 & 1.7165 \tabularnewline
45 & 0.0322 & -0.0116 & 0.001 & 2.518 & 0.2098 & 0.4581 \tabularnewline
46 & 0.0371 & -0.0374 & 0.0031 & 25.8743 & 2.1562 & 1.4684 \tabularnewline
47 & 0.041 & -0.0542 & 0.0045 & 52.9031 & 4.4086 & 2.0997 \tabularnewline
48 & 0.0443 & -0.0261 & 0.0022 & 12.187 & 1.0156 & 1.0078 \tabularnewline
49 & 0.0471 & -0.0318 & 0.0027 & 18.3766 & 1.5314 & 1.2375 \tabularnewline
50 & 0.0496 & -0.0314 & 0.0026 & 18.2553 & 1.5213 & 1.2334 \tabularnewline
51 & 0.0518 & -0.0279 & 0.0023 & 14.2523 & 1.1877 & 1.0898 \tabularnewline
52 & 0.0537 & -0.0807 & 0.0067 & 133.5244 & 11.127 & 3.3357 \tabularnewline
53 & 0.0554 & -0.0816 & 0.0068 & 136.8465 & 11.4039 & 3.377 \tabularnewline
54 & 0.057 & -0.0765 & 0.0064 & 113.7641 & 9.4803 & 3.079 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3184&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]43[/C][C]0.0148[/C][C]-0.0218[/C][C]0.0018[/C][C]8.3041[/C][C]0.692[/C][C]0.8319[/C][/ROW]
[ROW][C]44[/C][C]0.0252[/C][C]-0.0439[/C][C]0.0037[/C][C]35.3568[/C][C]2.9464[/C][C]1.7165[/C][/ROW]
[ROW][C]45[/C][C]0.0322[/C][C]-0.0116[/C][C]0.001[/C][C]2.518[/C][C]0.2098[/C][C]0.4581[/C][/ROW]
[ROW][C]46[/C][C]0.0371[/C][C]-0.0374[/C][C]0.0031[/C][C]25.8743[/C][C]2.1562[/C][C]1.4684[/C][/ROW]
[ROW][C]47[/C][C]0.041[/C][C]-0.0542[/C][C]0.0045[/C][C]52.9031[/C][C]4.4086[/C][C]2.0997[/C][/ROW]
[ROW][C]48[/C][C]0.0443[/C][C]-0.0261[/C][C]0.0022[/C][C]12.187[/C][C]1.0156[/C][C]1.0078[/C][/ROW]
[ROW][C]49[/C][C]0.0471[/C][C]-0.0318[/C][C]0.0027[/C][C]18.3766[/C][C]1.5314[/C][C]1.2375[/C][/ROW]
[ROW][C]50[/C][C]0.0496[/C][C]-0.0314[/C][C]0.0026[/C][C]18.2553[/C][C]1.5213[/C][C]1.2334[/C][/ROW]
[ROW][C]51[/C][C]0.0518[/C][C]-0.0279[/C][C]0.0023[/C][C]14.2523[/C][C]1.1877[/C][C]1.0898[/C][/ROW]
[ROW][C]52[/C][C]0.0537[/C][C]-0.0807[/C][C]0.0067[/C][C]133.5244[/C][C]11.127[/C][C]3.3357[/C][/ROW]
[ROW][C]53[/C][C]0.0554[/C][C]-0.0816[/C][C]0.0068[/C][C]136.8465[/C][C]11.4039[/C][C]3.377[/C][/ROW]
[ROW][C]54[/C][C]0.057[/C][C]-0.0765[/C][C]0.0064[/C][C]113.7641[/C][C]9.4803[/C][C]3.079[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3184&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3184&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
430.0148-0.02180.00188.30410.6920.8319
440.0252-0.04390.003735.35682.94641.7165
450.0322-0.01160.0012.5180.20980.4581
460.0371-0.03740.003125.87432.15621.4684
470.041-0.05420.004552.90314.40862.0997
480.0443-0.02610.002212.1871.01561.0078
490.0471-0.03180.002718.37661.53141.2375
500.0496-0.03140.002618.25531.52131.2334
510.0518-0.02790.002314.25231.18771.0898
520.0537-0.08070.0067133.524411.1273.3357
530.0554-0.08160.0068136.846511.40393.377
540.057-0.07650.0064113.76419.48033.079



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