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 computationSat, 18 Dec 2010 12:13:53 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/18/t1292674323we2io5o9vkeepdm.htm/, Retrieved Tue, 30 Apr 2024 03:44:54 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=111878, Retrieved Tue, 30 Apr 2024 03:44:54 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact137
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [] [2008-12-08 19:22:39] [d2d412c7f4d35ffbf5ee5ee89db327d4]
- RMP   [Spectral Analysis] [spectrum analyse ...] [2010-12-14 18:46:58] [d6e648f00513dd750579ba7880c5fbf5]
- RMP     [ARIMA Forecasting] [arima forecast] [2010-12-14 19:31:52] [d6e648f00513dd750579ba7880c5fbf5]
- R  D      [ARIMA Forecasting] [] [2010-12-16 10:41:45] [58af523ef9b33032fd2497c80088399b]
F   PD        [ARIMA Forecasting] [] [2010-12-16 19:42:36] [58af523ef9b33032fd2497c80088399b]
-   PD            [ARIMA Forecasting] [] [2010-12-18 12:13:53] [7c1b7ddc8e9000e55b944088fdfb52dc] [Current]
Feedback Forum

Post a new message
Dataseries X:
104.31
103.88
103.88
103.86
103.89
103.98
103.98
104.29
104.29
104.24
103.98
103.54
103.44
103.32
103.3
103.26
103.14
103.11
102.91
103.23
103.23
103.14
102.91
102.42
102.1
102.07
102.06
101.98
101.83
101.75
101.56
101.66
101.65
101.61
101.52
101.31
101.19
101.11
101.1
101.07
100.98
100.93
100.92
101.02
101.01
100.97
100.89
100.62
100.53
100.48
100.48
100.47
100.52
100.49
100.47
100.44




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 9 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111878&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]9 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111878&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111878&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 time9 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[44])
32101.66-------
33101.65-------
34101.61-------
35101.52-------
36101.31-------
37101.19-------
38101.11-------
39101.1-------
40101.07-------
41100.98-------
42100.93-------
43100.92-------
44101.02-------
45101.01101.0523100.905101.19960.28670.666400.6664
46100.97101.0393100.8175101.2610.27020.602100.5676
47100.89100.8999100.6058101.19390.47380.320100.2116
48100.62100.7296100.3744101.08480.27270.1887e-040.0545
49100.53100.7959100.3974101.19440.09550.80650.02630.1351
50100.48100.6845100.2584101.11060.17340.76140.02520.0614
51100.48100.7311100.2852101.1770.13480.86520.05240.102
52100.47100.7988100.3329101.26480.08330.91010.1270.1761
53100.52100.7442100.2517101.23660.18610.86240.17390.1361
54100.49100.6858100.1594101.21220.2330.73150.18160.1067
55100.47100.6419100.0797101.20410.27450.70180.16610.0937
56100.44100.8699100.2781101.46160.07730.90730.30950.3095

