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 computationSat, 20 Dec 2008 15:29:20 -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/Dec/20/t1229812235hisne7ife6ckwp1.htm/, Retrieved Sun, 19 May 2024 12:17:20 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35458, Retrieved Sun, 19 May 2024 12:17:20 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact126
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]
- RMPD  [Standard Deviation-Mean Plot] [Identification an...] [2008-12-07 14:45:52] [b943bd7078334192ff8343563ee31113]
- RM      [Variance Reduction Matrix] [Identification an...] [2008-12-07 14:47:22] [b943bd7078334192ff8343563ee31113]
- RMP       [(Partial) Autocorrelation Function] [Identification an...] [2008-12-07 14:51:36] [b943bd7078334192ff8343563ee31113]
F   P         [(Partial) Autocorrelation Function] [Identification an...] [2008-12-07 14:54:30] [b943bd7078334192ff8343563ee31113]
-   P           [(Partial) Autocorrelation Function] [Identification an...] [2008-12-07 14:58:01] [b943bd7078334192ff8343563ee31113]
F RMP             [Spectral Analysis] [Identification an...] [2008-12-07 15:02:51] [b943bd7078334192ff8343563ee31113]
F RMP               [(Partial) Autocorrelation Function] [Identification an...] [2008-12-07 15:05:29] [b943bd7078334192ff8343563ee31113]
F RMP                 [ARIMA Backward Selection] [Identification an...] [2008-12-07 15:45:38] [b943bd7078334192ff8343563ee31113]
-   P                   [ARIMA Backward Selection] [ARIMA Backward Mo...] [2008-12-12 14:46:56] [b943bd7078334192ff8343563ee31113]
- RMP                       [ARIMA Forecasting] [] [2008-12-20 22:29:20] [d76b387543b13b5e3afd8ff9e5fdc89f] [Current]
Feedback Forum

Post a new message
Dataseries X:
1593
1477.9
1733.7
1569.7
1843.7
1950.3
1657.5
1772.1
1568.3
1809.8
1646.7
1808.5
1763.9
1625.5
1538.8
1342.4
1645.1
1619.9
1338.1
1505.5
1529.1
1511.9
1656.7
1694.4
1662.3
1588.7
1483.3
1585.6
1658.9
1584.4
1470.6
1618.7
1407.6
1473.9
1515.3
1485.4
1496.1
1493.5
1298.4
1375.3
1507.9
1455.3
1363.3
1392.8
1348.8
1880.3
1669.2
1543.6
1701.2
1516.5
1466.8
1484.1
1577.2
1684.5
1414.7
1674.5
1598.7
1739.1
1674.6
1671.8
1802
1526.8
1580.9
1634.8
1610.3
1712
1678.8
1708.1
1680.6
2056
1624
2021.4
1861.1
1750.8
1767.5
1710.3
2151.5
2047.9
1915.4
1984.7
1896.5
2170.8
2139.9
2330.5
2121.8
2226.8
1857.9
2155.9
2341.7
2290.2
2006.5
2111.9
1731.3
1762.2
1863.2
1943.5
1975.2




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35458&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35458&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35458&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[85])
731861.1-------
741750.8-------
751767.5-------
761710.3-------
772151.5-------
782047.9-------
791915.4-------
801984.7-------
811896.5-------
822170.8-------
832139.9-------
842330.5-------
852121.8-------
862226.82012.91141720.71962424.63350.15430.30210.89390.3021
871857.91978.3481679.60622406.35190.29060.12760.83290.2556
882155.91953.05941647.05072398.72280.18620.66220.85720.229
892341.72187.14381794.37542800.04120.31060.53980.54540.5828
902290.22199.28641787.3422857.99320.39340.33590.67380.5912
912006.51963.56341616.58172500.20540.43770.11640.56980.2817
922111.92126.21391712.43012803.68310.48350.63550.65890.5051
931731.32008.03321623.84832630.34410.19170.37180.63730.3601
941762.22300.89951797.05363197.35160.11940.89350.6120.6523
951863.22180.63411711.33473004.58020.22510.84020.53860.5557
961943.52276.63691758.12713228.91330.24650.80260.45590.625
971975.22257.94681735.42793230.66580.28440.73680.60810.6081

