Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 22 Dec 2012 08:19:18 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/22/t1356182385pi7kgoc45ebo6jo.htm/, Retrieved Fri, 26 Apr 2024 03:11:45 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=204505, Retrieved Fri, 26 Apr 2024 03:11:45 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact125
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
- R PD      [ARIMA Forecasting] [Workshop 9 (14)] [2012-12-02 13:35:50] [e31fe164d58995c48777312ee804d655]
-   P           [ARIMA Forecasting] [Paper arima voors...] [2012-12-22 13:19:18] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
655362
873127
1107897
1555964
1671159
1493308
2957796
2638691
1305669
1280496
921900
867888
652586
913831
1108544
1555827
1699283
1509458
3268975
2425016
1312703
1365498
934453
775019
651142
843192
1146766
1652601
1465906
1652734
2922334
2702805
1458956
1410363
1019279
936574
708917
885295
1099663
1576220
1487870
1488635
2882530
2677026
1404398
1344370
936865
872705
628151
953712
1160384
1400618
1661511
1495347
2918786
2775677
1407026
1370199
964526
850851
683118
847224
1073256
1514326
1503734
1507712
2865698
2788128
1391596
1366378
946295
859626




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' @ fisher.wessa.net

\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' @ fisher.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=204505&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' @ fisher.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=204505&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=204505&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' @ fisher.wessa.net







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[60])
48872705-------
49628151-------
50953712-------
511160384-------
521400618-------
531661511-------
541495347-------
552918786-------
562775677-------
571407026-------
581370199-------
59964526-------
60850851-------
61683118647978.9063465028.5102830929.30240.35330.01490.58410.0149
62847224899885.3501712421.78591087348.91440.2910.98830.28680.6959
6310732561145226.5127957762.94851332690.07690.22590.99910.4370.999
6415143261526539.02611339075.46191714002.59030.449210.9061
6515037341557677.5771370214.01271745141.14120.28640.67480.13881
6615077121555020.82591367557.26161742484.39010.31040.70410.73371
6728656982914245.00072726781.43653101708.56490.305910.48111
6827881282731457.35432543993.79012918920.91850.27680.08020.32191
6913915961426648.04671239184.48251614111.6110.35700.58131
7013663781381495.60531194032.04111568959.16950.43720.45790.5471
71946295981156.8335793693.26931168620.39770.357700.5690.9135
72859626887512.0944700048.53021074975.65860.38530.26940.64930.6493

