Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 19 Dec 2007 07:09:18 -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/19/t1198072311oqjfjnfu7a6kj6v.htm/, Retrieved Mon, 06 May 2024 12:15:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4654, Retrieved Mon, 06 May 2024 12:15:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact220
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-19 14:09:18] [e2f7a6e26aa7cf06a3d27eb5298a4843] [Current]
Feedback Forum

Post a new message
Dataseries X:
0.76
0.77
0.76
0.77
0.78
0.79
0.78
0.76
0.78
0.76
0.74
0.73
0.72
0.71
0.73
0.75
0.75
0.72
0.72
0.72
0.74
0.78
0.74
0.74
0.75
0.78
0.81
0.75
0.7
0.71
0.71
0.73
0.74
0.74
0.75
0.74
0.74
0.73
0.76
0.8
0.83
0.81
0.83
0.88
0.89
0.93
0.91
0.9
0.86
0.88
0.93
0.98
0.97
1.03
1.06
1.06
1.08
1.09
1.04
1
1.01
1.02
1.04
1.06
1.06
1.06
1.06
1.06
1.02
0.98
0.99
0.99
0.94
0.96
0.98
1.01
1.01
1.02
1.04
1.03




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4654&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 time2 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[68])
561.06-------
571.08-------
581.09-------
591.04-------
601-------
611.01-------
621.02-------
631.04-------
641.06-------
651.06-------
661.06-------
671.06-------
681.06-------
691.021.05811.00451.11370.08930.47370.22020.4737
700.981.0660.97931.15790.03340.83650.30420.5507
710.991.06590.95851.18140.09890.92750.66990.5399
720.991.06660.94481.19910.12850.87150.83790.539
730.941.05820.92531.2040.0560.82050.74160.4905
740.961.06150.91751.22060.10560.93280.69540.5074
750.981.06990.9151.24230.15320.89440.63330.545
761.011.07810.91291.26330.23540.85060.57620.5762
771.011.07630.90231.27250.25380.74620.56470.5647
781.021.08720.90351.29550.26370.76610.60090.6009
791.041.09250.90011.31190.31960.74130.61410.6141
801.031.09250.89251.32190.29670.6730.60930.6093

