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 18:14:23 +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/t1293041633htoqtee1othzvzy.htm/, Retrieved Mon, 06 May 2024 02:33:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114461, Retrieved Mon, 06 May 2024 02:33:16 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact99
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper Statistiek 14] [2010-12-22 18:14:23] [97dee3ad7274585c4a7ecb4c981cc7fb] [Current]
Feedback Forum

Post a new message
Dataseries X:
5732
6938
6660
6695
6484
7716
5927
4768
7081
6947
7723
7319
6285
6655
7331
6468
7653
7330
5907
5257
7029
8885
9477
6822
8595
8738
11380
9831
10560
10336
8872
7598
9713
10858
10430
7516
8344
8623
9238
10350
9415
9550
8301
6405
10251
10082
8683
7829
6712
7354
8402
8211
8377
9133
8301
5932
9080
9459
9647
8646
7503
10000
10441
6435
8102
9983
8662
6575
9088
9336
9089




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 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 & 7 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114461&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]7 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=114461&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114461&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 time7 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[59])
478683-------
487829-------
496712-------
507354-------
518402-------
528211-------
538377-------
549133-------
558301-------
565932-------
579080-------
589459-------
599647-------
6086468620.96817321.50079920.43550.48490.06090.88390.0609
6175038277.78926854.63519700.94340.1430.3060.98450.0297
62100008917.48947344.853910490.12490.08860.9610.97430.1816
631044110331.42558576.388912086.4620.45130.64440.98440.7777
6464358984.66567112.369910856.96120.00380.06370.7910.244
6581029939.60147928.00811951.19480.03670.99970.93610.6122
66998310230.12358101.161912359.08510.410.9750.84380.7043
6786628775.41796532.090311018.74560.46050.14570.66070.2232
6865757638.83895285.55029992.12750.18780.19710.92240.0472
6990889451.45496995.875811907.03410.38590.98920.61660.438
70933610631.92398075.07613188.77180.16030.88170.81570.7749
71908911313.58718661.461213965.7130.05010.92810.8910.891

