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 computationWed, 22 Dec 2010 19:40:54 +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/22/t1293046730wfklaxzmq29yknk.htm/, Retrieved Mon, 06 May 2024 09:00:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114534, Retrieved Mon, 06 May 2024 09:00:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact107
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2010-12-22 15:29:06] [afd301b68d203992295e6972aed62880]
-   P     [ARIMA Forecasting] [] [2010-12-22 19:40:54] [5a59313293e5c9f616ad36f6edd018c5] [Current]
Feedback Forum

Post a new message
Dataseries X:
9.769
9.321
9.939
9.336
10.195
9.464
10.010
10.213
9.563
9.890
9.305
9.391
9.928
8.686
9.843
9.627
10.074
9.503
10.119
10.000
9.313
9.866
9.172
9.241
9.659
8.904
9.755
9.080
9.435
8.971
10.063
9.793
9.454
9.759
8.820
9.403
9.676
8.642
9.402
9.610
9.294
9.448
10.319
9.548
9.801
9.596
8.923
9.746
9.829
9.125
9.782
9.441
9.162
9.915
10.444
10.209
9.985
9.842
9.429
10.132
9.849
9.172
10.313
9.819
9.955
10.048
10.082
10.541
10.208
10.233
9.439
9.963
10.158
9.225
10.474
9.757
10.490
10.281
10.444
10.640
10.695
10.786
9.832
9.747
10.411
9.511
10.402
9.701
10.540
10.112
10.915
11.183
10.384
10.834
9.886
10.216




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 3 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114534&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114534&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114534&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 time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[84])
729.963-------
7310.158-------
749.225-------
7510.474-------
769.757-------
7710.49-------
7810.281-------
7910.444-------
8010.64-------
8110.695-------
8210.786-------
839.832-------
849.747-------
8510.41110.34779.787810.97170.42120.97040.72430.9704
869.5119.42558.94929.95250.37521e-040.77210.1159
8710.40210.55419.960111.21930.3270.99890.59330.9913
889.7019.94569.407810.54490.21190.06780.73130.742
8910.5410.49859.89811.17210.45190.98980.50980.9856
9010.11210.27779.694910.93090.30950.21570.49610.9444
9110.91510.664710.034911.37410.24460.93660.7290.9944
9211.18310.732910.090111.45820.11190.31130.59910.9961
9310.38410.57719.946311.28860.29730.04760.37270.9889
9410.83410.7110.059311.44560.37060.80750.41980.9949
959.8869.83179.27210.45920.43269e-040.49960.6043
9610.2169.97399.395110.62460.23290.60450.75290.7529

