Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 18 Dec 2007 02:55:07 -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/18/t11979706856ihipqeuwu03ef5.htm/, Retrieved Sat, 04 May 2024 08:19:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4470, Retrieved Sat, 04 May 2024 08:19:05 +0000
QR Codes:

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

Post a new message
Dataseries X:
103.1
103.1
103.3
103.5
103.3
103.5
103.8
103.9
103.9
104.2
104.6
104.9
105.2
105.2
105.6
105.6
106.2
106.3
106.4
106.9
107.2
107.3
107.3
107.4
107.55
107.87
108.37
108.38
107.92
108.03
108.14
108.3
108.64
108.66
109.04
109.03
109.03
109.54
109.75
109.83
109.65
109.82
109.95
110.12
110.15
110.2
109.99
110.14
110.14
110.81
110.97
110.99
109.73
109.81
110.02
110.18
110.21
110.25
110.36
110.51
110.64
110.95
111.18
111.19
111.69
111.7
111.83
111.77
111.73
112.01
111.86
112.04




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=4470&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=4470&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4470&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[60])
48110.14-------
49110.14-------
50110.81-------
51110.97-------
52110.99-------
53109.73-------
54109.81-------
55110.02-------
56110.18-------
57110.21-------
58110.25-------
59110.36-------
60110.51-------
61110.64110.5207110.1144110.92710.28260.52060.96680.5206
62110.95110.9332110.3646111.50180.47690.84390.66440.9277
63111.18111.0133110.3194111.70720.31890.5710.54870.9224
64111.19111.0075110.2077111.80730.32730.33620.51710.8886
65111.69110.7118109.8186111.6050.01590.1470.98440.6711
66111.7110.7688109.791111.74650.0310.03240.97270.698
67111.83110.8578109.8022111.91330.03550.05890.94010.7408
68111.77111.1109.972112.2280.12220.10230.9450.8474
69111.73111.1117109.9156112.30770.15550.14030.93020.8379
70112.01111.1167109.8563112.37720.08240.17010.91110.8273
71111.86110.8819109.5602112.20360.07350.04720.78050.7093
72112.04110.9897109.6094112.370.06790.10830.75210.7521