\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[59]) \tabularnewline
47 & 8683 & - & - & - & - & - & - & - \tabularnewline
48 & 7829 & - & - & - & - & - & - & - \tabularnewline
49 & 6712 & - & - & - & - & - & - & - \tabularnewline
50 & 7354 & - & - & - & - & - & - & - \tabularnewline
51 & 8402 & - & - & - & - & - & - & - \tabularnewline
52 & 8211 & - & - & - & - & - & - & - \tabularnewline
53 & 8377 & - & - & - & - & - & - & - \tabularnewline
54 & 9133 & - & - & - & - & - & - & - \tabularnewline
55 & 8301 & - & - & - & - & - & - & - \tabularnewline
56 & 5932 & - & - & - & - & - & - & - \tabularnewline
57 & 9080 & - & - & - & - & - & - & - \tabularnewline
58 & 9459 & - & - & - & - & - & - & - \tabularnewline
59 & 9647 & - & - & - & - & - & - & - \tabularnewline
60 & 8646 & 8620.9681 & 7321.5007 & 9920.4355 & 0.4849 & 0.0609 & 0.8839 & 0.0609 \tabularnewline
61 & 7503 & 8277.7892 & 6854.6351 & 9700.9434 & 0.143 & 0.306 & 0.9845 & 0.0297 \tabularnewline
62 & 10000 & 8917.4894 & 7344.8539 & 10490.1249 & 0.0886 & 0.961 & 0.9743 & 0.1816 \tabularnewline
63 & 10441 & 10331.4255 & 8576.3889 & 12086.462 & 0.4513 & 0.6444 & 0.9844 & 0.7777 \tabularnewline
64 & 6435 & 8984.6656 & 7112.3699 & 10856.9612 & 0.0038 & 0.0637 & 0.791 & 0.244 \tabularnewline
65 & 8102 & 9939.6014 & 7928.008 & 11951.1948 & 0.0367 & 0.9997 & 0.9361 & 0.6122 \tabularnewline
66 & 9983 & 10230.1235 & 8101.1619 & 12359.0851 & 0.41 & 0.975 & 0.8438 & 0.7043 \tabularnewline
67 & 8662 & 8775.4179 & 6532.0903 & 11018.7456 & 0.4605 & 0.1457 & 0.6607 & 0.2232 \tabularnewline
68 & 6575 & 7638.8389 & 5285.5502 & 9992.1275 & 0.1878 & 0.1971 & 0.9224 & 0.0472 \tabularnewline
69 & 9088 & 9451.4549 & 6995.8758 & 11907.0341 & 0.3859 & 0.9892 & 0.6166 & 0.438 \tabularnewline
70 & 9336 & 10631.9239 & 8075.076 & 13188.7718 & 0.1603 & 0.8817 & 0.8157 & 0.7749 \tabularnewline
71 & 9089 & 11313.5871 & 8661.4612 & 13965.713 & 0.0501 & 0.9281 & 0.891 & 0.891 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114461&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[59])[/C][/ROW]
[ROW][C]47[/C][C]8683[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]7829[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]6712[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]7354[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]8402[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]8211[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]8377[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]9133[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]8301[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]5932[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]9080[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]9459[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]9647[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]8646[/C][C]8620.9681[/C][C]7321.5007[/C][C]9920.4355[/C][C]0.4849[/C][C]0.0609[/C][C]0.8839[/C][C]0.0609[/C][/ROW]
[ROW][C]61[/C][C]7503[/C][C]8277.7892[/C][C]6854.6351[/C][C]9700.9434[/C][C]0.143[/C][C]0.306[/C][C]0.9845[/C][C]0.0297[/C][/ROW]
[ROW][C]62[/C][C]10000[/C][C]8917.4894[/C][C]7344.8539[/C][C]10490.1249[/C][C]0.0886[/C][C]0.961[/C][C]0.9743[/C][C]0.1816[/C][/ROW]
[ROW][C]63[/C][C]10441[/C][C]10331.4255[/C][C]8576.3889[/C][C]12086.462[/C][C]0.4513[/C][C]0.6444[/C][C]0.9844[/C][C]0.7777[/C][/ROW]
[ROW][C]64[/C][C]6435[/C][C]8984.6656[/C][C]7112.3699[/C][C]10856.9612[/C][C]0.0038[/C][C]0.0637[/C][C]0.791[/C][C]0.244[/C][/ROW]
[ROW][C]65[/C][C]8102[/C][C]9939.6014[/C][C]7928.008[/C][C]11951.1948[/C][C]0.0367[/C][C]0.9997[/C][C]0.9361[/C][C]0.6122[/C][/ROW]
[ROW][C]66[/C][C]9983[/C][C]10230.1235[/C][C]8101.1619[/C][C]12359.0851[/C][C]0.41[/C][C]0.975[/C][C]0.8438[/C][C]0.7043[/C][/ROW]
[ROW][C]67[/C][C]8662[/C][C]8775.4179[/C][C]6532.0903[/C][C]11018.7456[/C][C]0.4605[/C][C]0.1457[/C][C]0.6607[/C][C]0.2232[/C][/ROW]
[ROW][C]68[/C][C]6575[/C][C]7638.8389[/C][C]5285.5502[/C][C]9992.1275[/C][C]0.1878[/C][C]0.1971[/C][C]0.9224[/C][C]0.0472[/C][/ROW]
[ROW][C]69[/C][C]9088[/C][C]9451.4549[/C][C]6995.8758[/C][C]11907.0341[/C][C]0.3859[/C][C]0.9892[/C][C]0.6166[/C][C]0.438[/C][/ROW]
[ROW][C]70[/C][C]9336[/C][C]10631.9239[/C][C]8075.076[/C][C]13188.7718[/C][C]0.1603[/C][C]0.8817[/C][C]0.8157[/C][C]0.7749[/C][/ROW]
[ROW][C]71[/C][C]9089[/C][C]11313.5871[/C][C]8661.4612[/C][C]13965.713[/C][C]0.0501[/C][C]0.9281[/C][C]0.891[/C][C]0.891[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114461&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114461&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[59])
478683-------
487829-------
496712-------
507354-------
518402-------
528211-------
538377-------
549133-------
558301-------
565932-------
579080-------
589459-------
599647-------
6086468620.96817321.50079920.43550.48490.06090.88390.0609
6175038277.78926854.63519700.94340.1430.3060.98450.0297
62100008917.48947344.853910490.12490.08860.9610.97430.1816
631044110331.42558576.388912086.4620.45130.64440.98440.7777
6464358984.66567112.369910856.96120.00380.06370.7910.244
6581029939.60147928.00811951.19480.03670.99970.93610.6122
66998310230.12358101.161912359.08510.410.9750.84380.7043
6786628775.41796532.090311018.74560.46050.14570.66070.2232
6865757638.83895285.55029992.12750.18780.19710.92240.0472
6990889451.45496995.875811907.03410.38590.98920.61660.438
70933610631.92398075.07613188.77180.16030.88170.81570.7749
71908911313.58718661.461213965.7130.05010.92810.8910.891







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
600.07690.00290626.597300
610.0877-0.09360.0483600298.3291300462.4632548.1446
620.090.12140.07261171829.2703590918.0655768.712
630.08670.01060.057112006.5771446190.1934667.9747
640.1063-0.28380.10256500794.56351657111.06741287.2883
650.1033-0.18490.11623376778.93121943722.37811394.1744
660.1062-0.02420.10361070.0391674772.04391294.1298
670.1304-0.01290.091812863.62531467033.49161211.2116
680.1572-0.13930.09711131753.13991429780.11921195.7341
690.1326-0.03850.0912132099.49581300012.05681140.1807
700.1227-0.12190.0941679418.83961334503.58251155.2072
710.1196-0.19660.10254948787.75951635693.93061278.9425

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
60 & 0.0769 & 0.0029 & 0 & 626.5973 & 0 & 0 \tabularnewline
61 & 0.0877 & -0.0936 & 0.0483 & 600298.3291 & 300462.4632 & 548.1446 \tabularnewline
62 & 0.09 & 0.1214 & 0.0726 & 1171829.2703 & 590918.0655 & 768.712 \tabularnewline
63 & 0.0867 & 0.0106 & 0.0571 & 12006.5771 & 446190.1934 & 667.9747 \tabularnewline
64 & 0.1063 & -0.2838 & 0.1025 & 6500794.5635 & 1657111.0674 & 1287.2883 \tabularnewline
65 & 0.1033 & -0.1849 & 0.1162 & 3376778.9312 & 1943722.3781 & 1394.1744 \tabularnewline
66 & 0.1062 & -0.0242 & 0.103 & 61070.039 & 1674772.0439 & 1294.1298 \tabularnewline
67 & 0.1304 & -0.0129 & 0.0918 & 12863.6253 & 1467033.4916 & 1211.2116 \tabularnewline
68 & 0.1572 & -0.1393 & 0.0971 & 1131753.1399 & 1429780.1192 & 1195.7341 \tabularnewline
69 & 0.1326 & -0.0385 & 0.0912 & 132099.4958 & 1300012.0568 & 1140.1807 \tabularnewline
70 & 0.1227 & -0.1219 & 0.094 & 1679418.8396 & 1334503.5825 & 1155.2072 \tabularnewline
71 & 0.1196 & -0.1966 & 0.1025 & 4948787.7595 & 1635693.9306 & 1278.9425 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114461&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]60[/C][C]0.0769[/C][C]0.0029[/C][C]0[/C][C]626.5973[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]61[/C][C]0.0877[/C][C]-0.0936[/C][C]0.0483[/C][C]600298.3291[/C][C]300462.4632[/C][C]548.1446[/C][/ROW]
[ROW][C]62[/C][C]0.09[/C][C]0.1214[/C][C]0.0726[/C][C]1171829.2703[/C][C]590918.0655[/C][C]768.712[/C][/ROW]
[ROW][C]63[/C][C]0.0867[/C][C]0.0106[/C][C]0.0571[/C][C]12006.5771[/C][C]446190.1934[/C][C]667.9747[/C][/ROW]
[ROW][C]64[/C][C]0.1063[/C][C]-0.2838[/C][C]0.1025[/C][C]6500794.5635[/C][C]1657111.0674[/C][C]1287.2883[/C][/ROW]
[ROW][C]65[/C][C]0.1033[/C][C]-0.1849[/C][C]0.1162[/C][C]3376778.9312[/C][C]1943722.3781[/C][C]1394.1744[/C][/ROW]
[ROW][C]66[/C][C]0.1062[/C][C]-0.0242[/C][C]0.103[/C][C]61070.039[/C][C]1674772.0439[/C][C]1294.1298[/C][/ROW]
[ROW][C]67[/C][C]0.1304[/C][C]-0.0129[/C][C]0.0918[/C][C]12863.6253[/C][C]1467033.4916[/C][C]1211.2116[/C][/ROW]
[ROW][C]68[/C][C]0.1572[/C][C]-0.1393[/C][C]0.0971[/C][C]1131753.1399[/C][C]1429780.1192[/C][C]1195.7341[/C][/ROW]
[ROW][C]69[/C][C]0.1326[/C][C]-0.0385[/C][C]0.0912[/C][C]132099.4958[/C][C]1300012.0568[/C][C]1140.1807[/C][/ROW]
[ROW][C]70[/C][C]0.1227[/C][C]-0.1219[/C][C]0.094[/C][C]1679418.8396[/C][C]1334503.5825[/C][C]1155.2072[/C][/ROW]
[ROW][C]71[/C][C]0.1196[/C][C]-0.1966[/C][C]0.1025[/C][C]4948787.7595[/C][C]1635693.9306[/C][C]1278.9425[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114461&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114461&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
600.07690.00290626.597300
610.0877-0.09360.0483600298.3291300462.4632548.1446
620.090.12140.07261171829.2703590918.0655768.712
630.08670.01060.057112006.5771446190.1934667.9747
640.1063-0.28380.10256500794.56351657111.06741287.2883
650.1033-0.18490.11623376778.93121943722.37811394.1744
660.1062-0.02420.10361070.0391674772.04391294.1298
670.1304-0.01290.091812863.62531467033.49161211.2116
680.1572-0.13930.09711131753.13991429780.11921195.7341
690.1326-0.03850.0912132099.49581300012.05681140.1807
700.1227-0.12190.0941679418.83961334503.58251155.2072
710.1196-0.19660.10254948787.75951635693.93061278.9425



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