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 computationSun, 26 Dec 2010 11:12:12 +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/26/t1293361795wm177n6av35tfd0.htm/, Retrieved Mon, 06 May 2024 22:44:51 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115518, Retrieved Mon, 06 May 2024 22:44:51 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact129
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [tijdreeks bevolki...] [2010-12-26 11:12:12] [531024149246456e4f6d79ace2e85c12] [Current]
Feedback Forum

Post a new message
Dataseries X:
5140
4749
3635
4305
5805
4260
3869
7325
9280
6222
3272
7598
1345
1900
1480
1472
3823
4454
3357
5393
8329
4152
4042
7747
1451
911
-406
1387
2150
1577
2642
4273
8064
3243
1112
2280
505
744
-1369
-531
1041
2076
577
5080
6584
3761
294
5020
1141
3805
2127
2531
3682
3263
2798
5936
10568
5296
1870
4390
3707
5201
3748
5282
5349
6249
5517
8640
15767
8850
5582
6496
3255
6189
6452
5099
6833
7046
7739
10142
16054
7721
6182
6490
3704
6235
4655
5072
3640
5147
5703
11889
15603
9589




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115518&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 time2 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[82])
708850-------
715582-------
726496-------
733255-------
746189-------
756452-------
765099-------
776833-------
787046-------
797739-------
8010142-------
8116054-------
827721-------
8361825790.70583219.9558361.45660.38270.07060.56320.0706
8464907524.45784675.061710373.85380.23840.82210.76040.4462
8537045437.61492334.20198541.02790.13680.25310.9160.0746
8662357367.77024210.742210524.79820.24090.98850.76790.4132
8746556889.7823576.752410202.81150.09310.65080.60220.3114
8850726446.63042986.84349906.41730.21810.84490.77740.2352
8936407814.1064165.556611462.65530.01250.92960.70090.5199
9051478134.62164344.104211925.13890.06120.98990.71320.5847
9157038287.27744358.318212216.23660.09870.94140.60780.6112
921188910986.03216933.167315038.89680.33120.99470.65840.9428
931560316786.318812603.731120968.90650.28960.98910.63431
9495899479.55915171.937713787.18040.48010.00270.78820.7882