\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[60]) \tabularnewline
48 & 872705 & - & - & - & - & - & - & - \tabularnewline
49 & 628151 & - & - & - & - & - & - & - \tabularnewline
50 & 953712 & - & - & - & - & - & - & - \tabularnewline
51 & 1160384 & - & - & - & - & - & - & - \tabularnewline
52 & 1400618 & - & - & - & - & - & - & - \tabularnewline
53 & 1661511 & - & - & - & - & - & - & - \tabularnewline
54 & 1495347 & - & - & - & - & - & - & - \tabularnewline
55 & 2918786 & - & - & - & - & - & - & - \tabularnewline
56 & 2775677 & - & - & - & - & - & - & - \tabularnewline
57 & 1407026 & - & - & - & - & - & - & - \tabularnewline
58 & 1370199 & - & - & - & - & - & - & - \tabularnewline
59 & 964526 & - & - & - & - & - & - & - \tabularnewline
60 & 850851 & - & - & - & - & - & - & - \tabularnewline
61 & 683118 & 647978.9063 & 465028.5102 & 830929.3024 & 0.3533 & 0.0149 & 0.5841 & 0.0149 \tabularnewline
62 & 847224 & 899885.3501 & 712421.7859 & 1087348.9144 & 0.291 & 0.9883 & 0.2868 & 0.6959 \tabularnewline
63 & 1073256 & 1145226.5127 & 957762.9485 & 1332690.0769 & 0.2259 & 0.9991 & 0.437 & 0.999 \tabularnewline
64 & 1514326 & 1526539.0261 & 1339075.4619 & 1714002.5903 & 0.4492 & 1 & 0.906 & 1 \tabularnewline
65 & 1503734 & 1557677.577 & 1370214.0127 & 1745141.1412 & 0.2864 & 0.6748 & 0.1388 & 1 \tabularnewline
66 & 1507712 & 1555020.8259 & 1367557.2616 & 1742484.3901 & 0.3104 & 0.7041 & 0.7337 & 1 \tabularnewline
67 & 2865698 & 2914245.0007 & 2726781.4365 & 3101708.5649 & 0.3059 & 1 & 0.4811 & 1 \tabularnewline
68 & 2788128 & 2731457.3543 & 2543993.7901 & 2918920.9185 & 0.2768 & 0.0802 & 0.3219 & 1 \tabularnewline
69 & 1391596 & 1426648.0467 & 1239184.4825 & 1614111.611 & 0.357 & 0 & 0.5813 & 1 \tabularnewline
70 & 1366378 & 1381495.6053 & 1194032.0411 & 1568959.1695 & 0.4372 & 0.4579 & 0.547 & 1 \tabularnewline
71 & 946295 & 981156.8335 & 793693.2693 & 1168620.3977 & 0.3577 & 0 & 0.569 & 0.9135 \tabularnewline
72 & 859626 & 887512.0944 & 700048.5302 & 1074975.6586 & 0.3853 & 0.2694 & 0.6493 & 0.6493 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=204505&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[60])[/C][/ROW]
[ROW][C]48[/C][C]872705[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]628151[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]953712[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]1160384[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]1400618[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]1661511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]1495347[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]2918786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]2775677[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1407026[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1370199[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]964526[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]850851[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]683118[/C][C]647978.9063[/C][C]465028.5102[/C][C]830929.3024[/C][C]0.3533[/C][C]0.0149[/C][C]0.5841[/C][C]0.0149[/C][/ROW]
[ROW][C]62[/C][C]847224[/C][C]899885.3501[/C][C]712421.7859[/C][C]1087348.9144[/C][C]0.291[/C][C]0.9883[/C][C]0.2868[/C][C]0.6959[/C][/ROW]
[ROW][C]63[/C][C]1073256[/C][C]1145226.5127[/C][C]957762.9485[/C][C]1332690.0769[/C][C]0.2259[/C][C]0.9991[/C][C]0.437[/C][C]0.999[/C][/ROW]
[ROW][C]64[/C][C]1514326[/C][C]1526539.0261[/C][C]1339075.4619[/C][C]1714002.5903[/C][C]0.4492[/C][C]1[/C][C]0.906[/C][C]1[/C][/ROW]
[ROW][C]65[/C][C]1503734[/C][C]1557677.577[/C][C]1370214.0127[/C][C]1745141.1412[/C][C]0.2864[/C][C]0.6748[/C][C]0.1388[/C][C]1[/C][/ROW]
[ROW][C]66[/C][C]1507712[/C][C]1555020.8259[/C][C]1367557.2616[/C][C]1742484.3901[/C][C]0.3104[/C][C]0.7041[/C][C]0.7337[/C][C]1[/C][/ROW]
[ROW][C]67[/C][C]2865698[/C][C]2914245.0007[/C][C]2726781.4365[/C][C]3101708.5649[/C][C]0.3059[/C][C]1[/C][C]0.4811[/C][C]1[/C][/ROW]
[ROW][C]68[/C][C]2788128[/C][C]2731457.3543[/C][C]2543993.7901[/C][C]2918920.9185[/C][C]0.2768[/C][C]0.0802[/C][C]0.3219[/C][C]1[/C][/ROW]
[ROW][C]69[/C][C]1391596[/C][C]1426648.0467[/C][C]1239184.4825[/C][C]1614111.611[/C][C]0.357[/C][C]0[/C][C]0.5813[/C][C]1[/C][/ROW]
[ROW][C]70[/C][C]1366378[/C][C]1381495.6053[/C][C]1194032.0411[/C][C]1568959.1695[/C][C]0.4372[/C][C]0.4579[/C][C]0.547[/C][C]1[/C][/ROW]
[ROW][C]71[/C][C]946295[/C][C]981156.8335[/C][C]793693.2693[/C][C]1168620.3977[/C][C]0.3577[/C][C]0[/C][C]0.569[/C][C]0.9135[/C][/ROW]
[ROW][C]72[/C][C]859626[/C][C]887512.0944[/C][C]700048.5302[/C][C]1074975.6586[/C][C]0.3853[/C][C]0.2694[/C][C]0.6493[/C][C]0.6493[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=204505&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=204505&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[60])
48872705-------
49628151-------
50953712-------
511160384-------
521400618-------
531661511-------
541495347-------
552918786-------
562775677-------
571407026-------
581370199-------
59964526-------
60850851-------
61683118647978.9063465028.5102830929.30240.35330.01490.58410.0149
62847224899885.3501712421.78591087348.91440.2910.98830.28680.6959
6310732561145226.5127957762.94851332690.07690.22590.99910.4370.999
6415143261526539.02611339075.46191714002.59030.449210.9061
6515037341557677.5771370214.01271745141.14120.28640.67480.13881
6615077121555020.82591367557.26161742484.39010.31040.70410.73371
6728656982914245.00072726781.43653101708.56490.305910.48111
6827881282731457.35432543993.79012918920.91850.27680.08020.32191
6913915961426648.04671239184.48251614111.6110.35700.58131
7013663781381495.60531194032.04111568959.16950.43720.45790.5471
71946295981156.8335793693.26931168620.39770.357700.5690.9135
72859626887512.0944700048.53021074975.65860.38530.26940.64930.6493







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.14410.054201234755905.77600
620.1063-0.05850.05642773217798.70332003986852.239644765.9117
630.0835-0.06280.05855179754697.89253062576134.123955340.5469
640.0627-0.0080.0459149158006.88582334221602.314448313.7827
650.0614-0.03460.04362909909494.30192449359180.711949491.001
660.0615-0.03040.04142238125003.4942414153484.508949134.0359
670.0328-0.01670.03792356811278.32422405961740.768249050.6039
680.0350.02070.03583211562084.03162506661783.676150066.5735
690.067-0.02460.03451228645980.17852364660027.73248627.7701
700.0692-0.01090.0322228541990.21192151048223.9846379.3944
710.0975-0.03550.03251215347436.00232065984515.98245453.1024
720.1078-0.03140.0324777634261.74431958621994.795544256.3215

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.1441 & 0.0542 & 0 & 1234755905.776 & 0 & 0 \tabularnewline
62 & 0.1063 & -0.0585 & 0.0564 & 2773217798.7033 & 2003986852.2396 & 44765.9117 \tabularnewline
63 & 0.0835 & -0.0628 & 0.0585 & 5179754697.8925 & 3062576134.1239 & 55340.5469 \tabularnewline
64 & 0.0627 & -0.008 & 0.0459 & 149158006.8858 & 2334221602.3144 & 48313.7827 \tabularnewline
65 & 0.0614 & -0.0346 & 0.0436 & 2909909494.3019 & 2449359180.7119 & 49491.001 \tabularnewline
66 & 0.0615 & -0.0304 & 0.0414 & 2238125003.494 & 2414153484.5089 & 49134.0359 \tabularnewline
67 & 0.0328 & -0.0167 & 0.0379 & 2356811278.3242 & 2405961740.7682 & 49050.6039 \tabularnewline
68 & 0.035 & 0.0207 & 0.0358 & 3211562084.0316 & 2506661783.6761 & 50066.5735 \tabularnewline
69 & 0.067 & -0.0246 & 0.0345 & 1228645980.1785 & 2364660027.732 & 48627.7701 \tabularnewline
70 & 0.0692 & -0.0109 & 0.0322 & 228541990.2119 & 2151048223.98 & 46379.3944 \tabularnewline
71 & 0.0975 & -0.0355 & 0.0325 & 1215347436.0023 & 2065984515.982 & 45453.1024 \tabularnewline
72 & 0.1078 & -0.0314 & 0.0324 & 777634261.7443 & 1958621994.7955 & 44256.3215 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=204505&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]61[/C][C]0.1441[/C][C]0.0542[/C][C]0[/C][C]1234755905.776[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.1063[/C][C]-0.0585[/C][C]0.0564[/C][C]2773217798.7033[/C][C]2003986852.2396[/C][C]44765.9117[/C][/ROW]
[ROW][C]63[/C][C]0.0835[/C][C]-0.0628[/C][C]0.0585[/C][C]5179754697.8925[/C][C]3062576134.1239[/C][C]55340.5469[/C][/ROW]
[ROW][C]64[/C][C]0.0627[/C][C]-0.008[/C][C]0.0459[/C][C]149158006.8858[/C][C]2334221602.3144[/C][C]48313.7827[/C][/ROW]
[ROW][C]65[/C][C]0.0614[/C][C]-0.0346[/C][C]0.0436[/C][C]2909909494.3019[/C][C]2449359180.7119[/C][C]49491.001[/C][/ROW]
[ROW][C]66[/C][C]0.0615[/C][C]-0.0304[/C][C]0.0414[/C][C]2238125003.494[/C][C]2414153484.5089[/C][C]49134.0359[/C][/ROW]
[ROW][C]67[/C][C]0.0328[/C][C]-0.0167[/C][C]0.0379[/C][C]2356811278.3242[/C][C]2405961740.7682[/C][C]49050.6039[/C][/ROW]
[ROW][C]68[/C][C]0.035[/C][C]0.0207[/C][C]0.0358[/C][C]3211562084.0316[/C][C]2506661783.6761[/C][C]50066.5735[/C][/ROW]
[ROW][C]69[/C][C]0.067[/C][C]-0.0246[/C][C]0.0345[/C][C]1228645980.1785[/C][C]2364660027.732[/C][C]48627.7701[/C][/ROW]
[ROW][C]70[/C][C]0.0692[/C][C]-0.0109[/C][C]0.0322[/C][C]228541990.2119[/C][C]2151048223.98[/C][C]46379.3944[/C][/ROW]
[ROW][C]71[/C][C]0.0975[/C][C]-0.0355[/C][C]0.0325[/C][C]1215347436.0023[/C][C]2065984515.982[/C][C]45453.1024[/C][/ROW]
[ROW][C]72[/C][C]0.1078[/C][C]-0.0314[/C][C]0.0324[/C][C]777634261.7443[/C][C]1958621994.7955[/C][C]44256.3215[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=204505&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=204505&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
610.14410.054201234755905.77600
620.1063-0.05850.05642773217798.70332003986852.239644765.9117
630.0835-0.06280.05855179754697.89253062576134.123955340.5469
640.0627-0.0080.0459149158006.88582334221602.314448313.7827
650.0614-0.03460.04362909909494.30192449359180.711949491.001
660.0615-0.03040.04142238125003.4942414153484.508949134.0359
670.0328-0.01670.03792356811278.32422405961740.768249050.6039
680.0350.02070.03583211562084.03162506661783.676150066.5735
690.067-0.02460.03451228645980.17852364660027.73248627.7701
700.0692-0.01090.0322228541990.21192151048223.9846379.3944
710.0975-0.03550.03251215347436.00232065984515.98245453.1024
720.1078-0.03140.0324777634261.74431958621994.795544256.3215



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