\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[84]) \tabularnewline
72 & 9.963 & - & - & - & - & - & - & - \tabularnewline
73 & 10.158 & - & - & - & - & - & - & - \tabularnewline
74 & 9.225 & - & - & - & - & - & - & - \tabularnewline
75 & 10.474 & - & - & - & - & - & - & - \tabularnewline
76 & 9.757 & - & - & - & - & - & - & - \tabularnewline
77 & 10.49 & - & - & - & - & - & - & - \tabularnewline
78 & 10.281 & - & - & - & - & - & - & - \tabularnewline
79 & 10.444 & - & - & - & - & - & - & - \tabularnewline
80 & 10.64 & - & - & - & - & - & - & - \tabularnewline
81 & 10.695 & - & - & - & - & - & - & - \tabularnewline
82 & 10.786 & - & - & - & - & - & - & - \tabularnewline
83 & 9.832 & - & - & - & - & - & - & - \tabularnewline
84 & 9.747 & - & - & - & - & - & - & - \tabularnewline
85 & 10.411 & 10.3477 & 9.7878 & 10.9717 & 0.4212 & 0.9704 & 0.7243 & 0.9704 \tabularnewline
86 & 9.511 & 9.4255 & 8.9492 & 9.9525 & 0.3752 & 1e-04 & 0.7721 & 0.1159 \tabularnewline
87 & 10.402 & 10.5541 & 9.9601 & 11.2193 & 0.327 & 0.9989 & 0.5933 & 0.9913 \tabularnewline
88 & 9.701 & 9.9456 & 9.4078 & 10.5449 & 0.2119 & 0.0678 & 0.7313 & 0.742 \tabularnewline
89 & 10.54 & 10.4985 & 9.898 & 11.1721 & 0.4519 & 0.9898 & 0.5098 & 0.9856 \tabularnewline
90 & 10.112 & 10.2777 & 9.6949 & 10.9309 & 0.3095 & 0.2157 & 0.4961 & 0.9444 \tabularnewline
91 & 10.915 & 10.6647 & 10.0349 & 11.3741 & 0.2446 & 0.9366 & 0.729 & 0.9944 \tabularnewline
92 & 11.183 & 10.7329 & 10.0901 & 11.4582 & 0.1119 & 0.3113 & 0.5991 & 0.9961 \tabularnewline
93 & 10.384 & 10.5771 & 9.9463 & 11.2886 & 0.2973 & 0.0476 & 0.3727 & 0.9889 \tabularnewline
94 & 10.834 & 10.71 & 10.0593 & 11.4456 & 0.3706 & 0.8075 & 0.4198 & 0.9949 \tabularnewline
95 & 9.886 & 9.8317 & 9.272 & 10.4592 & 0.4326 & 9e-04 & 0.4996 & 0.6043 \tabularnewline
96 & 10.216 & 9.9739 & 9.3951 & 10.6246 & 0.2329 & 0.6045 & 0.7529 & 0.7529 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114534&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[84])[/C][/ROW]
[ROW][C]72[/C][C]9.963[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]10.158[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]9.225[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]10.474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]9.757[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]10.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]10.281[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]10.444[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]10.64[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]10.695[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]10.786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]9.832[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]9.747[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]10.411[/C][C]10.3477[/C][C]9.7878[/C][C]10.9717[/C][C]0.4212[/C][C]0.9704[/C][C]0.7243[/C][C]0.9704[/C][/ROW]
[ROW][C]86[/C][C]9.511[/C][C]9.4255[/C][C]8.9492[/C][C]9.9525[/C][C]0.3752[/C][C]1e-04[/C][C]0.7721[/C][C]0.1159[/C][/ROW]
[ROW][C]87[/C][C]10.402[/C][C]10.5541[/C][C]9.9601[/C][C]11.2193[/C][C]0.327[/C][C]0.9989[/C][C]0.5933[/C][C]0.9913[/C][/ROW]
[ROW][C]88[/C][C]9.701[/C][C]9.9456[/C][C]9.4078[/C][C]10.5449[/C][C]0.2119[/C][C]0.0678[/C][C]0.7313[/C][C]0.742[/C][/ROW]
[ROW][C]89[/C][C]10.54[/C][C]10.4985[/C][C]9.898[/C][C]11.1721[/C][C]0.4519[/C][C]0.9898[/C][C]0.5098[/C][C]0.9856[/C][/ROW]
[ROW][C]90[/C][C]10.112[/C][C]10.2777[/C][C]9.6949[/C][C]10.9309[/C][C]0.3095[/C][C]0.2157[/C][C]0.4961[/C][C]0.9444[/C][/ROW]
[ROW][C]91[/C][C]10.915[/C][C]10.6647[/C][C]10.0349[/C][C]11.3741[/C][C]0.2446[/C][C]0.9366[/C][C]0.729[/C][C]0.9944[/C][/ROW]
[ROW][C]92[/C][C]11.183[/C][C]10.7329[/C][C]10.0901[/C][C]11.4582[/C][C]0.1119[/C][C]0.3113[/C][C]0.5991[/C][C]0.9961[/C][/ROW]
[ROW][C]93[/C][C]10.384[/C][C]10.5771[/C][C]9.9463[/C][C]11.2886[/C][C]0.2973[/C][C]0.0476[/C][C]0.3727[/C][C]0.9889[/C][/ROW]
[ROW][C]94[/C][C]10.834[/C][C]10.71[/C][C]10.0593[/C][C]11.4456[/C][C]0.3706[/C][C]0.8075[/C][C]0.4198[/C][C]0.9949[/C][/ROW]
[ROW][C]95[/C][C]9.886[/C][C]9.8317[/C][C]9.272[/C][C]10.4592[/C][C]0.4326[/C][C]9e-04[/C][C]0.4996[/C][C]0.6043[/C][/ROW]
[ROW][C]96[/C][C]10.216[/C][C]9.9739[/C][C]9.3951[/C][C]10.6246[/C][C]0.2329[/C][C]0.6045[/C][C]0.7529[/C][C]0.7529[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114534&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114534&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[84])
729.963-------
7310.158-------
749.225-------
7510.474-------
769.757-------
7710.49-------
7810.281-------
7910.444-------
8010.64-------
8110.695-------
8210.786-------
839.832-------
849.747-------
8510.41110.34779.787810.97170.42120.97040.72430.9704
869.5119.42558.94929.95250.37521e-040.77210.1159
8710.40210.55419.960111.21930.3270.99890.59330.9913
889.7019.94569.407810.54490.21190.06780.73130.742
8910.5410.49859.89811.17210.45190.98980.50980.9856
9010.11210.27779.694910.93090.30950.21570.49610.9444
9110.91510.664710.034911.37410.24460.93660.7290.9944
9211.18310.732910.090111.45820.11190.31130.59910.9961
9310.38410.57719.946311.28860.29730.04760.37270.9889
9410.83410.7110.059311.44560.37060.80750.41980.9949
959.8869.83179.27210.45920.43269e-040.49960.6043
9610.2169.97399.395110.62460.23290.60450.75290.7529







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.03080.006100.00400
860.02850.00910.00760.00730.00570.0752
870.0322-0.01440.00990.02310.01150.1072
880.0307-0.02460.01350.05980.02360.1535
890.03270.0040.01160.00170.01920.1386
900.0324-0.01610.01240.02750.02060.1435
910.03390.02350.0140.06270.02660.1631
920.03450.04190.01750.20260.04860.2204
930.0343-0.01830.01750.03730.04730.2176
940.0350.01160.0170.01540.04410.2101
950.03260.00550.01590.0030.04040.201
960.03330.02430.01660.05860.04190.2047

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0308 & 0.0061 & 0 & 0.004 & 0 & 0 \tabularnewline
86 & 0.0285 & 0.0091 & 0.0076 & 0.0073 & 0.0057 & 0.0752 \tabularnewline
87 & 0.0322 & -0.0144 & 0.0099 & 0.0231 & 0.0115 & 0.1072 \tabularnewline
88 & 0.0307 & -0.0246 & 0.0135 & 0.0598 & 0.0236 & 0.1535 \tabularnewline
89 & 0.0327 & 0.004 & 0.0116 & 0.0017 & 0.0192 & 0.1386 \tabularnewline
90 & 0.0324 & -0.0161 & 0.0124 & 0.0275 & 0.0206 & 0.1435 \tabularnewline
91 & 0.0339 & 0.0235 & 0.014 & 0.0627 & 0.0266 & 0.1631 \tabularnewline
92 & 0.0345 & 0.0419 & 0.0175 & 0.2026 & 0.0486 & 0.2204 \tabularnewline
93 & 0.0343 & -0.0183 & 0.0175 & 0.0373 & 0.0473 & 0.2176 \tabularnewline
94 & 0.035 & 0.0116 & 0.017 & 0.0154 & 0.0441 & 0.2101 \tabularnewline
95 & 0.0326 & 0.0055 & 0.0159 & 0.003 & 0.0404 & 0.201 \tabularnewline
96 & 0.0333 & 0.0243 & 0.0166 & 0.0586 & 0.0419 & 0.2047 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114534&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]85[/C][C]0.0308[/C][C]0.0061[/C][C]0[/C][C]0.004[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]0.0285[/C][C]0.0091[/C][C]0.0076[/C][C]0.0073[/C][C]0.0057[/C][C]0.0752[/C][/ROW]
[ROW][C]87[/C][C]0.0322[/C][C]-0.0144[/C][C]0.0099[/C][C]0.0231[/C][C]0.0115[/C][C]0.1072[/C][/ROW]
[ROW][C]88[/C][C]0.0307[/C][C]-0.0246[/C][C]0.0135[/C][C]0.0598[/C][C]0.0236[/C][C]0.1535[/C][/ROW]
[ROW][C]89[/C][C]0.0327[/C][C]0.004[/C][C]0.0116[/C][C]0.0017[/C][C]0.0192[/C][C]0.1386[/C][/ROW]
[ROW][C]90[/C][C]0.0324[/C][C]-0.0161[/C][C]0.0124[/C][C]0.0275[/C][C]0.0206[/C][C]0.1435[/C][/ROW]
[ROW][C]91[/C][C]0.0339[/C][C]0.0235[/C][C]0.014[/C][C]0.0627[/C][C]0.0266[/C][C]0.1631[/C][/ROW]
[ROW][C]92[/C][C]0.0345[/C][C]0.0419[/C][C]0.0175[/C][C]0.2026[/C][C]0.0486[/C][C]0.2204[/C][/ROW]
[ROW][C]93[/C][C]0.0343[/C][C]-0.0183[/C][C]0.0175[/C][C]0.0373[/C][C]0.0473[/C][C]0.2176[/C][/ROW]
[ROW][C]94[/C][C]0.035[/C][C]0.0116[/C][C]0.017[/C][C]0.0154[/C][C]0.0441[/C][C]0.2101[/C][/ROW]
[ROW][C]95[/C][C]0.0326[/C][C]0.0055[/C][C]0.0159[/C][C]0.003[/C][C]0.0404[/C][C]0.201[/C][/ROW]
[ROW][C]96[/C][C]0.0333[/C][C]0.0243[/C][C]0.0166[/C][C]0.0586[/C][C]0.0419[/C][C]0.2047[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114534&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114534&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
850.03080.006100.00400
860.02850.00910.00760.00730.00570.0752
870.0322-0.01440.00990.02310.01150.1072
880.0307-0.02460.01350.05980.02360.1535
890.03270.0040.01160.00170.01920.1386
900.0324-0.01610.01240.02750.02060.1435
910.03390.02350.0140.06270.02660.1631
920.03450.04190.01750.20260.04860.2204
930.0343-0.01830.01750.03730.04730.2176
940.0350.01160.0170.01540.04410.2101
950.03260.00550.01590.0030.04040.201
960.03330.02430.01660.05860.04190.2047



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