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 computationThu, 11 Dec 2008 11:25:54 -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/11/t12290199994dl5owipwgsj8a6.htm/, Retrieved Fri, 17 May 2024 20:20:06 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=32422, Retrieved Fri, 17 May 2024 20:20:06 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact192
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Multiple Regression] [] [2007-11-19 20:22:41] [3a1956effdcb54c39e5044435310d6c8]
-    D  [Multiple Regression] [seatbelt_3.2.] [2008-11-23 14:44:53] [922d8ae7bd2fd460a62d9020ccd4931a]
F   PD    [Multiple Regression] [seatbelt3CG2] [2008-11-23 15:00:12] [922d8ae7bd2fd460a62d9020ccd4931a]
-   PD      [Multiple Regression] [dummy] [2008-12-07 12:19:24] [922d8ae7bd2fd460a62d9020ccd4931a]
-    D        [Multiple Regression] [dummy3] [2008-12-11 14:24:38] [922d8ae7bd2fd460a62d9020ccd4931a]
- RMPD          [Standard Deviation-Mean Plot] [lambda] [2008-12-11 16:25:56] [922d8ae7bd2fd460a62d9020ccd4931a]
- RM D            [Variance Reduction Matrix] [denD] [2008-12-11 16:30:20] [922d8ae7bd2fd460a62d9020ccd4931a]
- RMP               [(Partial) Autocorrelation Function] [autocorrelation] [2008-12-11 16:35:54] [922d8ae7bd2fd460a62d9020ccd4931a]
-   P                 [(Partial) Autocorrelation Function] [autocorrelation2] [2008-12-11 16:40:41] [922d8ae7bd2fd460a62d9020ccd4931a]
- RMP                   [Spectral Analysis] [spectrum] [2008-12-11 16:45:17] [922d8ae7bd2fd460a62d9020ccd4931a]
-   P                     [Spectral Analysis] [spectrum2] [2008-12-11 16:48:27] [922d8ae7bd2fd460a62d9020ccd4931a]
- RMP                       [(Partial) Autocorrelation Function] [autocorrelation] [2008-12-11 17:56:59] [922d8ae7bd2fd460a62d9020ccd4931a]
- RMP                         [ARIMA Backward Selection] [ARMAproces] [2008-12-11 18:10:55] [922d8ae7bd2fd460a62d9020ccd4931a]
- RMP                             [ARIMA Forecasting] [ARIMAforecasting] [2008-12-11 18:25:54] [89a49ebb3ece8e9a225c7f9f53a14c57] [Current]
Feedback Forum

Post a new message
Dataseries X:
1375.06
1334.38
1335.61
1307.24
1183.2
1187.79
1270.81
1238.67
1204.45
1178.5
1044.64
1076.59
1129.68
1144.93
1140.21
1100.29
1153.79
1114.2
1079.27
1014.05
903.69
912.55
867.81
854.54
911.17
899.26
895.87
837.61
846.62
890.19
935.96
988
992.55
989.53
1019.44
1038.73
1049.9
1080.64
1132.52
1143.37
1123.98
1133.07
1102.78
1132.76
1105.85
1088.93
1117.66
1118.07
1168.94
1199.21
1181.4
1199.63
1194.9
1164.42
1178.28
1202.25
1222.24
1224.27
1225.91
1191.96
1237.37
1262.07
1278.72
1276.65
1293.83
1302.18
1290
1253.12
1260.24
1287.15
1317.81
1363.38
1388.63
1416.42
1424.16
1444.65
1406.95
1463.65
1511.14
1514.49
1520.98
1454.62
1497.12
1539.66
1463.39
1479.23
1378.76
1354.87
1316.94
1370.47
1403.22
1341.25
1257.33
1281.47
1216.93
969.13
883.04




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32422&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32422&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32422&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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])
731388.63-------
741416.42-------
751424.16-------
761444.65-------
771406.95-------
781463.65-------
791511.14-------
801514.49-------
811520.98-------
821454.62-------
831497.12-------
841539.66-------
851463.39-------
861479.231453.72641379.80311527.64970.24950.39890.83870.3989
871378.761460.37041340.62861580.11230.09080.37880.72330.4803
881354.871455.80251311.65121599.95380.0850.85260.56030.4589
891316.941458.94311289.08611628.80010.05060.88510.72570.4795
901370.471456.78381267.6211645.94670.18560.92630.47160.4727
911403.221458.26841249.72911666.80770.30240.79540.30960.4808
921341.251457.24771232.17541682.320.15620.6810.30910.4787
931257.331457.94951216.71581699.18310.05150.82850.30430.4824
941281.471457.4671201.58361713.35040.08880.93740.50870.4819
951216.931457.79871187.7381727.85940.04020.89970.38770.4838
96969.131457.57061174.25181740.88944e-040.9520.28510.4839
97883.041457.72741161.6051753.84981e-040.99940.48510.4851

