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 computationFri, 24 Dec 2010 15:04:34 +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/24/t1293203274nbfgsbf3fyjwyn4.htm/, Retrieved Tue, 30 Apr 2024 06:16:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115076, Retrieved Tue, 30 Apr 2024 06:16:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact158
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Standard Deviation-Mean Plot] [SMP prof bach] [2008-12-15 22:25:20] [bc937651ef42bf891200cf0e0edc7238]
- RM    [Variance Reduction Matrix] [VRM prof bach] [2008-12-15 22:31:00] [bc937651ef42bf891200cf0e0edc7238]
- RMP     [(Partial) Autocorrelation Function] [ARIMA Prof bach A...] [2008-12-15 22:38:57] [bc937651ef42bf891200cf0e0edc7238]
- RMP       [ARIMA Backward Selection] [Arima backward se...] [2008-12-19 17:26:16] [bc937651ef42bf891200cf0e0edc7238]
- RMP         [ARIMA Forecasting] [ARIMA forecast pr...] [2008-12-20 11:34:44] [bc937651ef42bf891200cf0e0edc7238]
-  MPD          [ARIMA Forecasting] [ARIMA Forecasting] [2010-12-22 13:25:50] [616fb52b46273b7e6805de1e68b3a688]
-    D              [ARIMA Forecasting] [ARIMA Forecasting] [2010-12-24 15:04:34] [733bf75cb326fe693c93e834bfd34d22] [Current]
Feedback Forum

Post a new message
Dataseries X:
594167
595454
590865
589379
584428
573100
567456
569028
620735
628884
628232
612117
595404
597141
593408
590072
579799
574205
572775
572942
619567
625809
619916
587625
565742
557274
560576
548854
531673
525919
511038
498662
555362
564591
541657
527070
509846
514258
516922
507561
492622
490243
469357
477580
528379
533590
517945
506174
501866
516141
528222
532638
536322
536535
523597
536214
586570
596594
580523
564478
557560
575093
580112
574761
563250
551531
537034
544686
600991
604378
586111
563668
548604




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115076&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115076&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115076&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[61])
49501866-------
50516141-------
51528222-------
52532638-------
53536322-------
54536535-------
55523597-------
56536214-------
57586570-------
58596594-------
59580523-------
60564478-------
61557560-------
62575093571999.2044556089.5661587908.84270.35150.962410.9624
63580112584224.2574559889.0446608559.47020.37020.76910.9841
64574761588766.632556875.5815620657.68260.19470.70260.99970.9724
65563250592561.4977553509.5583631613.43720.07060.81420.99760.9605
66551531592871.7579546913.5286638829.98710.03890.89680.99190.934
67537034580019.0821527356.4077632681.75640.05480.85550.98210.7984
68544686592710.9352533523.2591651898.61120.05590.96740.96930.8778
69600991643132.6022577588.7407708676.46370.10380.99840.95460.9948
70604378653214.2105581477.0241724951.39680.09110.92320.93910.9955
71586111637193.749559421.8626714965.63530.0990.79590.92340.9776
72563668621193.0853537541.3483704844.82230.08890.79450.90810.932
73548604614313.9806524933.408703694.55330.07480.86660.89330.8933