\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 & 1.06 & - & - & - & - & - & - & - \tabularnewline
57 & 1.08 & - & - & - & - & - & - & - \tabularnewline
58 & 1.09 & - & - & - & - & - & - & - \tabularnewline
59 & 1.04 & - & - & - & - & - & - & - \tabularnewline
60 & 1 & - & - & - & - & - & - & - \tabularnewline
61 & 1.01 & - & - & - & - & - & - & - \tabularnewline
62 & 1.02 & - & - & - & - & - & - & - \tabularnewline
63 & 1.04 & - & - & - & - & - & - & - \tabularnewline
64 & 1.06 & - & - & - & - & - & - & - \tabularnewline
65 & 1.06 & - & - & - & - & - & - & - \tabularnewline
66 & 1.06 & - & - & - & - & - & - & - \tabularnewline
67 & 1.06 & - & - & - & - & - & - & - \tabularnewline
68 & 1.06 & - & - & - & - & - & - & - \tabularnewline
69 & 1.02 & 1.0581 & 1.0045 & 1.1137 & 0.0893 & 0.4737 & 0.2202 & 0.4737 \tabularnewline
70 & 0.98 & 1.066 & 0.9793 & 1.1579 & 0.0334 & 0.8365 & 0.3042 & 0.5507 \tabularnewline
71 & 0.99 & 1.0659 & 0.9585 & 1.1814 & 0.0989 & 0.9275 & 0.6699 & 0.5399 \tabularnewline
72 & 0.99 & 1.0666 & 0.9448 & 1.1991 & 0.1285 & 0.8715 & 0.8379 & 0.539 \tabularnewline
73 & 0.94 & 1.0582 & 0.9253 & 1.204 & 0.056 & 0.8205 & 0.7416 & 0.4905 \tabularnewline
74 & 0.96 & 1.0615 & 0.9175 & 1.2206 & 0.1056 & 0.9328 & 0.6954 & 0.5074 \tabularnewline
75 & 0.98 & 1.0699 & 0.915 & 1.2423 & 0.1532 & 0.8944 & 0.6333 & 0.545 \tabularnewline
76 & 1.01 & 1.0781 & 0.9129 & 1.2633 & 0.2354 & 0.8506 & 0.5762 & 0.5762 \tabularnewline
77 & 1.01 & 1.0763 & 0.9023 & 1.2725 & 0.2538 & 0.7462 & 0.5647 & 0.5647 \tabularnewline
78 & 1.02 & 1.0872 & 0.9035 & 1.2955 & 0.2637 & 0.7661 & 0.6009 & 0.6009 \tabularnewline
79 & 1.04 & 1.0925 & 0.9001 & 1.3119 & 0.3196 & 0.7413 & 0.6141 & 0.6141 \tabularnewline
80 & 1.03 & 1.0925 & 0.8925 & 1.3219 & 0.2967 & 0.673 & 0.6093 & 0.6093 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4654&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]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1.08[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1.09[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]1.04[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]1.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]1.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]1.04[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]1.02[/C][C]1.0581[/C][C]1.0045[/C][C]1.1137[/C][C]0.0893[/C][C]0.4737[/C][C]0.2202[/C][C]0.4737[/C][/ROW]
[ROW][C]70[/C][C]0.98[/C][C]1.066[/C][C]0.9793[/C][C]1.1579[/C][C]0.0334[/C][C]0.8365[/C][C]0.3042[/C][C]0.5507[/C][/ROW]
[ROW][C]71[/C][C]0.99[/C][C]1.0659[/C][C]0.9585[/C][C]1.1814[/C][C]0.0989[/C][C]0.9275[/C][C]0.6699[/C][C]0.5399[/C][/ROW]
[ROW][C]72[/C][C]0.99[/C][C]1.0666[/C][C]0.9448[/C][C]1.1991[/C][C]0.1285[/C][C]0.8715[/C][C]0.8379[/C][C]0.539[/C][/ROW]
[ROW][C]73[/C][C]0.94[/C][C]1.0582[/C][C]0.9253[/C][C]1.204[/C][C]0.056[/C][C]0.8205[/C][C]0.7416[/C][C]0.4905[/C][/ROW]
[ROW][C]74[/C][C]0.96[/C][C]1.0615[/C][C]0.9175[/C][C]1.2206[/C][C]0.1056[/C][C]0.9328[/C][C]0.6954[/C][C]0.5074[/C][/ROW]
[ROW][C]75[/C][C]0.98[/C][C]1.0699[/C][C]0.915[/C][C]1.2423[/C][C]0.1532[/C][C]0.8944[/C][C]0.6333[/C][C]0.545[/C][/ROW]
[ROW][C]76[/C][C]1.01[/C][C]1.0781[/C][C]0.9129[/C][C]1.2633[/C][C]0.2354[/C][C]0.8506[/C][C]0.5762[/C][C]0.5762[/C][/ROW]
[ROW][C]77[/C][C]1.01[/C][C]1.0763[/C][C]0.9023[/C][C]1.2725[/C][C]0.2538[/C][C]0.7462[/C][C]0.5647[/C][C]0.5647[/C][/ROW]
[ROW][C]78[/C][C]1.02[/C][C]1.0872[/C][C]0.9035[/C][C]1.2955[/C][C]0.2637[/C][C]0.7661[/C][C]0.6009[/C][C]0.6009[/C][/ROW]
[ROW][C]79[/C][C]1.04[/C][C]1.0925[/C][C]0.9001[/C][C]1.3119[/C][C]0.3196[/C][C]0.7413[/C][C]0.6141[/C][C]0.6141[/C][/ROW]
[ROW][C]80[/C][C]1.03[/C][C]1.0925[/C][C]0.8925[/C][C]1.3219[/C][C]0.2967[/C][C]0.673[/C][C]0.6093[/C][C]0.6093[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4654&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4654&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])
561.06-------
571.08-------
581.09-------
591.04-------
601-------
611.01-------
621.02-------
631.04-------
641.06-------
651.06-------
661.06-------
671.06-------
681.06-------
691.021.05811.00451.11370.08930.47370.22020.4737
700.981.0660.97931.15790.03340.83650.30420.5507
710.991.06590.95851.18140.09890.92750.66990.5399
720.991.06660.94481.19910.12850.87150.83790.539
730.941.05820.92531.2040.0560.82050.74160.4905
740.961.06150.91751.22060.10560.93280.69540.5074
750.981.06990.9151.24230.15320.89440.63330.545
761.011.07810.91291.26330.23540.85060.57620.5762
771.011.07630.90231.27250.25380.74620.56470.5647
781.021.08720.90351.29550.26370.76610.60090.6009
791.041.09250.90011.31190.31960.74130.61410.6141
801.031.09250.89251.32190.29670.6730.60930.6093







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.0268-0.0360.0030.00151e-040.011
700.044-0.08070.00670.00746e-040.0248
710.0553-0.07120.00590.00585e-040.0219
720.0634-0.07180.0060.00595e-040.0221
730.0703-0.11170.00930.0140.00120.0341
740.0765-0.09560.0080.01039e-040.0293
750.0822-0.08410.0070.00817e-040.026
760.0876-0.06320.00530.00464e-040.0197
770.093-0.06160.00510.00444e-040.0191
780.0978-0.06180.00510.00454e-040.0194
790.1025-0.0480.0040.00282e-040.0151
800.1071-0.05720.00480.00393e-040.018

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0268 & -0.036 & 0.003 & 0.0015 & 1e-04 & 0.011 \tabularnewline
70 & 0.044 & -0.0807 & 0.0067 & 0.0074 & 6e-04 & 0.0248 \tabularnewline
71 & 0.0553 & -0.0712 & 0.0059 & 0.0058 & 5e-04 & 0.0219 \tabularnewline
72 & 0.0634 & -0.0718 & 0.006 & 0.0059 & 5e-04 & 0.0221 \tabularnewline
73 & 0.0703 & -0.1117 & 0.0093 & 0.014 & 0.0012 & 0.0341 \tabularnewline
74 & 0.0765 & -0.0956 & 0.008 & 0.0103 & 9e-04 & 0.0293 \tabularnewline
75 & 0.0822 & -0.0841 & 0.007 & 0.0081 & 7e-04 & 0.026 \tabularnewline
76 & 0.0876 & -0.0632 & 0.0053 & 0.0046 & 4e-04 & 0.0197 \tabularnewline
77 & 0.093 & -0.0616 & 0.0051 & 0.0044 & 4e-04 & 0.0191 \tabularnewline
78 & 0.0978 & -0.0618 & 0.0051 & 0.0045 & 4e-04 & 0.0194 \tabularnewline
79 & 0.1025 & -0.048 & 0.004 & 0.0028 & 2e-04 & 0.0151 \tabularnewline
80 & 0.1071 & -0.0572 & 0.0048 & 0.0039 & 3e-04 & 0.018 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4654&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]0.0268[/C][C]-0.036[/C][C]0.003[/C][C]0.0015[/C][C]1e-04[/C][C]0.011[/C][/ROW]
[ROW][C]70[/C][C]0.044[/C][C]-0.0807[/C][C]0.0067[/C][C]0.0074[/C][C]6e-04[/C][C]0.0248[/C][/ROW]
[ROW][C]71[/C][C]0.0553[/C][C]-0.0712[/C][C]0.0059[/C][C]0.0058[/C][C]5e-04[/C][C]0.0219[/C][/ROW]
[ROW][C]72[/C][C]0.0634[/C][C]-0.0718[/C][C]0.006[/C][C]0.0059[/C][C]5e-04[/C][C]0.0221[/C][/ROW]
[ROW][C]73[/C][C]0.0703[/C][C]-0.1117[/C][C]0.0093[/C][C]0.014[/C][C]0.0012[/C][C]0.0341[/C][/ROW]
[ROW][C]74[/C][C]0.0765[/C][C]-0.0956[/C][C]0.008[/C][C]0.0103[/C][C]9e-04[/C][C]0.0293[/C][/ROW]
[ROW][C]75[/C][C]0.0822[/C][C]-0.0841[/C][C]0.007[/C][C]0.0081[/C][C]7e-04[/C][C]0.026[/C][/ROW]
[ROW][C]76[/C][C]0.0876[/C][C]-0.0632[/C][C]0.0053[/C][C]0.0046[/C][C]4e-04[/C][C]0.0197[/C][/ROW]
[ROW][C]77[/C][C]0.093[/C][C]-0.0616[/C][C]0.0051[/C][C]0.0044[/C][C]4e-04[/C][C]0.0191[/C][/ROW]
[ROW][C]78[/C][C]0.0978[/C][C]-0.0618[/C][C]0.0051[/C][C]0.0045[/C][C]4e-04[/C][C]0.0194[/C][/ROW]
[ROW][C]79[/C][C]0.1025[/C][C]-0.048[/C][C]0.004[/C][C]0.0028[/C][C]2e-04[/C][C]0.0151[/C][/ROW]
[ROW][C]80[/C][C]0.1071[/C][C]-0.0572[/C][C]0.0048[/C][C]0.0039[/C][C]3e-04[/C][C]0.018[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4654&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4654&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
690.0268-0.0360.0030.00151e-040.011
700.044-0.08070.00670.00746e-040.0248
710.0553-0.07120.00590.00585e-040.0219
720.0634-0.07180.0060.00595e-040.0221
730.0703-0.11170.00930.0140.00120.0341
740.0765-0.09560.0080.01039e-040.0293
750.0822-0.08410.0070.00817e-040.026
760.0876-0.06320.00530.00464e-040.0197
770.093-0.06160.00510.00444e-040.0191
780.0978-0.06180.00510.00454e-040.0194
790.1025-0.0480.0040.00282e-040.0151
800.1071-0.05720.00480.00393e-040.018



Parameters (Session):
Parameters (R input):
par1 = 12 ; par2 = 0.3 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 2 ; par7 = 1 ; 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)
}
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.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')