Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 06 Dec 2007 10:17:39 -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/06/t11969607928n60at4s3p44xkb.htm/, Retrieved Fri, 03 May 2024 04:29:31 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2691, Retrieved Fri, 03 May 2024 04:29:31 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsforecasts, ARIMA, groep 4
Estimated Impact194
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Extrapolation for...] [2007-12-06 17:17:39] [bd7b8d7754bcf95ad80b21f541dc6b78] [Current]
-   PD    [ARIMA Forecasting] [voorspelling] [2007-12-10 20:13:39] [74be16979710d4c4e7c6647856088456]
Feedback Forum

Post a new message
Dataseries X:
88.74
88.92
88.77
89.17
89.61
89.52
89.74
89.40
89.36
89.38
89.36
89.29
89.59
89.79
89.86
90.21
90.37
90.19
90.33
90.22
90.42
90.54
90.73
91.02
91.19
91.53
91.88
92.06
92.32
92.67
92.85
92.82
93.46
93.23
93.54
93.29
93.20
93.60
93.81
94.62
95.22
95.38
95.31
95.30
95.57
95.42
95.53
95.33
95.90
96.06
96.31
96.34
96.49
96.22
96.53
96.50
96.77
96.66
96.58
96.63
97.06
97.73
98.01
97.76
97.49
97.77
97.96
98.23
98.51
98.19
98.37
98.31
98.60
98.97
99.11
99.64
100.03
99.98
100.32
100.44
100.51
101.00
100.88
100.55
100.83
101.51
102.16
102.39
102.54
102.85
103.47
103.57
103.69
103.50
103.47
103.45
103.48
103.93
103.89
104.40
104.79
104.77
105.13
105.26
104.96
104.75
105.01
105.15




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2691&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2691&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2691&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 time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[96])
84100.55-------
85100.83-------
86101.51-------
87102.16-------
88102.39-------
89102.54-------
90102.85-------
91103.47-------
92103.57-------
93103.69-------
94103.5-------
95103.47-------
96103.45-------
97103.48103.6867103.2159104.15740.19480.837810.8378
98103.93104.0323103.3674104.69710.38150.948210.957
99103.89104.2556103.4417105.06960.18930.783510.9738
100104.4104.4808103.5411105.42040.43310.891110.9842
101104.79104.6601103.6096105.71050.40420.686210.988
102104.77104.7311103.5805105.88170.47360.460.99930.9855
103105.13104.965103.7223106.20780.39740.62080.99080.9916
104105.26104.9902103.6617106.31870.34530.41830.98190.9885
105104.96105.1677103.7587106.57680.38630.44890.98010.9916
106104.75105.1337103.6485106.61890.30630.59060.98450.9869
107105.01105.1733103.6157106.7310.41860.70290.9840.9849
108105.15105.1016103.4747106.72850.47680.54390.97670.9767