\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[82]) \tabularnewline
70 & 8850 & - & - & - & - & - & - & - \tabularnewline
71 & 5582 & - & - & - & - & - & - & - \tabularnewline
72 & 6496 & - & - & - & - & - & - & - \tabularnewline
73 & 3255 & - & - & - & - & - & - & - \tabularnewline
74 & 6189 & - & - & - & - & - & - & - \tabularnewline
75 & 6452 & - & - & - & - & - & - & - \tabularnewline
76 & 5099 & - & - & - & - & - & - & - \tabularnewline
77 & 6833 & - & - & - & - & - & - & - \tabularnewline
78 & 7046 & - & - & - & - & - & - & - \tabularnewline
79 & 7739 & - & - & - & - & - & - & - \tabularnewline
80 & 10142 & - & - & - & - & - & - & - \tabularnewline
81 & 16054 & - & - & - & - & - & - & - \tabularnewline
82 & 7721 & - & - & - & - & - & - & - \tabularnewline
83 & 6182 & 5790.7058 & 3219.955 & 8361.4566 & 0.3827 & 0.0706 & 0.5632 & 0.0706 \tabularnewline
84 & 6490 & 7524.4578 & 4675.0617 & 10373.8538 & 0.2384 & 0.8221 & 0.7604 & 0.4462 \tabularnewline
85 & 3704 & 5437.6149 & 2334.2019 & 8541.0279 & 0.1368 & 0.2531 & 0.916 & 0.0746 \tabularnewline
86 & 6235 & 7367.7702 & 4210.7422 & 10524.7982 & 0.2409 & 0.9885 & 0.7679 & 0.4132 \tabularnewline
87 & 4655 & 6889.782 & 3576.7524 & 10202.8115 & 0.0931 & 0.6508 & 0.6022 & 0.3114 \tabularnewline
88 & 5072 & 6446.6304 & 2986.8434 & 9906.4173 & 0.2181 & 0.8449 & 0.7774 & 0.2352 \tabularnewline
89 & 3640 & 7814.106 & 4165.5566 & 11462.6553 & 0.0125 & 0.9296 & 0.7009 & 0.5199 \tabularnewline
90 & 5147 & 8134.6216 & 4344.1042 & 11925.1389 & 0.0612 & 0.9899 & 0.7132 & 0.5847 \tabularnewline
91 & 5703 & 8287.2774 & 4358.3182 & 12216.2366 & 0.0987 & 0.9414 & 0.6078 & 0.6112 \tabularnewline
92 & 11889 & 10986.0321 & 6933.1673 & 15038.8968 & 0.3312 & 0.9947 & 0.6584 & 0.9428 \tabularnewline
93 & 15603 & 16786.3188 & 12603.7311 & 20968.9065 & 0.2896 & 0.9891 & 0.6343 & 1 \tabularnewline
94 & 9589 & 9479.5591 & 5171.9377 & 13787.1804 & 0.4801 & 0.0027 & 0.7882 & 0.7882 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115518&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[82])[/C][/ROW]
[ROW][C]70[/C][C]8850[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]5582[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]6496[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]3255[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]6189[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]6452[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]5099[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]6833[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]7046[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]7739[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]10142[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]16054[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]7721[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]6182[/C][C]5790.7058[/C][C]3219.955[/C][C]8361.4566[/C][C]0.3827[/C][C]0.0706[/C][C]0.5632[/C][C]0.0706[/C][/ROW]
[ROW][C]84[/C][C]6490[/C][C]7524.4578[/C][C]4675.0617[/C][C]10373.8538[/C][C]0.2384[/C][C]0.8221[/C][C]0.7604[/C][C]0.4462[/C][/ROW]
[ROW][C]85[/C][C]3704[/C][C]5437.6149[/C][C]2334.2019[/C][C]8541.0279[/C][C]0.1368[/C][C]0.2531[/C][C]0.916[/C][C]0.0746[/C][/ROW]
[ROW][C]86[/C][C]6235[/C][C]7367.7702[/C][C]4210.7422[/C][C]10524.7982[/C][C]0.2409[/C][C]0.9885[/C][C]0.7679[/C][C]0.4132[/C][/ROW]
[ROW][C]87[/C][C]4655[/C][C]6889.782[/C][C]3576.7524[/C][C]10202.8115[/C][C]0.0931[/C][C]0.6508[/C][C]0.6022[/C][C]0.3114[/C][/ROW]
[ROW][C]88[/C][C]5072[/C][C]6446.6304[/C][C]2986.8434[/C][C]9906.4173[/C][C]0.2181[/C][C]0.8449[/C][C]0.7774[/C][C]0.2352[/C][/ROW]
[ROW][C]89[/C][C]3640[/C][C]7814.106[/C][C]4165.5566[/C][C]11462.6553[/C][C]0.0125[/C][C]0.9296[/C][C]0.7009[/C][C]0.5199[/C][/ROW]
[ROW][C]90[/C][C]5147[/C][C]8134.6216[/C][C]4344.1042[/C][C]11925.1389[/C][C]0.0612[/C][C]0.9899[/C][C]0.7132[/C][C]0.5847[/C][/ROW]
[ROW][C]91[/C][C]5703[/C][C]8287.2774[/C][C]4358.3182[/C][C]12216.2366[/C][C]0.0987[/C][C]0.9414[/C][C]0.6078[/C][C]0.6112[/C][/ROW]
[ROW][C]92[/C][C]11889[/C][C]10986.0321[/C][C]6933.1673[/C][C]15038.8968[/C][C]0.3312[/C][C]0.9947[/C][C]0.6584[/C][C]0.9428[/C][/ROW]
[ROW][C]93[/C][C]15603[/C][C]16786.3188[/C][C]12603.7311[/C][C]20968.9065[/C][C]0.2896[/C][C]0.9891[/C][C]0.6343[/C][C]1[/C][/ROW]
[ROW][C]94[/C][C]9589[/C][C]9479.5591[/C][C]5171.9377[/C][C]13787.1804[/C][C]0.4801[/C][C]0.0027[/C][C]0.7882[/C][C]0.7882[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115518&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115518&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[82])
708850-------
715582-------
726496-------
733255-------
746189-------
756452-------
765099-------
776833-------
787046-------
797739-------
8010142-------
8116054-------
827721-------
8361825790.70583219.9558361.45660.38270.07060.56320.0706
8464907524.45784675.061710373.85380.23840.82210.76040.4462
8537045437.61492334.20198541.02790.13680.25310.9160.0746
8662357367.77024210.742210524.79820.24090.98850.76790.4132
8746556889.7823576.752410202.81150.09310.65080.60220.3114
8850726446.63042986.84349906.41730.21810.84490.77740.2352
8936407814.1064165.556611462.65530.01250.92960.70090.5199
9051478134.62164344.104211925.13890.06120.98990.71320.5847
9157038287.27744358.318212216.23660.09870.94140.60780.6112
921188910986.03216933.167315038.89680.33120.99470.65840.9428
931560316786.318812603.731120968.90650.28960.98910.63431
9495899479.55915171.937713787.18040.48010.00270.78820.7882







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
830.22650.06760153111.159500
840.1932-0.13750.10251070102.8916611607.0255782.0531
850.2912-0.31880.17463005420.62851409544.89321187.2426
860.2186-0.15370.16941283168.35481377950.75861173.8615
870.2453-0.32440.20044994250.5552101210.71791449.5554
880.2738-0.21320.20251889608.62742065943.70281437.3391
890.2382-0.53420.249917423160.73554259831.85032063.936
900.2377-0.36730.26468925882.65554843088.2012200.7018
910.2419-0.31180.26986678489.6185047021.69182246.5577
920.18820.08220.2511815351.11484623854.63412150.315
930.1271-0.07050.23471400243.34734330799.06252081.0572
940.23180.01150.216111977.31683970897.25041992.711

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
83 & 0.2265 & 0.0676 & 0 & 153111.1595 & 0 & 0 \tabularnewline
84 & 0.1932 & -0.1375 & 0.1025 & 1070102.8916 & 611607.0255 & 782.0531 \tabularnewline
85 & 0.2912 & -0.3188 & 0.1746 & 3005420.6285 & 1409544.8932 & 1187.2426 \tabularnewline
86 & 0.2186 & -0.1537 & 0.1694 & 1283168.3548 & 1377950.7586 & 1173.8615 \tabularnewline
87 & 0.2453 & -0.3244 & 0.2004 & 4994250.555 & 2101210.7179 & 1449.5554 \tabularnewline
88 & 0.2738 & -0.2132 & 0.2025 & 1889608.6274 & 2065943.7028 & 1437.3391 \tabularnewline
89 & 0.2382 & -0.5342 & 0.2499 & 17423160.7355 & 4259831.8503 & 2063.936 \tabularnewline
90 & 0.2377 & -0.3673 & 0.2646 & 8925882.6555 & 4843088.201 & 2200.7018 \tabularnewline
91 & 0.2419 & -0.3118 & 0.2698 & 6678489.618 & 5047021.6918 & 2246.5577 \tabularnewline
92 & 0.1882 & 0.0822 & 0.2511 & 815351.1148 & 4623854.6341 & 2150.315 \tabularnewline
93 & 0.1271 & -0.0705 & 0.2347 & 1400243.3473 & 4330799.0625 & 2081.0572 \tabularnewline
94 & 0.2318 & 0.0115 & 0.2161 & 11977.3168 & 3970897.2504 & 1992.711 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115518&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]83[/C][C]0.2265[/C][C]0.0676[/C][C]0[/C][C]153111.1595[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]84[/C][C]0.1932[/C][C]-0.1375[/C][C]0.1025[/C][C]1070102.8916[/C][C]611607.0255[/C][C]782.0531[/C][/ROW]
[ROW][C]85[/C][C]0.2912[/C][C]-0.3188[/C][C]0.1746[/C][C]3005420.6285[/C][C]1409544.8932[/C][C]1187.2426[/C][/ROW]
[ROW][C]86[/C][C]0.2186[/C][C]-0.1537[/C][C]0.1694[/C][C]1283168.3548[/C][C]1377950.7586[/C][C]1173.8615[/C][/ROW]
[ROW][C]87[/C][C]0.2453[/C][C]-0.3244[/C][C]0.2004[/C][C]4994250.555[/C][C]2101210.7179[/C][C]1449.5554[/C][/ROW]
[ROW][C]88[/C][C]0.2738[/C][C]-0.2132[/C][C]0.2025[/C][C]1889608.6274[/C][C]2065943.7028[/C][C]1437.3391[/C][/ROW]
[ROW][C]89[/C][C]0.2382[/C][C]-0.5342[/C][C]0.2499[/C][C]17423160.7355[/C][C]4259831.8503[/C][C]2063.936[/C][/ROW]
[ROW][C]90[/C][C]0.2377[/C][C]-0.3673[/C][C]0.2646[/C][C]8925882.6555[/C][C]4843088.201[/C][C]2200.7018[/C][/ROW]
[ROW][C]91[/C][C]0.2419[/C][C]-0.3118[/C][C]0.2698[/C][C]6678489.618[/C][C]5047021.6918[/C][C]2246.5577[/C][/ROW]
[ROW][C]92[/C][C]0.1882[/C][C]0.0822[/C][C]0.2511[/C][C]815351.1148[/C][C]4623854.6341[/C][C]2150.315[/C][/ROW]
[ROW][C]93[/C][C]0.1271[/C][C]-0.0705[/C][C]0.2347[/C][C]1400243.3473[/C][C]4330799.0625[/C][C]2081.0572[/C][/ROW]
[ROW][C]94[/C][C]0.2318[/C][C]0.0115[/C][C]0.2161[/C][C]11977.3168[/C][C]3970897.2504[/C][C]1992.711[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115518&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115518&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
830.22650.06760153111.159500
840.1932-0.13750.10251070102.8916611607.0255782.0531
850.2912-0.31880.17463005420.62851409544.89321187.2426
860.2186-0.15370.16941283168.35481377950.75861173.8615
870.2453-0.32440.20044994250.5552101210.71791449.5554
880.2738-0.21320.20251889608.62742065943.70281437.3391
890.2382-0.53420.249917423160.73554259831.85032063.936
900.2377-0.36730.26468925882.65554843088.2012200.7018
910.2419-0.31180.26986678489.6185047021.69182246.5577
920.18820.08220.2511815351.11484623854.63412150.315
930.1271-0.07050.23471400243.34734330799.06252081.0572
940.23180.01150.216111977.31683970897.25041992.711



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