Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 03 Jan 2008 03:05:58 -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/2008/Jan/03/t1199355650jp2ui0felo9wptt.htm/, Retrieved Tue, 14 May 2024 07:12:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=7764, Retrieved Tue, 14 May 2024 07:12:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact288
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [PAPER-FORECASTING] [2008-01-03 10:05:58] [6bdd947de0ee04552c8f0fc807f31807] [Current]
Feedback Forum

Post a new message
Dataseries X:
7272,2
6680,1
8427,6
8752,8
7952,7
8694,3
7787
8474,2
9154,7
8557,2
7951,1
9156,7
7865,7
7337,4
9131,7
8814,6
8598,8
8439,6
7451,8
8016,2
9544,1
8270,7
8102,2
9369
7657,7
7816,6
9391,3
9445,4
9533,1
10068,7
8955,5
10423,9
11617,2
9391,1
10872
10230,4
9221
9428,6
10934,5
10986
11724,6
11180,9
11163,2
11240,9
12107,1
10762,3
11340,4
11266,8
9542,7
9227,7
10571,9
10774,4
10392,8
9920,2
9884,9
10174,5
11395,4
10760,2
10570,1
10536
9902,6
8889
10837,3
11624,1
10509
10984,9
10649,1
10855,7
11677,4
10760,2
10046,2
10772,8
9987,7
8638,7
11063,7
11855,7
10684,5
11337,4
10478
11123,9
12909,3
11339,9
10462,2
12733,5
10519,2
10414,9
12476,8
12384,6
12266,7
12919,9
11497,3
12142
13919,4
12656,8
12034,1
13199,7
10881,3
11301,2
13643,9
12517
13981,1
14275,7
13435
13565,7
16216,3
12970
14079,9
14235
12213,4
12581
14130,4
14210,8
14378,5
13142,8
13714,7
13621,9
15379,8
13306,3
14391,2
14909,9




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time14 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 14 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7764&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]14 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7764&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7764&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 time14 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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[108])
9613199.7-------
9710881.3-------
9811301.2-------
9913643.9-------
10012517-------
10113981.1-------
10214275.7-------
10313435-------
10413565.7-------
10516216.3-------
10612970-------
10714079.9-------
10814235-------
10912213.412374.180811461.221513287.14010.36500.99930
1101258112670.186311737.994913602.37770.42560.83160.9985e-04
11114130.414260.818413188.819415332.81730.40580.99890.87030.5188
11214210.814150.181412897.572915402.78990.46220.51230.99470.4472
11314378.514464.599913152.851415776.34840.44880.64770.7650.6342
11413142.814480.338413034.10315926.57380.03490.55490.60920.6302
11513714.713962.636512416.828215508.44480.37660.85070.74830.3649
11613621.914381.572412756.769916006.3750.17970.78940.83750.5702
11715379.815906.438114179.516317633.35990.2750.99520.36250.9711
11813306.314075.020912268.92815881.11390.20210.07840.88480.4311
11914391.214427.123412541.47216312.77480.48510.8780.64090.5791
12014909.914852.986312886.639816819.33280.47740.67730.7310.731