\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[96]) \tabularnewline
84 & 100.55 & - & - & - & - & - & - & - \tabularnewline
85 & 100.83 & - & - & - & - & - & - & - \tabularnewline
86 & 101.51 & - & - & - & - & - & - & - \tabularnewline
87 & 102.16 & - & - & - & - & - & - & - \tabularnewline
88 & 102.39 & - & - & - & - & - & - & - \tabularnewline
89 & 102.54 & - & - & - & - & - & - & - \tabularnewline
90 & 102.85 & - & - & - & - & - & - & - \tabularnewline
91 & 103.47 & - & - & - & - & - & - & - \tabularnewline
92 & 103.57 & - & - & - & - & - & - & - \tabularnewline
93 & 103.69 & - & - & - & - & - & - & - \tabularnewline
94 & 103.5 & - & - & - & - & - & - & - \tabularnewline
95 & 103.47 & - & - & - & - & - & - & - \tabularnewline
96 & 103.45 & - & - & - & - & - & - & - \tabularnewline
97 & 103.48 & 103.6867 & 103.2159 & 104.1574 & 0.1948 & 0.8378 & 1 & 0.8378 \tabularnewline
98 & 103.93 & 104.0323 & 103.3674 & 104.6971 & 0.3815 & 0.9482 & 1 & 0.957 \tabularnewline
99 & 103.89 & 104.2556 & 103.4417 & 105.0696 & 0.1893 & 0.7835 & 1 & 0.9738 \tabularnewline
100 & 104.4 & 104.4808 & 103.5411 & 105.4204 & 0.4331 & 0.8911 & 1 & 0.9842 \tabularnewline
101 & 104.79 & 104.6601 & 103.6096 & 105.7105 & 0.4042 & 0.6862 & 1 & 0.988 \tabularnewline
102 & 104.77 & 104.7311 & 103.5805 & 105.8817 & 0.4736 & 0.46 & 0.9993 & 0.9855 \tabularnewline
103 & 105.13 & 104.965 & 103.7223 & 106.2078 & 0.3974 & 0.6208 & 0.9908 & 0.9916 \tabularnewline
104 & 105.26 & 104.9902 & 103.6617 & 106.3187 & 0.3453 & 0.4183 & 0.9819 & 0.9885 \tabularnewline
105 & 104.96 & 105.1677 & 103.7587 & 106.5768 & 0.3863 & 0.4489 & 0.9801 & 0.9916 \tabularnewline
106 & 104.75 & 105.1337 & 103.6485 & 106.6189 & 0.3063 & 0.5906 & 0.9845 & 0.9869 \tabularnewline
107 & 105.01 & 105.1733 & 103.6157 & 106.731 & 0.4186 & 0.7029 & 0.984 & 0.9849 \tabularnewline
108 & 105.15 & 105.1016 & 103.4747 & 106.7285 & 0.4768 & 0.5439 & 0.9767 & 0.9767 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2691&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[96])[/C][/ROW]
[ROW][C]84[/C][C]100.55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]100.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]101.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]102.16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]102.39[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]102.54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]102.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]103.47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]103.57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]103.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]103.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]103.47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]103.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]103.48[/C][C]103.6867[/C][C]103.2159[/C][C]104.1574[/C][C]0.1948[/C][C]0.8378[/C][C]1[/C][C]0.8378[/C][/ROW]
[ROW][C]98[/C][C]103.93[/C][C]104.0323[/C][C]103.3674[/C][C]104.6971[/C][C]0.3815[/C][C]0.9482[/C][C]1[/C][C]0.957[/C][/ROW]
[ROW][C]99[/C][C]103.89[/C][C]104.2556[/C][C]103.4417[/C][C]105.0696[/C][C]0.1893[/C][C]0.7835[/C][C]1[/C][C]0.9738[/C][/ROW]
[ROW][C]100[/C][C]104.4[/C][C]104.4808[/C][C]103.5411[/C][C]105.4204[/C][C]0.4331[/C][C]0.8911[/C][C]1[/C][C]0.9842[/C][/ROW]
[ROW][C]101[/C][C]104.79[/C][C]104.6601[/C][C]103.6096[/C][C]105.7105[/C][C]0.4042[/C][C]0.6862[/C][C]1[/C][C]0.988[/C][/ROW]
[ROW][C]102[/C][C]104.77[/C][C]104.7311[/C][C]103.5805[/C][C]105.8817[/C][C]0.4736[/C][C]0.46[/C][C]0.9993[/C][C]0.9855[/C][/ROW]
[ROW][C]103[/C][C]105.13[/C][C]104.965[/C][C]103.7223[/C][C]106.2078[/C][C]0.3974[/C][C]0.6208[/C][C]0.9908[/C][C]0.9916[/C][/ROW]
[ROW][C]104[/C][C]105.26[/C][C]104.9902[/C][C]103.6617[/C][C]106.3187[/C][C]0.3453[/C][C]0.4183[/C][C]0.9819[/C][C]0.9885[/C][/ROW]
[ROW][C]105[/C][C]104.96[/C][C]105.1677[/C][C]103.7587[/C][C]106.5768[/C][C]0.3863[/C][C]0.4489[/C][C]0.9801[/C][C]0.9916[/C][/ROW]
[ROW][C]106[/C][C]104.75[/C][C]105.1337[/C][C]103.6485[/C][C]106.6189[/C][C]0.3063[/C][C]0.5906[/C][C]0.9845[/C][C]0.9869[/C][/ROW]
[ROW][C]107[/C][C]105.01[/C][C]105.1733[/C][C]103.6157[/C][C]106.731[/C][C]0.4186[/C][C]0.7029[/C][C]0.984[/C][C]0.9849[/C][/ROW]
[ROW][C]108[/C][C]105.15[/C][C]105.1016[/C][C]103.4747[/C][C]106.7285[/C][C]0.4768[/C][C]0.5439[/C][C]0.9767[/C][C]0.9767[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2691&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2691&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[96])
84100.55-------
85100.83-------
86101.51-------
87102.16-------
88102.39-------
89102.54-------
90102.85-------
91103.47-------
92103.57-------
93103.69-------
94103.5-------
95103.47-------
96103.45-------
97103.48103.6867103.2159104.15740.19480.837810.8378
98103.93104.0323103.3674104.69710.38150.948210.957
99103.89104.2556103.4417105.06960.18930.783510.9738
100104.4104.4808103.5411105.42040.43310.891110.9842
101104.79104.6601103.6096105.71050.40420.686210.988
102104.77104.7311103.5805105.88170.47360.460.99930.9855
103105.13104.965103.7223106.20780.39740.62080.99080.9916
104105.26104.9902103.6617106.31870.34530.41830.98190.9885
105104.96105.1677103.7587106.57680.38630.44890.98010.9916
106104.75105.1337103.6485106.61890.30630.59060.98450.9869
107105.01105.1733103.6157106.7310.41860.70290.9840.9849
108105.15105.1016103.4747106.72850.47680.54390.97670.9767







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
970.0023-0.0022e-040.04270.00360.0597
980.0033-0.0011e-040.01059e-040.0295
990.004-0.00353e-040.13370.01110.1055
1000.0046-8e-041e-040.00655e-040.0233
1010.00510.00121e-040.01690.00140.0375
1020.00564e-0400.00151e-040.0112
1030.0060.00161e-040.02720.00230.0476
1040.00650.00262e-040.07280.00610.0779
1050.0068-0.0022e-040.04320.00360.06
1060.0072-0.00363e-040.14720.01230.1108
1070.0076-0.00161e-040.02670.00220.0471
1080.00795e-0400.00232e-040.014

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
97 & 0.0023 & -0.002 & 2e-04 & 0.0427 & 0.0036 & 0.0597 \tabularnewline
98 & 0.0033 & -0.001 & 1e-04 & 0.0105 & 9e-04 & 0.0295 \tabularnewline
99 & 0.004 & -0.0035 & 3e-04 & 0.1337 & 0.0111 & 0.1055 \tabularnewline
100 & 0.0046 & -8e-04 & 1e-04 & 0.0065 & 5e-04 & 0.0233 \tabularnewline
101 & 0.0051 & 0.0012 & 1e-04 & 0.0169 & 0.0014 & 0.0375 \tabularnewline
102 & 0.0056 & 4e-04 & 0 & 0.0015 & 1e-04 & 0.0112 \tabularnewline
103 & 0.006 & 0.0016 & 1e-04 & 0.0272 & 0.0023 & 0.0476 \tabularnewline
104 & 0.0065 & 0.0026 & 2e-04 & 0.0728 & 0.0061 & 0.0779 \tabularnewline
105 & 0.0068 & -0.002 & 2e-04 & 0.0432 & 0.0036 & 0.06 \tabularnewline
106 & 0.0072 & -0.0036 & 3e-04 & 0.1472 & 0.0123 & 0.1108 \tabularnewline
107 & 0.0076 & -0.0016 & 1e-04 & 0.0267 & 0.0022 & 0.0471 \tabularnewline
108 & 0.0079 & 5e-04 & 0 & 0.0023 & 2e-04 & 0.014 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2691&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]97[/C][C]0.0023[/C][C]-0.002[/C][C]2e-04[/C][C]0.0427[/C][C]0.0036[/C][C]0.0597[/C][/ROW]
[ROW][C]98[/C][C]0.0033[/C][C]-0.001[/C][C]1e-04[/C][C]0.0105[/C][C]9e-04[/C][C]0.0295[/C][/ROW]
[ROW][C]99[/C][C]0.004[/C][C]-0.0035[/C][C]3e-04[/C][C]0.1337[/C][C]0.0111[/C][C]0.1055[/C][/ROW]
[ROW][C]100[/C][C]0.0046[/C][C]-8e-04[/C][C]1e-04[/C][C]0.0065[/C][C]5e-04[/C][C]0.0233[/C][/ROW]
[ROW][C]101[/C][C]0.0051[/C][C]0.0012[/C][C]1e-04[/C][C]0.0169[/C][C]0.0014[/C][C]0.0375[/C][/ROW]
[ROW][C]102[/C][C]0.0056[/C][C]4e-04[/C][C]0[/C][C]0.0015[/C][C]1e-04[/C][C]0.0112[/C][/ROW]
[ROW][C]103[/C][C]0.006[/C][C]0.0016[/C][C]1e-04[/C][C]0.0272[/C][C]0.0023[/C][C]0.0476[/C][/ROW]
[ROW][C]104[/C][C]0.0065[/C][C]0.0026[/C][C]2e-04[/C][C]0.0728[/C][C]0.0061[/C][C]0.0779[/C][/ROW]
[ROW][C]105[/C][C]0.0068[/C][C]-0.002[/C][C]2e-04[/C][C]0.0432[/C][C]0.0036[/C][C]0.06[/C][/ROW]
[ROW][C]106[/C][C]0.0072[/C][C]-0.0036[/C][C]3e-04[/C][C]0.1472[/C][C]0.0123[/C][C]0.1108[/C][/ROW]
[ROW][C]107[/C][C]0.0076[/C][C]-0.0016[/C][C]1e-04[/C][C]0.0267[/C][C]0.0022[/C][C]0.0471[/C][/ROW]
[ROW][C]108[/C][C]0.0079[/C][C]5e-04[/C][C]0[/C][C]0.0023[/C][C]2e-04[/C][C]0.014[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2691&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2691&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
970.0023-0.0022e-040.04270.00360.0597
980.0033-0.0011e-040.01059e-040.0295
990.004-0.00353e-040.13370.01110.1055
1000.0046-8e-041e-040.00655e-040.0233
1010.00510.00121e-040.01690.00140.0375
1020.00564e-0400.00151e-040.0112
1030.0060.00161e-040.02720.00230.0476
1040.00650.00262e-040.07280.00610.0779
1050.0068-0.0022e-040.04320.00360.06
1060.0072-0.00363e-040.14720.01230.1108
1070.0076-0.00161e-040.02670.00220.0471
1080.00795e-0400.00232e-040.014



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