\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[85]) \tabularnewline
73 & 1861.1 & - & - & - & - & - & - & - \tabularnewline
74 & 1750.8 & - & - & - & - & - & - & - \tabularnewline
75 & 1767.5 & - & - & - & - & - & - & - \tabularnewline
76 & 1710.3 & - & - & - & - & - & - & - \tabularnewline
77 & 2151.5 & - & - & - & - & - & - & - \tabularnewline
78 & 2047.9 & - & - & - & - & - & - & - \tabularnewline
79 & 1915.4 & - & - & - & - & - & - & - \tabularnewline
80 & 1984.7 & - & - & - & - & - & - & - \tabularnewline
81 & 1896.5 & - & - & - & - & - & - & - \tabularnewline
82 & 2170.8 & - & - & - & - & - & - & - \tabularnewline
83 & 2139.9 & - & - & - & - & - & - & - \tabularnewline
84 & 2330.5 & - & - & - & - & - & - & - \tabularnewline
85 & 2121.8 & - & - & - & - & - & - & - \tabularnewline
86 & 2226.8 & 2012.9114 & 1720.7196 & 2424.6335 & 0.1543 & 0.3021 & 0.8939 & 0.3021 \tabularnewline
87 & 1857.9 & 1978.348 & 1679.6062 & 2406.3519 & 0.2906 & 0.1276 & 0.8329 & 0.2556 \tabularnewline
88 & 2155.9 & 1953.0594 & 1647.0507 & 2398.7228 & 0.1862 & 0.6622 & 0.8572 & 0.229 \tabularnewline
89 & 2341.7 & 2187.1438 & 1794.3754 & 2800.0412 & 0.3106 & 0.5398 & 0.5454 & 0.5828 \tabularnewline
90 & 2290.2 & 2199.2864 & 1787.342 & 2857.9932 & 0.3934 & 0.3359 & 0.6738 & 0.5912 \tabularnewline
91 & 2006.5 & 1963.5634 & 1616.5817 & 2500.2054 & 0.4377 & 0.1164 & 0.5698 & 0.2817 \tabularnewline
92 & 2111.9 & 2126.2139 & 1712.4301 & 2803.6831 & 0.4835 & 0.6355 & 0.6589 & 0.5051 \tabularnewline
93 & 1731.3 & 2008.0332 & 1623.8483 & 2630.3441 & 0.1917 & 0.3718 & 0.6373 & 0.3601 \tabularnewline
94 & 1762.2 & 2300.8995 & 1797.0536 & 3197.3516 & 0.1194 & 0.8935 & 0.612 & 0.6523 \tabularnewline
95 & 1863.2 & 2180.6341 & 1711.3347 & 3004.5802 & 0.2251 & 0.8402 & 0.5386 & 0.5557 \tabularnewline
96 & 1943.5 & 2276.6369 & 1758.1271 & 3228.9133 & 0.2465 & 0.8026 & 0.4559 & 0.625 \tabularnewline
97 & 1975.2 & 2257.9468 & 1735.4279 & 3230.6658 & 0.2844 & 0.7368 & 0.6081 & 0.6081 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35458&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[85])[/C][/ROW]
[ROW][C]73[/C][C]1861.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]1750.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]1767.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]1710.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]2151.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]2047.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]1915.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]1984.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]1896.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]2170.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]2139.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]2330.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]2121.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]2226.8[/C][C]2012.9114[/C][C]1720.7196[/C][C]2424.6335[/C][C]0.1543[/C][C]0.3021[/C][C]0.8939[/C][C]0.3021[/C][/ROW]
[ROW][C]87[/C][C]1857.9[/C][C]1978.348[/C][C]1679.6062[/C][C]2406.3519[/C][C]0.2906[/C][C]0.1276[/C][C]0.8329[/C][C]0.2556[/C][/ROW]
[ROW][C]88[/C][C]2155.9[/C][C]1953.0594[/C][C]1647.0507[/C][C]2398.7228[/C][C]0.1862[/C][C]0.6622[/C][C]0.8572[/C][C]0.229[/C][/ROW]
[ROW][C]89[/C][C]2341.7[/C][C]2187.1438[/C][C]1794.3754[/C][C]2800.0412[/C][C]0.3106[/C][C]0.5398[/C][C]0.5454[/C][C]0.5828[/C][/ROW]
[ROW][C]90[/C][C]2290.2[/C][C]2199.2864[/C][C]1787.342[/C][C]2857.9932[/C][C]0.3934[/C][C]0.3359[/C][C]0.6738[/C][C]0.5912[/C][/ROW]
[ROW][C]91[/C][C]2006.5[/C][C]1963.5634[/C][C]1616.5817[/C][C]2500.2054[/C][C]0.4377[/C][C]0.1164[/C][C]0.5698[/C][C]0.2817[/C][/ROW]
[ROW][C]92[/C][C]2111.9[/C][C]2126.2139[/C][C]1712.4301[/C][C]2803.6831[/C][C]0.4835[/C][C]0.6355[/C][C]0.6589[/C][C]0.5051[/C][/ROW]
[ROW][C]93[/C][C]1731.3[/C][C]2008.0332[/C][C]1623.8483[/C][C]2630.3441[/C][C]0.1917[/C][C]0.3718[/C][C]0.6373[/C][C]0.3601[/C][/ROW]
[ROW][C]94[/C][C]1762.2[/C][C]2300.8995[/C][C]1797.0536[/C][C]3197.3516[/C][C]0.1194[/C][C]0.8935[/C][C]0.612[/C][C]0.6523[/C][/ROW]
[ROW][C]95[/C][C]1863.2[/C][C]2180.6341[/C][C]1711.3347[/C][C]3004.5802[/C][C]0.2251[/C][C]0.8402[/C][C]0.5386[/C][C]0.5557[/C][/ROW]
[ROW][C]96[/C][C]1943.5[/C][C]2276.6369[/C][C]1758.1271[/C][C]3228.9133[/C][C]0.2465[/C][C]0.8026[/C][C]0.4559[/C][C]0.625[/C][/ROW]
[ROW][C]97[/C][C]1975.2[/C][C]2257.9468[/C][C]1735.4279[/C][C]3230.6658[/C][C]0.2844[/C][C]0.7368[/C][C]0.6081[/C][C]0.6081[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35458&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35458&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[85])
731861.1-------
741750.8-------
751767.5-------
761710.3-------
772151.5-------
782047.9-------
791915.4-------
801984.7-------
811896.5-------
822170.8-------
832139.9-------
842330.5-------
852121.8-------
862226.82012.91141720.71962424.63350.15430.30210.89390.3021
871857.91978.3481679.60622406.35190.29060.12760.83290.2556
882155.91953.05941647.05072398.72280.18620.66220.85720.229
892341.72187.14381794.37542800.04120.31060.53980.54540.5828
902290.22199.28641787.3422857.99320.39340.33590.67380.5912
912006.51963.56341616.58172500.20540.43770.11640.56980.2817
922111.92126.21391712.43012803.68310.48350.63550.65890.5051
931731.32008.03321623.84832630.34410.19170.37180.63730.3601
941762.22300.89951797.05363197.35160.11940.89350.6120.6523
951863.22180.63411711.33473004.58020.22510.84020.53860.5557
961943.52276.63691758.12713228.91330.24650.80260.45590.625
971975.22257.94681735.42793230.66580.28440.73680.60810.6081







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
860.10440.10630.008945748.32063812.3661.7443
870.1104-0.06090.005114507.72791208.977334.7704
880.11640.10390.008741144.3033428.691958.555
890.1430.07070.005923887.60371990.633644.6165
900.15280.04130.00348265.2747688.772926.2445
910.13940.02190.00181843.5513153.629312.3947
920.1626-0.00676e-04204.887917.0744.1321
930.1581-0.13780.011576581.28566381.773879.886
940.1988-0.23410.0195290197.189824183.0992155.5092
950.1928-0.14560.0121100764.41088397.034291.6353
960.2134-0.14630.0122110980.18459248.348796.1683
970.2198-0.12520.010479945.73246662.144481.622

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
86 & 0.1044 & 0.1063 & 0.0089 & 45748.3206 & 3812.36 & 61.7443 \tabularnewline
87 & 0.1104 & -0.0609 & 0.0051 & 14507.7279 & 1208.9773 & 34.7704 \tabularnewline
88 & 0.1164 & 0.1039 & 0.0087 & 41144.303 & 3428.6919 & 58.555 \tabularnewline
89 & 0.143 & 0.0707 & 0.0059 & 23887.6037 & 1990.6336 & 44.6165 \tabularnewline
90 & 0.1528 & 0.0413 & 0.0034 & 8265.2747 & 688.7729 & 26.2445 \tabularnewline
91 & 0.1394 & 0.0219 & 0.0018 & 1843.5513 & 153.6293 & 12.3947 \tabularnewline
92 & 0.1626 & -0.0067 & 6e-04 & 204.8879 & 17.074 & 4.1321 \tabularnewline
93 & 0.1581 & -0.1378 & 0.0115 & 76581.2856 & 6381.7738 & 79.886 \tabularnewline
94 & 0.1988 & -0.2341 & 0.0195 & 290197.1898 & 24183.0992 & 155.5092 \tabularnewline
95 & 0.1928 & -0.1456 & 0.0121 & 100764.4108 & 8397.0342 & 91.6353 \tabularnewline
96 & 0.2134 & -0.1463 & 0.0122 & 110980.1845 & 9248.3487 & 96.1683 \tabularnewline
97 & 0.2198 & -0.1252 & 0.0104 & 79945.7324 & 6662.1444 & 81.622 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35458&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]86[/C][C]0.1044[/C][C]0.1063[/C][C]0.0089[/C][C]45748.3206[/C][C]3812.36[/C][C]61.7443[/C][/ROW]
[ROW][C]87[/C][C]0.1104[/C][C]-0.0609[/C][C]0.0051[/C][C]14507.7279[/C][C]1208.9773[/C][C]34.7704[/C][/ROW]
[ROW][C]88[/C][C]0.1164[/C][C]0.1039[/C][C]0.0087[/C][C]41144.303[/C][C]3428.6919[/C][C]58.555[/C][/ROW]
[ROW][C]89[/C][C]0.143[/C][C]0.0707[/C][C]0.0059[/C][C]23887.6037[/C][C]1990.6336[/C][C]44.6165[/C][/ROW]
[ROW][C]90[/C][C]0.1528[/C][C]0.0413[/C][C]0.0034[/C][C]8265.2747[/C][C]688.7729[/C][C]26.2445[/C][/ROW]
[ROW][C]91[/C][C]0.1394[/C][C]0.0219[/C][C]0.0018[/C][C]1843.5513[/C][C]153.6293[/C][C]12.3947[/C][/ROW]
[ROW][C]92[/C][C]0.1626[/C][C]-0.0067[/C][C]6e-04[/C][C]204.8879[/C][C]17.074[/C][C]4.1321[/C][/ROW]
[ROW][C]93[/C][C]0.1581[/C][C]-0.1378[/C][C]0.0115[/C][C]76581.2856[/C][C]6381.7738[/C][C]79.886[/C][/ROW]
[ROW][C]94[/C][C]0.1988[/C][C]-0.2341[/C][C]0.0195[/C][C]290197.1898[/C][C]24183.0992[/C][C]155.5092[/C][/ROW]
[ROW][C]95[/C][C]0.1928[/C][C]-0.1456[/C][C]0.0121[/C][C]100764.4108[/C][C]8397.0342[/C][C]91.6353[/C][/ROW]
[ROW][C]96[/C][C]0.2134[/C][C]-0.1463[/C][C]0.0122[/C][C]110980.1845[/C][C]9248.3487[/C][C]96.1683[/C][/ROW]
[ROW][C]97[/C][C]0.2198[/C][C]-0.1252[/C][C]0.0104[/C][C]79945.7324[/C][C]6662.1444[/C][C]81.622[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35458&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35458&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
860.10440.10630.008945748.32063812.3661.7443
870.1104-0.06090.005114507.72791208.977334.7704
880.11640.10390.008741144.3033428.691958.555
890.1430.07070.005923887.60371990.633644.6165
900.15280.04130.00348265.2747688.772926.2445
910.13940.02190.00181843.5513153.629312.3947
920.1626-0.00676e-04204.887917.0744.1321
930.1581-0.13780.011576581.28566381.773879.886
940.1988-0.23410.0195290197.189824183.0992155.5092
950.1928-0.14560.0121100764.41088397.034291.6353
960.2134-0.14630.0122110980.18459248.348796.1683
970.2198-0.12520.010479945.73246662.144481.622



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