\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[108]) \tabularnewline
96 & 13199.7 & - & - & - & - & - & - & - \tabularnewline
97 & 10881.3 & - & - & - & - & - & - & - \tabularnewline
98 & 11301.2 & - & - & - & - & - & - & - \tabularnewline
99 & 13643.9 & - & - & - & - & - & - & - \tabularnewline
100 & 12517 & - & - & - & - & - & - & - \tabularnewline
101 & 13981.1 & - & - & - & - & - & - & - \tabularnewline
102 & 14275.7 & - & - & - & - & - & - & - \tabularnewline
103 & 13435 & - & - & - & - & - & - & - \tabularnewline
104 & 13565.7 & - & - & - & - & - & - & - \tabularnewline
105 & 16216.3 & - & - & - & - & - & - & - \tabularnewline
106 & 12970 & - & - & - & - & - & - & - \tabularnewline
107 & 14079.9 & - & - & - & - & - & - & - \tabularnewline
108 & 14235 & - & - & - & - & - & - & - \tabularnewline
109 & 12213.4 & 12374.1808 & 11461.2215 & 13287.1401 & 0.365 & 0 & 0.9993 & 0 \tabularnewline
110 & 12581 & 12670.1863 & 11737.9949 & 13602.3777 & 0.4256 & 0.8316 & 0.998 & 5e-04 \tabularnewline
111 & 14130.4 & 14260.8184 & 13188.8194 & 15332.8173 & 0.4058 & 0.9989 & 0.8703 & 0.5188 \tabularnewline
112 & 14210.8 & 14150.1814 & 12897.5729 & 15402.7899 & 0.4622 & 0.5123 & 0.9947 & 0.4472 \tabularnewline
113 & 14378.5 & 14464.5999 & 13152.8514 & 15776.3484 & 0.4488 & 0.6477 & 0.765 & 0.6342 \tabularnewline
114 & 13142.8 & 14480.3384 & 13034.103 & 15926.5738 & 0.0349 & 0.5549 & 0.6092 & 0.6302 \tabularnewline
115 & 13714.7 & 13962.6365 & 12416.8282 & 15508.4448 & 0.3766 & 0.8507 & 0.7483 & 0.3649 \tabularnewline
116 & 13621.9 & 14381.5724 & 12756.7699 & 16006.375 & 0.1797 & 0.7894 & 0.8375 & 0.5702 \tabularnewline
117 & 15379.8 & 15906.4381 & 14179.5163 & 17633.3599 & 0.275 & 0.9952 & 0.3625 & 0.9711 \tabularnewline
118 & 13306.3 & 14075.0209 & 12268.928 & 15881.1139 & 0.2021 & 0.0784 & 0.8848 & 0.4311 \tabularnewline
119 & 14391.2 & 14427.1234 & 12541.472 & 16312.7748 & 0.4851 & 0.878 & 0.6409 & 0.5791 \tabularnewline
120 & 14909.9 & 14852.9863 & 12886.6398 & 16819.3328 & 0.4774 & 0.6773 & 0.731 & 0.731 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7764&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[108])[/C][/ROW]
[ROW][C]96[/C][C]13199.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]10881.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]11301.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]13643.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]12517[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]13981.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]14275.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]13435[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]13565.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]16216.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]12970[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]14079.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]14235[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]12213.4[/C][C]12374.1808[/C][C]11461.2215[/C][C]13287.1401[/C][C]0.365[/C][C]0[/C][C]0.9993[/C][C]0[/C][/ROW]
[ROW][C]110[/C][C]12581[/C][C]12670.1863[/C][C]11737.9949[/C][C]13602.3777[/C][C]0.4256[/C][C]0.8316[/C][C]0.998[/C][C]5e-04[/C][/ROW]
[ROW][C]111[/C][C]14130.4[/C][C]14260.8184[/C][C]13188.8194[/C][C]15332.8173[/C][C]0.4058[/C][C]0.9989[/C][C]0.8703[/C][C]0.5188[/C][/ROW]
[ROW][C]112[/C][C]14210.8[/C][C]14150.1814[/C][C]12897.5729[/C][C]15402.7899[/C][C]0.4622[/C][C]0.5123[/C][C]0.9947[/C][C]0.4472[/C][/ROW]
[ROW][C]113[/C][C]14378.5[/C][C]14464.5999[/C][C]13152.8514[/C][C]15776.3484[/C][C]0.4488[/C][C]0.6477[/C][C]0.765[/C][C]0.6342[/C][/ROW]
[ROW][C]114[/C][C]13142.8[/C][C]14480.3384[/C][C]13034.103[/C][C]15926.5738[/C][C]0.0349[/C][C]0.5549[/C][C]0.6092[/C][C]0.6302[/C][/ROW]
[ROW][C]115[/C][C]13714.7[/C][C]13962.6365[/C][C]12416.8282[/C][C]15508.4448[/C][C]0.3766[/C][C]0.8507[/C][C]0.7483[/C][C]0.3649[/C][/ROW]
[ROW][C]116[/C][C]13621.9[/C][C]14381.5724[/C][C]12756.7699[/C][C]16006.375[/C][C]0.1797[/C][C]0.7894[/C][C]0.8375[/C][C]0.5702[/C][/ROW]
[ROW][C]117[/C][C]15379.8[/C][C]15906.4381[/C][C]14179.5163[/C][C]17633.3599[/C][C]0.275[/C][C]0.9952[/C][C]0.3625[/C][C]0.9711[/C][/ROW]
[ROW][C]118[/C][C]13306.3[/C][C]14075.0209[/C][C]12268.928[/C][C]15881.1139[/C][C]0.2021[/C][C]0.0784[/C][C]0.8848[/C][C]0.4311[/C][/ROW]
[ROW][C]119[/C][C]14391.2[/C][C]14427.1234[/C][C]12541.472[/C][C]16312.7748[/C][C]0.4851[/C][C]0.878[/C][C]0.6409[/C][C]0.5791[/C][/ROW]
[ROW][C]120[/C][C]14909.9[/C][C]14852.9863[/C][C]12886.6398[/C][C]16819.3328[/C][C]0.4774[/C][C]0.6773[/C][C]0.731[/C][C]0.731[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7764&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7764&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[108])
9613199.7-------
9710881.3-------
9811301.2-------
9913643.9-------
10012517-------
10113981.1-------
10214275.7-------
10313435-------
10413565.7-------
10516216.3-------
10612970-------
10714079.9-------
10814235-------
10912213.412374.180811461.221513287.14010.36500.99930
1101258112670.186311737.994913602.37770.42560.83160.9985e-04
11114130.414260.818413188.819415332.81730.40580.99890.87030.5188
11214210.814150.181412897.572915402.78990.46220.51230.99470.4472
11314378.514464.599913152.851415776.34840.44880.64770.7650.6342
11413142.814480.338413034.10315926.57380.03490.55490.60920.6302
11513714.713962.636512416.828215508.44480.37660.85070.74830.3649
11613621.914381.572412756.769916006.3750.17970.78940.83750.5702
11715379.815906.438114179.516317633.35990.2750.99520.36250.9711
11813306.314075.020912268.92815881.11390.20210.07840.88480.4311
11914391.214427.123412541.47216312.77480.48510.8780.64090.5791
12014909.914852.986312886.639816819.33280.47740.67730.7310.731







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1090.0376-0.0130.001125850.45782154.204846.4134
1100.0375-0.0076e-047954.2013662.850125.7459
1110.0384-0.00918e-0417008.94721417.412337.6485
1120.04520.00434e-043674.614306.217817.4991
1130.0463-0.0065e-047413.1952617.766324.8549
1140.051-0.09240.00771789008.9214149084.0768386.1141
1150.0565-0.01780.001561472.50855122.70971.5731
1160.0576-0.05280.0044577102.221448091.8518219.2985
1170.0554-0.03310.0028277347.651423112.3043152.0273
1180.0655-0.05460.0046590931.858349244.3215221.9106
1190.0667-0.00252e-041290.4913107.540910.3702
1200.06750.00383e-043239.1732269.931116.4296

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
109 & 0.0376 & -0.013 & 0.0011 & 25850.4578 & 2154.2048 & 46.4134 \tabularnewline
110 & 0.0375 & -0.007 & 6e-04 & 7954.2013 & 662.8501 & 25.7459 \tabularnewline
111 & 0.0384 & -0.0091 & 8e-04 & 17008.9472 & 1417.4123 & 37.6485 \tabularnewline
112 & 0.0452 & 0.0043 & 4e-04 & 3674.614 & 306.2178 & 17.4991 \tabularnewline
113 & 0.0463 & -0.006 & 5e-04 & 7413.1952 & 617.7663 & 24.8549 \tabularnewline
114 & 0.051 & -0.0924 & 0.0077 & 1789008.9214 & 149084.0768 & 386.1141 \tabularnewline
115 & 0.0565 & -0.0178 & 0.0015 & 61472.5085 & 5122.709 & 71.5731 \tabularnewline
116 & 0.0576 & -0.0528 & 0.0044 & 577102.2214 & 48091.8518 & 219.2985 \tabularnewline
117 & 0.0554 & -0.0331 & 0.0028 & 277347.6514 & 23112.3043 & 152.0273 \tabularnewline
118 & 0.0655 & -0.0546 & 0.0046 & 590931.8583 & 49244.3215 & 221.9106 \tabularnewline
119 & 0.0667 & -0.0025 & 2e-04 & 1290.4913 & 107.5409 & 10.3702 \tabularnewline
120 & 0.0675 & 0.0038 & 3e-04 & 3239.1732 & 269.9311 & 16.4296 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7764&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]109[/C][C]0.0376[/C][C]-0.013[/C][C]0.0011[/C][C]25850.4578[/C][C]2154.2048[/C][C]46.4134[/C][/ROW]
[ROW][C]110[/C][C]0.0375[/C][C]-0.007[/C][C]6e-04[/C][C]7954.2013[/C][C]662.8501[/C][C]25.7459[/C][/ROW]
[ROW][C]111[/C][C]0.0384[/C][C]-0.0091[/C][C]8e-04[/C][C]17008.9472[/C][C]1417.4123[/C][C]37.6485[/C][/ROW]
[ROW][C]112[/C][C]0.0452[/C][C]0.0043[/C][C]4e-04[/C][C]3674.614[/C][C]306.2178[/C][C]17.4991[/C][/ROW]
[ROW][C]113[/C][C]0.0463[/C][C]-0.006[/C][C]5e-04[/C][C]7413.1952[/C][C]617.7663[/C][C]24.8549[/C][/ROW]
[ROW][C]114[/C][C]0.051[/C][C]-0.0924[/C][C]0.0077[/C][C]1789008.9214[/C][C]149084.0768[/C][C]386.1141[/C][/ROW]
[ROW][C]115[/C][C]0.0565[/C][C]-0.0178[/C][C]0.0015[/C][C]61472.5085[/C][C]5122.709[/C][C]71.5731[/C][/ROW]
[ROW][C]116[/C][C]0.0576[/C][C]-0.0528[/C][C]0.0044[/C][C]577102.2214[/C][C]48091.8518[/C][C]219.2985[/C][/ROW]
[ROW][C]117[/C][C]0.0554[/C][C]-0.0331[/C][C]0.0028[/C][C]277347.6514[/C][C]23112.3043[/C][C]152.0273[/C][/ROW]
[ROW][C]118[/C][C]0.0655[/C][C]-0.0546[/C][C]0.0046[/C][C]590931.8583[/C][C]49244.3215[/C][C]221.9106[/C][/ROW]
[ROW][C]119[/C][C]0.0667[/C][C]-0.0025[/C][C]2e-04[/C][C]1290.4913[/C][C]107.5409[/C][C]10.3702[/C][/ROW]
[ROW][C]120[/C][C]0.0675[/C][C]0.0038[/C][C]3e-04[/C][C]3239.1732[/C][C]269.9311[/C][C]16.4296[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7764&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7764&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
1090.0376-0.0130.001125850.45782154.204846.4134
1100.0375-0.0076e-047954.2013662.850125.7459
1110.0384-0.00918e-0417008.94721417.412337.6485
1120.04520.00434e-043674.614306.217817.4991
1130.0463-0.0065e-047413.1952617.766324.8549
1140.051-0.09240.00771789008.9214149084.0768386.1141
1150.0565-0.01780.001561472.50855122.70971.5731
1160.0576-0.05280.0044577102.221448091.8518219.2985
1170.0554-0.03310.0028277347.651423112.3043152.0273
1180.0655-0.05460.0046590931.858349244.3215221.9106
1190.0667-0.00252e-041290.4913107.540910.3702
1200.06750.00383e-043239.1732269.931116.4296



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