\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[60]) \tabularnewline
48 & 110.14 & - & - & - & - & - & - & - \tabularnewline
49 & 110.14 & - & - & - & - & - & - & - \tabularnewline
50 & 110.81 & - & - & - & - & - & - & - \tabularnewline
51 & 110.97 & - & - & - & - & - & - & - \tabularnewline
52 & 110.99 & - & - & - & - & - & - & - \tabularnewline
53 & 109.73 & - & - & - & - & - & - & - \tabularnewline
54 & 109.81 & - & - & - & - & - & - & - \tabularnewline
55 & 110.02 & - & - & - & - & - & - & - \tabularnewline
56 & 110.18 & - & - & - & - & - & - & - \tabularnewline
57 & 110.21 & - & - & - & - & - & - & - \tabularnewline
58 & 110.25 & - & - & - & - & - & - & - \tabularnewline
59 & 110.36 & - & - & - & - & - & - & - \tabularnewline
60 & 110.51 & - & - & - & - & - & - & - \tabularnewline
61 & 110.64 & 110.5207 & 110.1144 & 110.9271 & 0.2826 & 0.5206 & 0.9668 & 0.5206 \tabularnewline
62 & 110.95 & 110.9332 & 110.3646 & 111.5018 & 0.4769 & 0.8439 & 0.6644 & 0.9277 \tabularnewline
63 & 111.18 & 111.0133 & 110.3194 & 111.7072 & 0.3189 & 0.571 & 0.5487 & 0.9224 \tabularnewline
64 & 111.19 & 111.0075 & 110.2077 & 111.8073 & 0.3273 & 0.3362 & 0.5171 & 0.8886 \tabularnewline
65 & 111.69 & 110.7118 & 109.8186 & 111.605 & 0.0159 & 0.147 & 0.9844 & 0.6711 \tabularnewline
66 & 111.7 & 110.7688 & 109.791 & 111.7465 & 0.031 & 0.0324 & 0.9727 & 0.698 \tabularnewline
67 & 111.83 & 110.8578 & 109.8022 & 111.9133 & 0.0355 & 0.0589 & 0.9401 & 0.7408 \tabularnewline
68 & 111.77 & 111.1 & 109.972 & 112.228 & 0.1222 & 0.1023 & 0.945 & 0.8474 \tabularnewline
69 & 111.73 & 111.1117 & 109.9156 & 112.3077 & 0.1555 & 0.1403 & 0.9302 & 0.8379 \tabularnewline
70 & 112.01 & 111.1167 & 109.8563 & 112.3772 & 0.0824 & 0.1701 & 0.9111 & 0.8273 \tabularnewline
71 & 111.86 & 110.8819 & 109.5602 & 112.2036 & 0.0735 & 0.0472 & 0.7805 & 0.7093 \tabularnewline
72 & 112.04 & 110.9897 & 109.6094 & 112.37 & 0.0679 & 0.1083 & 0.7521 & 0.7521 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4470&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[60])[/C][/ROW]
[ROW][C]48[/C][C]110.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]110.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]110.81[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]110.97[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]110.99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]109.73[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]109.81[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]110.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]110.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]110.21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]110.25[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]110.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]110.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]110.64[/C][C]110.5207[/C][C]110.1144[/C][C]110.9271[/C][C]0.2826[/C][C]0.5206[/C][C]0.9668[/C][C]0.5206[/C][/ROW]
[ROW][C]62[/C][C]110.95[/C][C]110.9332[/C][C]110.3646[/C][C]111.5018[/C][C]0.4769[/C][C]0.8439[/C][C]0.6644[/C][C]0.9277[/C][/ROW]
[ROW][C]63[/C][C]111.18[/C][C]111.0133[/C][C]110.3194[/C][C]111.7072[/C][C]0.3189[/C][C]0.571[/C][C]0.5487[/C][C]0.9224[/C][/ROW]
[ROW][C]64[/C][C]111.19[/C][C]111.0075[/C][C]110.2077[/C][C]111.8073[/C][C]0.3273[/C][C]0.3362[/C][C]0.5171[/C][C]0.8886[/C][/ROW]
[ROW][C]65[/C][C]111.69[/C][C]110.7118[/C][C]109.8186[/C][C]111.605[/C][C]0.0159[/C][C]0.147[/C][C]0.9844[/C][C]0.6711[/C][/ROW]
[ROW][C]66[/C][C]111.7[/C][C]110.7688[/C][C]109.791[/C][C]111.7465[/C][C]0.031[/C][C]0.0324[/C][C]0.9727[/C][C]0.698[/C][/ROW]
[ROW][C]67[/C][C]111.83[/C][C]110.8578[/C][C]109.8022[/C][C]111.9133[/C][C]0.0355[/C][C]0.0589[/C][C]0.9401[/C][C]0.7408[/C][/ROW]
[ROW][C]68[/C][C]111.77[/C][C]111.1[/C][C]109.972[/C][C]112.228[/C][C]0.1222[/C][C]0.1023[/C][C]0.945[/C][C]0.8474[/C][/ROW]
[ROW][C]69[/C][C]111.73[/C][C]111.1117[/C][C]109.9156[/C][C]112.3077[/C][C]0.1555[/C][C]0.1403[/C][C]0.9302[/C][C]0.8379[/C][/ROW]
[ROW][C]70[/C][C]112.01[/C][C]111.1167[/C][C]109.8563[/C][C]112.3772[/C][C]0.0824[/C][C]0.1701[/C][C]0.9111[/C][C]0.8273[/C][/ROW]
[ROW][C]71[/C][C]111.86[/C][C]110.8819[/C][C]109.5602[/C][C]112.2036[/C][C]0.0735[/C][C]0.0472[/C][C]0.7805[/C][C]0.7093[/C][/ROW]
[ROW][C]72[/C][C]112.04[/C][C]110.9897[/C][C]109.6094[/C][C]112.37[/C][C]0.0679[/C][C]0.1083[/C][C]0.7521[/C][C]0.7521[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4470&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4470&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[60])
48110.14-------
49110.14-------
50110.81-------
51110.97-------
52110.99-------
53109.73-------
54109.81-------
55110.02-------
56110.18-------
57110.21-------
58110.25-------
59110.36-------
60110.51-------
61110.64110.5207110.1144110.92710.28260.52060.96680.5206
62110.95110.9332110.3646111.50180.47690.84390.66440.9277
63111.18111.0133110.3194111.70720.31890.5710.54870.9224
64111.19111.0075110.2077111.80730.32730.33620.51710.8886
65111.69110.7118109.8186111.6050.01590.1470.98440.6711
66111.7110.7688109.791111.74650.0310.03240.97270.698
67111.83110.8578109.8022111.91330.03550.05890.94010.7408
68111.77111.1109.972112.2280.12220.10230.9450.8474
69111.73111.1117109.9156112.30770.15550.14030.93020.8379
70112.01111.1167109.8563112.37720.08240.17010.91110.8273
71111.86110.8819109.5602112.20360.07350.04720.78050.7093
72112.04110.9897109.6094112.370.06790.10830.75210.7521







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.00190.00111e-040.01420.00120.0344
620.00262e-0403e-0400.0049
630.00320.00151e-040.02780.00230.0481
640.00370.00161e-040.03330.00280.0527
650.00410.00887e-040.95680.07970.2824
660.00450.00847e-040.86720.07230.2688
670.00490.00887e-040.94520.07880.2807
680.00520.0065e-040.44890.03740.1934
690.00550.00565e-040.38230.03190.1785
700.00580.0087e-040.79790.06650.2579
710.00610.00887e-040.95670.07970.2824
720.00630.00958e-041.10310.09190.3032

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0019 & 0.0011 & 1e-04 & 0.0142 & 0.0012 & 0.0344 \tabularnewline
62 & 0.0026 & 2e-04 & 0 & 3e-04 & 0 & 0.0049 \tabularnewline
63 & 0.0032 & 0.0015 & 1e-04 & 0.0278 & 0.0023 & 0.0481 \tabularnewline
64 & 0.0037 & 0.0016 & 1e-04 & 0.0333 & 0.0028 & 0.0527 \tabularnewline
65 & 0.0041 & 0.0088 & 7e-04 & 0.9568 & 0.0797 & 0.2824 \tabularnewline
66 & 0.0045 & 0.0084 & 7e-04 & 0.8672 & 0.0723 & 0.2688 \tabularnewline
67 & 0.0049 & 0.0088 & 7e-04 & 0.9452 & 0.0788 & 0.2807 \tabularnewline
68 & 0.0052 & 0.006 & 5e-04 & 0.4489 & 0.0374 & 0.1934 \tabularnewline
69 & 0.0055 & 0.0056 & 5e-04 & 0.3823 & 0.0319 & 0.1785 \tabularnewline
70 & 0.0058 & 0.008 & 7e-04 & 0.7979 & 0.0665 & 0.2579 \tabularnewline
71 & 0.0061 & 0.0088 & 7e-04 & 0.9567 & 0.0797 & 0.2824 \tabularnewline
72 & 0.0063 & 0.0095 & 8e-04 & 1.1031 & 0.0919 & 0.3032 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4470&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]61[/C][C]0.0019[/C][C]0.0011[/C][C]1e-04[/C][C]0.0142[/C][C]0.0012[/C][C]0.0344[/C][/ROW]
[ROW][C]62[/C][C]0.0026[/C][C]2e-04[/C][C]0[/C][C]3e-04[/C][C]0[/C][C]0.0049[/C][/ROW]
[ROW][C]63[/C][C]0.0032[/C][C]0.0015[/C][C]1e-04[/C][C]0.0278[/C][C]0.0023[/C][C]0.0481[/C][/ROW]
[ROW][C]64[/C][C]0.0037[/C][C]0.0016[/C][C]1e-04[/C][C]0.0333[/C][C]0.0028[/C][C]0.0527[/C][/ROW]
[ROW][C]65[/C][C]0.0041[/C][C]0.0088[/C][C]7e-04[/C][C]0.9568[/C][C]0.0797[/C][C]0.2824[/C][/ROW]
[ROW][C]66[/C][C]0.0045[/C][C]0.0084[/C][C]7e-04[/C][C]0.8672[/C][C]0.0723[/C][C]0.2688[/C][/ROW]
[ROW][C]67[/C][C]0.0049[/C][C]0.0088[/C][C]7e-04[/C][C]0.9452[/C][C]0.0788[/C][C]0.2807[/C][/ROW]
[ROW][C]68[/C][C]0.0052[/C][C]0.006[/C][C]5e-04[/C][C]0.4489[/C][C]0.0374[/C][C]0.1934[/C][/ROW]
[ROW][C]69[/C][C]0.0055[/C][C]0.0056[/C][C]5e-04[/C][C]0.3823[/C][C]0.0319[/C][C]0.1785[/C][/ROW]
[ROW][C]70[/C][C]0.0058[/C][C]0.008[/C][C]7e-04[/C][C]0.7979[/C][C]0.0665[/C][C]0.2579[/C][/ROW]
[ROW][C]71[/C][C]0.0061[/C][C]0.0088[/C][C]7e-04[/C][C]0.9567[/C][C]0.0797[/C][C]0.2824[/C][/ROW]
[ROW][C]72[/C][C]0.0063[/C][C]0.0095[/C][C]8e-04[/C][C]1.1031[/C][C]0.0919[/C][C]0.3032[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4470&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4470&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
610.00190.00111e-040.01420.00120.0344
620.00262e-0403e-0400.0049
630.00320.00151e-040.02780.00230.0481
640.00370.00161e-040.03330.00280.0527
650.00410.00887e-040.95680.07970.2824
660.00450.00847e-040.86720.07230.2688
670.00490.00887e-040.94520.07880.2807
680.00520.0065e-040.44890.03740.1934
690.00550.00565e-040.38230.03190.1785
700.00580.0087e-040.79790.06650.2579
710.00610.00887e-040.95670.07970.2824
720.00630.00958e-041.10310.09190.3032



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