\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[61]) \tabularnewline
49 & 501866 & - & - & - & - & - & - & - \tabularnewline
50 & 516141 & - & - & - & - & - & - & - \tabularnewline
51 & 528222 & - & - & - & - & - & - & - \tabularnewline
52 & 532638 & - & - & - & - & - & - & - \tabularnewline
53 & 536322 & - & - & - & - & - & - & - \tabularnewline
54 & 536535 & - & - & - & - & - & - & - \tabularnewline
55 & 523597 & - & - & - & - & - & - & - \tabularnewline
56 & 536214 & - & - & - & - & - & - & - \tabularnewline
57 & 586570 & - & - & - & - & - & - & - \tabularnewline
58 & 596594 & - & - & - & - & - & - & - \tabularnewline
59 & 580523 & - & - & - & - & - & - & - \tabularnewline
60 & 564478 & - & - & - & - & - & - & - \tabularnewline
61 & 557560 & - & - & - & - & - & - & - \tabularnewline
62 & 575093 & 571999.2044 & 556089.5661 & 587908.8427 & 0.3515 & 0.9624 & 1 & 0.9624 \tabularnewline
63 & 580112 & 584224.2574 & 559889.0446 & 608559.4702 & 0.3702 & 0.769 & 1 & 0.9841 \tabularnewline
64 & 574761 & 588766.632 & 556875.5815 & 620657.6826 & 0.1947 & 0.7026 & 0.9997 & 0.9724 \tabularnewline
65 & 563250 & 592561.4977 & 553509.5583 & 631613.4372 & 0.0706 & 0.8142 & 0.9976 & 0.9605 \tabularnewline
66 & 551531 & 592871.7579 & 546913.5286 & 638829.9871 & 0.0389 & 0.8968 & 0.9919 & 0.934 \tabularnewline
67 & 537034 & 580019.0821 & 527356.4077 & 632681.7564 & 0.0548 & 0.8555 & 0.9821 & 0.7984 \tabularnewline
68 & 544686 & 592710.9352 & 533523.2591 & 651898.6112 & 0.0559 & 0.9674 & 0.9693 & 0.8778 \tabularnewline
69 & 600991 & 643132.6022 & 577588.7407 & 708676.4637 & 0.1038 & 0.9984 & 0.9546 & 0.9948 \tabularnewline
70 & 604378 & 653214.2105 & 581477.0241 & 724951.3968 & 0.0911 & 0.9232 & 0.9391 & 0.9955 \tabularnewline
71 & 586111 & 637193.749 & 559421.8626 & 714965.6353 & 0.099 & 0.7959 & 0.9234 & 0.9776 \tabularnewline
72 & 563668 & 621193.0853 & 537541.3483 & 704844.8223 & 0.0889 & 0.7945 & 0.9081 & 0.932 \tabularnewline
73 & 548604 & 614313.9806 & 524933.408 & 703694.5533 & 0.0748 & 0.8666 & 0.8933 & 0.8933 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115076&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[61])[/C][/ROW]
[ROW][C]49[/C][C]501866[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]516141[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]528222[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]532638[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]536322[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]536535[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]523597[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]536214[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]586570[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]596594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]580523[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]564478[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]557560[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]575093[/C][C]571999.2044[/C][C]556089.5661[/C][C]587908.8427[/C][C]0.3515[/C][C]0.9624[/C][C]1[/C][C]0.9624[/C][/ROW]
[ROW][C]63[/C][C]580112[/C][C]584224.2574[/C][C]559889.0446[/C][C]608559.4702[/C][C]0.3702[/C][C]0.769[/C][C]1[/C][C]0.9841[/C][/ROW]
[ROW][C]64[/C][C]574761[/C][C]588766.632[/C][C]556875.5815[/C][C]620657.6826[/C][C]0.1947[/C][C]0.7026[/C][C]0.9997[/C][C]0.9724[/C][/ROW]
[ROW][C]65[/C][C]563250[/C][C]592561.4977[/C][C]553509.5583[/C][C]631613.4372[/C][C]0.0706[/C][C]0.8142[/C][C]0.9976[/C][C]0.9605[/C][/ROW]
[ROW][C]66[/C][C]551531[/C][C]592871.7579[/C][C]546913.5286[/C][C]638829.9871[/C][C]0.0389[/C][C]0.8968[/C][C]0.9919[/C][C]0.934[/C][/ROW]
[ROW][C]67[/C][C]537034[/C][C]580019.0821[/C][C]527356.4077[/C][C]632681.7564[/C][C]0.0548[/C][C]0.8555[/C][C]0.9821[/C][C]0.7984[/C][/ROW]
[ROW][C]68[/C][C]544686[/C][C]592710.9352[/C][C]533523.2591[/C][C]651898.6112[/C][C]0.0559[/C][C]0.9674[/C][C]0.9693[/C][C]0.8778[/C][/ROW]
[ROW][C]69[/C][C]600991[/C][C]643132.6022[/C][C]577588.7407[/C][C]708676.4637[/C][C]0.1038[/C][C]0.9984[/C][C]0.9546[/C][C]0.9948[/C][/ROW]
[ROW][C]70[/C][C]604378[/C][C]653214.2105[/C][C]581477.0241[/C][C]724951.3968[/C][C]0.0911[/C][C]0.9232[/C][C]0.9391[/C][C]0.9955[/C][/ROW]
[ROW][C]71[/C][C]586111[/C][C]637193.749[/C][C]559421.8626[/C][C]714965.6353[/C][C]0.099[/C][C]0.7959[/C][C]0.9234[/C][C]0.9776[/C][/ROW]
[ROW][C]72[/C][C]563668[/C][C]621193.0853[/C][C]537541.3483[/C][C]704844.8223[/C][C]0.0889[/C][C]0.7945[/C][C]0.9081[/C][C]0.932[/C][/ROW]
[ROW][C]73[/C][C]548604[/C][C]614313.9806[/C][C]524933.408[/C][C]703694.5533[/C][C]0.0748[/C][C]0.8666[/C][C]0.8933[/C][C]0.8933[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115076&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115076&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[61])
49501866-------
50516141-------
51528222-------
52532638-------
53536322-------
54536535-------
55523597-------
56536214-------
57586570-------
58596594-------
59580523-------
60564478-------
61557560-------
62575093571999.2044556089.5661587908.84270.35150.962410.9624
63580112584224.2574559889.0446608559.47020.37020.76910.9841
64574761588766.632556875.5815620657.68260.19470.70260.99970.9724
65563250592561.4977553509.5583631613.43720.07060.81420.99760.9605
66551531592871.7579546913.5286638829.98710.03890.89680.99190.934
67537034580019.0821527356.4077632681.75640.05480.85550.98210.7984
68544686592710.9352533523.2591651898.61120.05590.96740.96930.8778
69600991643132.6022577588.7407708676.46370.10380.99840.95460.9948
70604378653214.2105581477.0241724951.39680.09110.92320.93910.9955
71586111637193.749559421.8626714965.63530.0990.79590.92340.9776
72563668621193.0853537541.3483704844.82230.08890.79450.90810.932
73548604614313.9806524933.408703694.55330.07480.86660.89330.8933







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.01420.00545e-049571571.1811797630.9318893.1019
630.0213-0.0076e-0416910660.96711409221.74731187.1065
640.0276-0.02380.002196157727.988716346477.33244043.0777
650.0336-0.04950.0041859163899.592371596991.63278461.5006
660.0395-0.06970.00581709058260.4273142421521.702311934.0488
670.0463-0.07410.00621847717281.2219153976440.101812408.7244
680.0509-0.0810.00682306394399.2583192199533.271513863.6046
690.052-0.06550.00551775914636.3214147992886.360112165.2327
700.056-0.07480.00622384975453.3172198747954.443114097.7996
710.0623-0.08020.00672609447242.3126217453936.859414746.3194
720.0687-0.09260.00773309135439.7564275761286.646416606.0617
730.0742-0.1070.00894317801553.9688359816796.164118968.8375

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0142 & 0.0054 & 5e-04 & 9571571.1811 & 797630.9318 & 893.1019 \tabularnewline
63 & 0.0213 & -0.007 & 6e-04 & 16910660.9671 & 1409221.7473 & 1187.1065 \tabularnewline
64 & 0.0276 & -0.0238 & 0.002 & 196157727.9887 & 16346477.3324 & 4043.0777 \tabularnewline
65 & 0.0336 & -0.0495 & 0.0041 & 859163899.5923 & 71596991.6327 & 8461.5006 \tabularnewline
66 & 0.0395 & -0.0697 & 0.0058 & 1709058260.4273 & 142421521.7023 & 11934.0488 \tabularnewline
67 & 0.0463 & -0.0741 & 0.0062 & 1847717281.2219 & 153976440.1018 & 12408.7244 \tabularnewline
68 & 0.0509 & -0.081 & 0.0068 & 2306394399.2583 & 192199533.2715 & 13863.6046 \tabularnewline
69 & 0.052 & -0.0655 & 0.0055 & 1775914636.3214 & 147992886.3601 & 12165.2327 \tabularnewline
70 & 0.056 & -0.0748 & 0.0062 & 2384975453.3172 & 198747954.4431 & 14097.7996 \tabularnewline
71 & 0.0623 & -0.0802 & 0.0067 & 2609447242.3126 & 217453936.8594 & 14746.3194 \tabularnewline
72 & 0.0687 & -0.0926 & 0.0077 & 3309135439.7564 & 275761286.6464 & 16606.0617 \tabularnewline
73 & 0.0742 & -0.107 & 0.0089 & 4317801553.9688 & 359816796.1641 & 18968.8375 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115076&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]62[/C][C]0.0142[/C][C]0.0054[/C][C]5e-04[/C][C]9571571.1811[/C][C]797630.9318[/C][C]893.1019[/C][/ROW]
[ROW][C]63[/C][C]0.0213[/C][C]-0.007[/C][C]6e-04[/C][C]16910660.9671[/C][C]1409221.7473[/C][C]1187.1065[/C][/ROW]
[ROW][C]64[/C][C]0.0276[/C][C]-0.0238[/C][C]0.002[/C][C]196157727.9887[/C][C]16346477.3324[/C][C]4043.0777[/C][/ROW]
[ROW][C]65[/C][C]0.0336[/C][C]-0.0495[/C][C]0.0041[/C][C]859163899.5923[/C][C]71596991.6327[/C][C]8461.5006[/C][/ROW]
[ROW][C]66[/C][C]0.0395[/C][C]-0.0697[/C][C]0.0058[/C][C]1709058260.4273[/C][C]142421521.7023[/C][C]11934.0488[/C][/ROW]
[ROW][C]67[/C][C]0.0463[/C][C]-0.0741[/C][C]0.0062[/C][C]1847717281.2219[/C][C]153976440.1018[/C][C]12408.7244[/C][/ROW]
[ROW][C]68[/C][C]0.0509[/C][C]-0.081[/C][C]0.0068[/C][C]2306394399.2583[/C][C]192199533.2715[/C][C]13863.6046[/C][/ROW]
[ROW][C]69[/C][C]0.052[/C][C]-0.0655[/C][C]0.0055[/C][C]1775914636.3214[/C][C]147992886.3601[/C][C]12165.2327[/C][/ROW]
[ROW][C]70[/C][C]0.056[/C][C]-0.0748[/C][C]0.0062[/C][C]2384975453.3172[/C][C]198747954.4431[/C][C]14097.7996[/C][/ROW]
[ROW][C]71[/C][C]0.0623[/C][C]-0.0802[/C][C]0.0067[/C][C]2609447242.3126[/C][C]217453936.8594[/C][C]14746.3194[/C][/ROW]
[ROW][C]72[/C][C]0.0687[/C][C]-0.0926[/C][C]0.0077[/C][C]3309135439.7564[/C][C]275761286.6464[/C][C]16606.0617[/C][/ROW]
[ROW][C]73[/C][C]0.0742[/C][C]-0.107[/C][C]0.0089[/C][C]4317801553.9688[/C][C]359816796.1641[/C][C]18968.8375[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115076&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115076&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
620.01420.00545e-049571571.1811797630.9318893.1019
630.0213-0.0076e-0416910660.96711409221.74731187.1065
640.0276-0.02380.002196157727.988716346477.33244043.0777
650.0336-0.04950.0041859163899.592371596991.63278461.5006
660.0395-0.06970.00581709058260.4273142421521.702311934.0488
670.0463-0.07410.00621847717281.2219153976440.101812408.7244
680.0509-0.0810.00682306394399.2583192199533.271513863.6046
690.052-0.06550.00551775914636.3214147992886.360112165.2327
700.056-0.07480.00622384975453.3172198747954.443114097.7996
710.0623-0.08020.00672609447242.3126217453936.859414746.3194
720.0687-0.09260.00773309135439.7564275761286.646416606.0617
730.0742-0.1070.00894317801553.9688359816796.164118968.8375



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