\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[44]) \tabularnewline
32 & 101.66 & - & - & - & - & - & - & - \tabularnewline
33 & 101.65 & - & - & - & - & - & - & - \tabularnewline
34 & 101.61 & - & - & - & - & - & - & - \tabularnewline
35 & 101.52 & - & - & - & - & - & - & - \tabularnewline
36 & 101.31 & - & - & - & - & - & - & - \tabularnewline
37 & 101.19 & - & - & - & - & - & - & - \tabularnewline
38 & 101.11 & - & - & - & - & - & - & - \tabularnewline
39 & 101.1 & - & - & - & - & - & - & - \tabularnewline
40 & 101.07 & - & - & - & - & - & - & - \tabularnewline
41 & 100.98 & - & - & - & - & - & - & - \tabularnewline
42 & 100.93 & - & - & - & - & - & - & - \tabularnewline
43 & 100.92 & - & - & - & - & - & - & - \tabularnewline
44 & 101.02 & - & - & - & - & - & - & - \tabularnewline
45 & 101.01 & 101.0523 & 100.905 & 101.1996 & 0.2867 & 0.6664 & 0 & 0.6664 \tabularnewline
46 & 100.97 & 101.0393 & 100.8175 & 101.261 & 0.2702 & 0.6021 & 0 & 0.5676 \tabularnewline
47 & 100.89 & 100.8999 & 100.6058 & 101.1939 & 0.4738 & 0.3201 & 0 & 0.2116 \tabularnewline
48 & 100.62 & 100.7296 & 100.3744 & 101.0848 & 0.2727 & 0.188 & 7e-04 & 0.0545 \tabularnewline
49 & 100.53 & 100.7959 & 100.3974 & 101.1944 & 0.0955 & 0.8065 & 0.0263 & 0.1351 \tabularnewline
50 & 100.48 & 100.6845 & 100.2584 & 101.1106 & 0.1734 & 0.7614 & 0.0252 & 0.0614 \tabularnewline
51 & 100.48 & 100.7311 & 100.2852 & 101.177 & 0.1348 & 0.8652 & 0.0524 & 0.102 \tabularnewline
52 & 100.47 & 100.7988 & 100.3329 & 101.2648 & 0.0833 & 0.9101 & 0.127 & 0.1761 \tabularnewline
53 & 100.52 & 100.7442 & 100.2517 & 101.2366 & 0.1861 & 0.8624 & 0.1739 & 0.1361 \tabularnewline
54 & 100.49 & 100.6858 & 100.1594 & 101.2122 & 0.233 & 0.7315 & 0.1816 & 0.1067 \tabularnewline
55 & 100.47 & 100.6419 & 100.0797 & 101.2041 & 0.2745 & 0.7018 & 0.1661 & 0.0937 \tabularnewline
56 & 100.44 & 100.8699 & 100.2781 & 101.4616 & 0.0773 & 0.9073 & 0.3095 & 0.3095 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111878&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[44])[/C][/ROW]
[ROW][C]32[/C][C]101.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]101.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]101.61[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]101.52[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]101.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]101.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]101.11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]101.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]101.07[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]100.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]100.93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]100.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]101.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]101.01[/C][C]101.0523[/C][C]100.905[/C][C]101.1996[/C][C]0.2867[/C][C]0.6664[/C][C]0[/C][C]0.6664[/C][/ROW]
[ROW][C]46[/C][C]100.97[/C][C]101.0393[/C][C]100.8175[/C][C]101.261[/C][C]0.2702[/C][C]0.6021[/C][C]0[/C][C]0.5676[/C][/ROW]
[ROW][C]47[/C][C]100.89[/C][C]100.8999[/C][C]100.6058[/C][C]101.1939[/C][C]0.4738[/C][C]0.3201[/C][C]0[/C][C]0.2116[/C][/ROW]
[ROW][C]48[/C][C]100.62[/C][C]100.7296[/C][C]100.3744[/C][C]101.0848[/C][C]0.2727[/C][C]0.188[/C][C]7e-04[/C][C]0.0545[/C][/ROW]
[ROW][C]49[/C][C]100.53[/C][C]100.7959[/C][C]100.3974[/C][C]101.1944[/C][C]0.0955[/C][C]0.8065[/C][C]0.0263[/C][C]0.1351[/C][/ROW]
[ROW][C]50[/C][C]100.48[/C][C]100.6845[/C][C]100.2584[/C][C]101.1106[/C][C]0.1734[/C][C]0.7614[/C][C]0.0252[/C][C]0.0614[/C][/ROW]
[ROW][C]51[/C][C]100.48[/C][C]100.7311[/C][C]100.2852[/C][C]101.177[/C][C]0.1348[/C][C]0.8652[/C][C]0.0524[/C][C]0.102[/C][/ROW]
[ROW][C]52[/C][C]100.47[/C][C]100.7988[/C][C]100.3329[/C][C]101.2648[/C][C]0.0833[/C][C]0.9101[/C][C]0.127[/C][C]0.1761[/C][/ROW]
[ROW][C]53[/C][C]100.52[/C][C]100.7442[/C][C]100.2517[/C][C]101.2366[/C][C]0.1861[/C][C]0.8624[/C][C]0.1739[/C][C]0.1361[/C][/ROW]
[ROW][C]54[/C][C]100.49[/C][C]100.6858[/C][C]100.1594[/C][C]101.2122[/C][C]0.233[/C][C]0.7315[/C][C]0.1816[/C][C]0.1067[/C][/ROW]
[ROW][C]55[/C][C]100.47[/C][C]100.6419[/C][C]100.0797[/C][C]101.2041[/C][C]0.2745[/C][C]0.7018[/C][C]0.1661[/C][C]0.0937[/C][/ROW]
[ROW][C]56[/C][C]100.44[/C][C]100.8699[/C][C]100.2781[/C][C]101.4616[/C][C]0.0773[/C][C]0.9073[/C][C]0.3095[/C][C]0.3095[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111878&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111878&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[44])
32101.66-------
33101.65-------
34101.61-------
35101.52-------
36101.31-------
37101.19-------
38101.11-------
39101.1-------
40101.07-------
41100.98-------
42100.93-------
43100.92-------
44101.02-------
45101.01101.0523100.905101.19960.28670.666400.6664
46100.97101.0393100.8175101.2610.27020.602100.5676
47100.89100.8999100.6058101.19390.47380.320100.2116
48100.62100.7296100.3744101.08480.27270.1887e-040.0545
49100.53100.7959100.3974101.19440.09550.80650.02630.1351
50100.48100.6845100.2584101.11060.17340.76140.02520.0614
51100.48100.7311100.2852101.1770.13480.86520.05240.102
52100.47100.7988100.3329101.26480.08330.91010.1270.1761
53100.52100.7442100.2517101.23660.18610.86240.17390.1361
54100.49100.6858100.1594101.21220.2330.73150.18160.1067
55100.47100.6419100.0797101.20410.27450.70180.16610.0937
56100.44100.8699100.2781101.46160.07730.90730.30950.3095







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
457e-04-4e-0400.001800
460.0011-7e-046e-040.00480.00330.0574
470.0015-1e-044e-041e-040.00220.0472
480.0018-0.00116e-040.0120.00470.0684
490.002-0.00260.0010.07070.01790.1337
500.0022-0.0020.00120.04180.02190.1479
510.0023-0.00250.00140.0630.02780.1666
520.0024-0.00330.00160.10810.03780.1944
530.0025-0.00220.00170.05020.03920.1979
540.0027-0.00190.00170.03830.03910.1977
550.0029-0.00170.00170.02950.03820.1955
560.003-0.00430.00190.18480.05040.2246

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
45 & 7e-04 & -4e-04 & 0 & 0.0018 & 0 & 0 \tabularnewline
46 & 0.0011 & -7e-04 & 6e-04 & 0.0048 & 0.0033 & 0.0574 \tabularnewline
47 & 0.0015 & -1e-04 & 4e-04 & 1e-04 & 0.0022 & 0.0472 \tabularnewline
48 & 0.0018 & -0.0011 & 6e-04 & 0.012 & 0.0047 & 0.0684 \tabularnewline
49 & 0.002 & -0.0026 & 0.001 & 0.0707 & 0.0179 & 0.1337 \tabularnewline
50 & 0.0022 & -0.002 & 0.0012 & 0.0418 & 0.0219 & 0.1479 \tabularnewline
51 & 0.0023 & -0.0025 & 0.0014 & 0.063 & 0.0278 & 0.1666 \tabularnewline
52 & 0.0024 & -0.0033 & 0.0016 & 0.1081 & 0.0378 & 0.1944 \tabularnewline
53 & 0.0025 & -0.0022 & 0.0017 & 0.0502 & 0.0392 & 0.1979 \tabularnewline
54 & 0.0027 & -0.0019 & 0.0017 & 0.0383 & 0.0391 & 0.1977 \tabularnewline
55 & 0.0029 & -0.0017 & 0.0017 & 0.0295 & 0.0382 & 0.1955 \tabularnewline
56 & 0.003 & -0.0043 & 0.0019 & 0.1848 & 0.0504 & 0.2246 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111878&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]45[/C][C]7e-04[/C][C]-4e-04[/C][C]0[/C][C]0.0018[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]46[/C][C]0.0011[/C][C]-7e-04[/C][C]6e-04[/C][C]0.0048[/C][C]0.0033[/C][C]0.0574[/C][/ROW]
[ROW][C]47[/C][C]0.0015[/C][C]-1e-04[/C][C]4e-04[/C][C]1e-04[/C][C]0.0022[/C][C]0.0472[/C][/ROW]
[ROW][C]48[/C][C]0.0018[/C][C]-0.0011[/C][C]6e-04[/C][C]0.012[/C][C]0.0047[/C][C]0.0684[/C][/ROW]
[ROW][C]49[/C][C]0.002[/C][C]-0.0026[/C][C]0.001[/C][C]0.0707[/C][C]0.0179[/C][C]0.1337[/C][/ROW]
[ROW][C]50[/C][C]0.0022[/C][C]-0.002[/C][C]0.0012[/C][C]0.0418[/C][C]0.0219[/C][C]0.1479[/C][/ROW]
[ROW][C]51[/C][C]0.0023[/C][C]-0.0025[/C][C]0.0014[/C][C]0.063[/C][C]0.0278[/C][C]0.1666[/C][/ROW]
[ROW][C]52[/C][C]0.0024[/C][C]-0.0033[/C][C]0.0016[/C][C]0.1081[/C][C]0.0378[/C][C]0.1944[/C][/ROW]
[ROW][C]53[/C][C]0.0025[/C][C]-0.0022[/C][C]0.0017[/C][C]0.0502[/C][C]0.0392[/C][C]0.1979[/C][/ROW]
[ROW][C]54[/C][C]0.0027[/C][C]-0.0019[/C][C]0.0017[/C][C]0.0383[/C][C]0.0391[/C][C]0.1977[/C][/ROW]
[ROW][C]55[/C][C]0.0029[/C][C]-0.0017[/C][C]0.0017[/C][C]0.0295[/C][C]0.0382[/C][C]0.1955[/C][/ROW]
[ROW][C]56[/C][C]0.003[/C][C]-0.0043[/C][C]0.0019[/C][C]0.1848[/C][C]0.0504[/C][C]0.2246[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111878&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111878&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
457e-04-4e-0400.001800
460.0011-7e-046e-040.00480.00330.0574
470.0015-1e-044e-041e-040.00220.0472
480.0018-0.00116e-040.0120.00470.0684
490.002-0.00260.0010.07070.01790.1337
500.0022-0.0020.00120.04180.02190.1479
510.0023-0.00250.00140.0630.02780.1666
520.0024-0.00330.00160.10810.03780.1944
530.0025-0.00220.00170.05020.03920.1979
540.0027-0.00190.00170.03830.03910.1977
550.0029-0.00170.00170.02950.03820.1955
560.003-0.00430.00190.18480.05040.2246



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