\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 & 1388.63 & - & - & - & - & - & - & - \tabularnewline
74 & 1416.42 & - & - & - & - & - & - & - \tabularnewline
75 & 1424.16 & - & - & - & - & - & - & - \tabularnewline
76 & 1444.65 & - & - & - & - & - & - & - \tabularnewline
77 & 1406.95 & - & - & - & - & - & - & - \tabularnewline
78 & 1463.65 & - & - & - & - & - & - & - \tabularnewline
79 & 1511.14 & - & - & - & - & - & - & - \tabularnewline
80 & 1514.49 & - & - & - & - & - & - & - \tabularnewline
81 & 1520.98 & - & - & - & - & - & - & - \tabularnewline
82 & 1454.62 & - & - & - & - & - & - & - \tabularnewline
83 & 1497.12 & - & - & - & - & - & - & - \tabularnewline
84 & 1539.66 & - & - & - & - & - & - & - \tabularnewline
85 & 1463.39 & - & - & - & - & - & - & - \tabularnewline
86 & 1479.23 & 1453.7264 & 1379.8031 & 1527.6497 & 0.2495 & 0.3989 & 0.8387 & 0.3989 \tabularnewline
87 & 1378.76 & 1460.3704 & 1340.6286 & 1580.1123 & 0.0908 & 0.3788 & 0.7233 & 0.4803 \tabularnewline
88 & 1354.87 & 1455.8025 & 1311.6512 & 1599.9538 & 0.085 & 0.8526 & 0.5603 & 0.4589 \tabularnewline
89 & 1316.94 & 1458.9431 & 1289.0861 & 1628.8001 & 0.0506 & 0.8851 & 0.7257 & 0.4795 \tabularnewline
90 & 1370.47 & 1456.7838 & 1267.621 & 1645.9467 & 0.1856 & 0.9263 & 0.4716 & 0.4727 \tabularnewline
91 & 1403.22 & 1458.2684 & 1249.7291 & 1666.8077 & 0.3024 & 0.7954 & 0.3096 & 0.4808 \tabularnewline
92 & 1341.25 & 1457.2477 & 1232.1754 & 1682.32 & 0.1562 & 0.681 & 0.3091 & 0.4787 \tabularnewline
93 & 1257.33 & 1457.9495 & 1216.7158 & 1699.1831 & 0.0515 & 0.8285 & 0.3043 & 0.4824 \tabularnewline
94 & 1281.47 & 1457.467 & 1201.5836 & 1713.3504 & 0.0888 & 0.9374 & 0.5087 & 0.4819 \tabularnewline
95 & 1216.93 & 1457.7987 & 1187.738 & 1727.8594 & 0.0402 & 0.8997 & 0.3877 & 0.4838 \tabularnewline
96 & 969.13 & 1457.5706 & 1174.2518 & 1740.8894 & 4e-04 & 0.952 & 0.2851 & 0.4839 \tabularnewline
97 & 883.04 & 1457.7274 & 1161.605 & 1753.8498 & 1e-04 & 0.9994 & 0.4851 & 0.4851 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32422&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]1388.63[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]1416.42[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]1424.16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]1444.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]1406.95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]1463.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]1511.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]1514.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]1520.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]1454.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]1497.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]1539.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]1463.39[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]1479.23[/C][C]1453.7264[/C][C]1379.8031[/C][C]1527.6497[/C][C]0.2495[/C][C]0.3989[/C][C]0.8387[/C][C]0.3989[/C][/ROW]
[ROW][C]87[/C][C]1378.76[/C][C]1460.3704[/C][C]1340.6286[/C][C]1580.1123[/C][C]0.0908[/C][C]0.3788[/C][C]0.7233[/C][C]0.4803[/C][/ROW]
[ROW][C]88[/C][C]1354.87[/C][C]1455.8025[/C][C]1311.6512[/C][C]1599.9538[/C][C]0.085[/C][C]0.8526[/C][C]0.5603[/C][C]0.4589[/C][/ROW]
[ROW][C]89[/C][C]1316.94[/C][C]1458.9431[/C][C]1289.0861[/C][C]1628.8001[/C][C]0.0506[/C][C]0.8851[/C][C]0.7257[/C][C]0.4795[/C][/ROW]
[ROW][C]90[/C][C]1370.47[/C][C]1456.7838[/C][C]1267.621[/C][C]1645.9467[/C][C]0.1856[/C][C]0.9263[/C][C]0.4716[/C][C]0.4727[/C][/ROW]
[ROW][C]91[/C][C]1403.22[/C][C]1458.2684[/C][C]1249.7291[/C][C]1666.8077[/C][C]0.3024[/C][C]0.7954[/C][C]0.3096[/C][C]0.4808[/C][/ROW]
[ROW][C]92[/C][C]1341.25[/C][C]1457.2477[/C][C]1232.1754[/C][C]1682.32[/C][C]0.1562[/C][C]0.681[/C][C]0.3091[/C][C]0.4787[/C][/ROW]
[ROW][C]93[/C][C]1257.33[/C][C]1457.9495[/C][C]1216.7158[/C][C]1699.1831[/C][C]0.0515[/C][C]0.8285[/C][C]0.3043[/C][C]0.4824[/C][/ROW]
[ROW][C]94[/C][C]1281.47[/C][C]1457.467[/C][C]1201.5836[/C][C]1713.3504[/C][C]0.0888[/C][C]0.9374[/C][C]0.5087[/C][C]0.4819[/C][/ROW]
[ROW][C]95[/C][C]1216.93[/C][C]1457.7987[/C][C]1187.738[/C][C]1727.8594[/C][C]0.0402[/C][C]0.8997[/C][C]0.3877[/C][C]0.4838[/C][/ROW]
[ROW][C]96[/C][C]969.13[/C][C]1457.5706[/C][C]1174.2518[/C][C]1740.8894[/C][C]4e-04[/C][C]0.952[/C][C]0.2851[/C][C]0.4839[/C][/ROW]
[ROW][C]97[/C][C]883.04[/C][C]1457.7274[/C][C]1161.605[/C][C]1753.8498[/C][C]1e-04[/C][C]0.9994[/C][C]0.4851[/C][C]0.4851[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32422&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32422&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])
731388.63-------
741416.42-------
751424.16-------
761444.65-------
771406.95-------
781463.65-------
791511.14-------
801514.49-------
811520.98-------
821454.62-------
831497.12-------
841539.66-------
851463.39-------
861479.231453.72641379.80311527.64970.24950.39890.83870.3989
871378.761460.37041340.62861580.11230.09080.37880.72330.4803
881354.871455.80251311.65121599.95380.0850.85260.56030.4589
891316.941458.94311289.08611628.80010.05060.88510.72570.4795
901370.471456.78381267.6211645.94670.18560.92630.47160.4727
911403.221458.26841249.72911666.80770.30240.79540.30960.4808
921341.251457.24771232.17541682.320.15620.6810.30910.4787
931257.331457.94951216.71581699.18310.05150.82850.30430.4824
941281.471457.4671201.58361713.35040.08880.93740.50870.4819
951216.931457.79871187.7381727.85940.04020.89970.38770.4838
96969.131457.57061174.25181740.88944e-040.9520.28510.4839
97883.041457.72741161.6051753.84981e-040.99940.48510.4851







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
860.02590.01750.0015650.432154.20277.3622
870.0418-0.05590.00476660.2634555.02223.5589
880.0505-0.06930.005810187.3644848.94729.1367
890.0594-0.09730.008120164.87811680.406540.9928
900.0662-0.05920.00497450.0753620.839624.9167
910.073-0.03770.00313030.3249252.527115.8911
920.0788-0.07960.006613455.46641121.288933.4857
930.0844-0.13760.011540248.16533354.013857.9138
940.0896-0.12080.010130974.93562581.244650.806
950.0945-0.16520.013858017.72814834.810769.5328
960.0992-0.33510.0279238574.246819881.1872141.0007
970.1036-0.39420.0329330265.643327522.1369165.898

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
86 & 0.0259 & 0.0175 & 0.0015 & 650.4321 & 54.2027 & 7.3622 \tabularnewline
87 & 0.0418 & -0.0559 & 0.0047 & 6660.2634 & 555.022 & 23.5589 \tabularnewline
88 & 0.0505 & -0.0693 & 0.0058 & 10187.3644 & 848.947 & 29.1367 \tabularnewline
89 & 0.0594 & -0.0973 & 0.0081 & 20164.8781 & 1680.4065 & 40.9928 \tabularnewline
90 & 0.0662 & -0.0592 & 0.0049 & 7450.0753 & 620.8396 & 24.9167 \tabularnewline
91 & 0.073 & -0.0377 & 0.0031 & 3030.3249 & 252.5271 & 15.8911 \tabularnewline
92 & 0.0788 & -0.0796 & 0.0066 & 13455.4664 & 1121.2889 & 33.4857 \tabularnewline
93 & 0.0844 & -0.1376 & 0.0115 & 40248.1653 & 3354.0138 & 57.9138 \tabularnewline
94 & 0.0896 & -0.1208 & 0.0101 & 30974.9356 & 2581.2446 & 50.806 \tabularnewline
95 & 0.0945 & -0.1652 & 0.0138 & 58017.7281 & 4834.8107 & 69.5328 \tabularnewline
96 & 0.0992 & -0.3351 & 0.0279 & 238574.2468 & 19881.1872 & 141.0007 \tabularnewline
97 & 0.1036 & -0.3942 & 0.0329 & 330265.6433 & 27522.1369 & 165.898 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32422&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.0259[/C][C]0.0175[/C][C]0.0015[/C][C]650.4321[/C][C]54.2027[/C][C]7.3622[/C][/ROW]
[ROW][C]87[/C][C]0.0418[/C][C]-0.0559[/C][C]0.0047[/C][C]6660.2634[/C][C]555.022[/C][C]23.5589[/C][/ROW]
[ROW][C]88[/C][C]0.0505[/C][C]-0.0693[/C][C]0.0058[/C][C]10187.3644[/C][C]848.947[/C][C]29.1367[/C][/ROW]
[ROW][C]89[/C][C]0.0594[/C][C]-0.0973[/C][C]0.0081[/C][C]20164.8781[/C][C]1680.4065[/C][C]40.9928[/C][/ROW]
[ROW][C]90[/C][C]0.0662[/C][C]-0.0592[/C][C]0.0049[/C][C]7450.0753[/C][C]620.8396[/C][C]24.9167[/C][/ROW]
[ROW][C]91[/C][C]0.073[/C][C]-0.0377[/C][C]0.0031[/C][C]3030.3249[/C][C]252.5271[/C][C]15.8911[/C][/ROW]
[ROW][C]92[/C][C]0.0788[/C][C]-0.0796[/C][C]0.0066[/C][C]13455.4664[/C][C]1121.2889[/C][C]33.4857[/C][/ROW]
[ROW][C]93[/C][C]0.0844[/C][C]-0.1376[/C][C]0.0115[/C][C]40248.1653[/C][C]3354.0138[/C][C]57.9138[/C][/ROW]
[ROW][C]94[/C][C]0.0896[/C][C]-0.1208[/C][C]0.0101[/C][C]30974.9356[/C][C]2581.2446[/C][C]50.806[/C][/ROW]
[ROW][C]95[/C][C]0.0945[/C][C]-0.1652[/C][C]0.0138[/C][C]58017.7281[/C][C]4834.8107[/C][C]69.5328[/C][/ROW]
[ROW][C]96[/C][C]0.0992[/C][C]-0.3351[/C][C]0.0279[/C][C]238574.2468[/C][C]19881.1872[/C][C]141.0007[/C][/ROW]
[ROW][C]97[/C][C]0.1036[/C][C]-0.3942[/C][C]0.0329[/C][C]330265.6433[/C][C]27522.1369[/C][C]165.898[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32422&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32422&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.02590.01750.0015650.432154.20277.3622
870.0418-0.05590.00476660.2634555.02223.5589
880.0505-0.06930.005810187.3644848.94729.1367
890.0594-0.09730.008120164.87811680.406540.9928
900.0662-0.05920.00497450.0753620.839624.9167
910.073-0.03770.00313030.3249252.527115.8911
920.0788-0.07960.006613455.46641121.288933.4857
930.0844-0.13760.011540248.16533354.013857.9138
940.0896-0.12080.010130974.93562581.244650.806
950.0945-0.16520.013858017.72814834.810769.5328
960.0992-0.33510.0279238574.246819881.1872141.0007
970.1036-0.39420.0329330265.643327522.1369165.898



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