Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 05 Dec 2007 13:33:33 -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/2007/Dec/05/t1196886116puzgpn1uzj2aqg3.htm/, Retrieved Thu, 02 May 2024 19:03:09 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2511, Retrieved Thu, 02 May 2024 19:03:09 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact234
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMAFORChuwG3] [2007-12-05 20:33:33] [142ab5472309a9ae9a3b52678758dc4a] [Current]
Feedback Forum

Post a new message
Dataseries X:
1178
2141
2238
2685
4341
5376
4478
6404
4617
3024
1897
2075
1351
2211
2453
3042
4765
4992
4601
6266
4812
3159
1916
2237
1595
2453
2226
3597
4706
4974
5756
5493
5004
3225
2006
2291
1588
2105
2191
3591
4668
4885
5822
5599
5340
3082
2010
2301
1514
1979
2480
3499
4676
5585
5610
5796
6199
3030
1930
2552




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2511&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]2 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=2511&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2511&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 time2 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[48])
362291-------
371588-------
382105-------
392191-------
403591-------
414668-------
424885-------
435822-------
445599-------
455340-------
463082-------
472010-------
482301-------
4915141614.02041075.53162152.50920.35790.00620.53770.0062
5019792119.47991540.3252698.63470.31720.97980.51950.2695
5124802206.88871622.2722791.50550.17990.77760.52120.3762
5234993606.98073018.14344195.8180.35960.99990.52121
5346764682.22874093.26365271.19380.491710.51891
5455854898.81434308.34195489.28670.01140.77020.51831
5556105835.12075243.63736426.6040.22780.79640.51731
5657965611.37165019.15236203.5910.27060.50180.51631
5761995351.77154758.74815944.79490.00260.0710.51551
5830303093.16112499.45843686.86380.417400.51470.9955
5919302020.58191426.27332614.89050.38264e-040.51390.1775
6025522311.0411716.17772905.90430.21360.89530.51320.5132

\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[48]) \tabularnewline
36 & 2291 & - & - & - & - & - & - & - \tabularnewline
37 & 1588 & - & - & - & - & - & - & - \tabularnewline
38 & 2105 & - & - & - & - & - & - & - \tabularnewline
39 & 2191 & - & - & - & - & - & - & - \tabularnewline
40 & 3591 & - & - & - & - & - & - & - \tabularnewline
41 & 4668 & - & - & - & - & - & - & - \tabularnewline
42 & 4885 & - & - & - & - & - & - & - \tabularnewline
43 & 5822 & - & - & - & - & - & - & - \tabularnewline
44 & 5599 & - & - & - & - & - & - & - \tabularnewline
45 & 5340 & - & - & - & - & - & - & - \tabularnewline
46 & 3082 & - & - & - & - & - & - & - \tabularnewline
47 & 2010 & - & - & - & - & - & - & - \tabularnewline
48 & 2301 & - & - & - & - & - & - & - \tabularnewline
49 & 1514 & 1614.0204 & 1075.5316 & 2152.5092 & 0.3579 & 0.0062 & 0.5377 & 0.0062 \tabularnewline
50 & 1979 & 2119.4799 & 1540.325 & 2698.6347 & 0.3172 & 0.9798 & 0.5195 & 0.2695 \tabularnewline
51 & 2480 & 2206.8887 & 1622.272 & 2791.5055 & 0.1799 & 0.7776 & 0.5212 & 0.3762 \tabularnewline
52 & 3499 & 3606.9807 & 3018.1434 & 4195.818 & 0.3596 & 0.9999 & 0.5212 & 1 \tabularnewline
53 & 4676 & 4682.2287 & 4093.2636 & 5271.1938 & 0.4917 & 1 & 0.5189 & 1 \tabularnewline
54 & 5585 & 4898.8143 & 4308.3419 & 5489.2867 & 0.0114 & 0.7702 & 0.5183 & 1 \tabularnewline
55 & 5610 & 5835.1207 & 5243.6373 & 6426.604 & 0.2278 & 0.7964 & 0.5173 & 1 \tabularnewline
56 & 5796 & 5611.3716 & 5019.1523 & 6203.591 & 0.2706 & 0.5018 & 0.5163 & 1 \tabularnewline
57 & 6199 & 5351.7715 & 4758.7481 & 5944.7949 & 0.0026 & 0.071 & 0.5155 & 1 \tabularnewline
58 & 3030 & 3093.1611 & 2499.4584 & 3686.8638 & 0.4174 & 0 & 0.5147 & 0.9955 \tabularnewline
59 & 1930 & 2020.5819 & 1426.2733 & 2614.8905 & 0.3826 & 4e-04 & 0.5139 & 0.1775 \tabularnewline
60 & 2552 & 2311.041 & 1716.1777 & 2905.9043 & 0.2136 & 0.8953 & 0.5132 & 0.5132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2511&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[48])[/C][/ROW]
[ROW][C]36[/C][C]2291[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]1588[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]2105[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]2191[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]3591[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]4668[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]4885[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]5822[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]5599[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]5340[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]3082[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2010[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2301[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1514[/C][C]1614.0204[/C][C]1075.5316[/C][C]2152.5092[/C][C]0.3579[/C][C]0.0062[/C][C]0.5377[/C][C]0.0062[/C][/ROW]
[ROW][C]50[/C][C]1979[/C][C]2119.4799[/C][C]1540.325[/C][C]2698.6347[/C][C]0.3172[/C][C]0.9798[/C][C]0.5195[/C][C]0.2695[/C][/ROW]
[ROW][C]51[/C][C]2480[/C][C]2206.8887[/C][C]1622.272[/C][C]2791.5055[/C][C]0.1799[/C][C]0.7776[/C][C]0.5212[/C][C]0.3762[/C][/ROW]
[ROW][C]52[/C][C]3499[/C][C]3606.9807[/C][C]3018.1434[/C][C]4195.818[/C][C]0.3596[/C][C]0.9999[/C][C]0.5212[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]4676[/C][C]4682.2287[/C][C]4093.2636[/C][C]5271.1938[/C][C]0.4917[/C][C]1[/C][C]0.5189[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]5585[/C][C]4898.8143[/C][C]4308.3419[/C][C]5489.2867[/C][C]0.0114[/C][C]0.7702[/C][C]0.5183[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]5610[/C][C]5835.1207[/C][C]5243.6373[/C][C]6426.604[/C][C]0.2278[/C][C]0.7964[/C][C]0.5173[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]5796[/C][C]5611.3716[/C][C]5019.1523[/C][C]6203.591[/C][C]0.2706[/C][C]0.5018[/C][C]0.5163[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]6199[/C][C]5351.7715[/C][C]4758.7481[/C][C]5944.7949[/C][C]0.0026[/C][C]0.071[/C][C]0.5155[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]3030[/C][C]3093.1611[/C][C]2499.4584[/C][C]3686.8638[/C][C]0.4174[/C][C]0[/C][C]0.5147[/C][C]0.9955[/C][/ROW]
[ROW][C]59[/C][C]1930[/C][C]2020.5819[/C][C]1426.2733[/C][C]2614.8905[/C][C]0.3826[/C][C]4e-04[/C][C]0.5139[/C][C]0.1775[/C][/ROW]
[ROW][C]60[/C][C]2552[/C][C]2311.041[/C][C]1716.1777[/C][C]2905.9043[/C][C]0.2136[/C][C]0.8953[/C][C]0.5132[/C][C]0.5132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2511&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2511&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[48])
362291-------
371588-------
382105-------
392191-------
403591-------
414668-------
424885-------
435822-------
445599-------
455340-------
463082-------
472010-------
482301-------
4915141614.02041075.53162152.50920.35790.00620.53770.0062
5019792119.47991540.3252698.63470.31720.97980.51950.2695
5124802206.88871622.2722791.50550.17990.77760.52120.3762
5234993606.98073018.14344195.8180.35960.99990.52121
5346764682.22874093.26365271.19380.491710.51891
5455854898.81434308.34195489.28670.01140.77020.51831
5556105835.12075243.63736426.6040.22780.79640.51731
5657965611.37165019.15236203.5910.27060.50180.51631
5761995351.77154758.74815944.79490.00260.0710.51551
5830303093.16112499.45843686.86380.417400.51470.9955
5919302020.58191426.27332614.89050.38264e-040.51390.1775
6025522311.0411716.17772905.90430.21360.89530.51320.5132







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.1702-0.0620.005210004.0809833.673428.8734
500.1394-0.06630.005519734.59131644.549340.553
510.13520.12380.010374589.75616215.81378.8404
520.0833-0.02990.002511659.8295971.652531.1713
530.0642-0.00131e-0438.79693.23311.7981
540.06150.14010.0117470850.830439237.5692198.0848
550.0517-0.03860.003250679.32254223.276964.9867
560.05380.03290.002734087.63392840.636253.2976
570.05650.15830.0132717796.139359816.3449244.5738
580.0979-0.02040.00173989.3238332.443618.233
590.1501-0.04480.00378205.0819683.756826.1487
600.13130.10430.008758061.24284838.436969.5589

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1702 & -0.062 & 0.0052 & 10004.0809 & 833.6734 & 28.8734 \tabularnewline
50 & 0.1394 & -0.0663 & 0.0055 & 19734.5913 & 1644.5493 & 40.553 \tabularnewline
51 & 0.1352 & 0.1238 & 0.0103 & 74589.7561 & 6215.813 & 78.8404 \tabularnewline
52 & 0.0833 & -0.0299 & 0.0025 & 11659.8295 & 971.6525 & 31.1713 \tabularnewline
53 & 0.0642 & -0.0013 & 1e-04 & 38.7969 & 3.2331 & 1.7981 \tabularnewline
54 & 0.0615 & 0.1401 & 0.0117 & 470850.8304 & 39237.5692 & 198.0848 \tabularnewline
55 & 0.0517 & -0.0386 & 0.0032 & 50679.3225 & 4223.2769 & 64.9867 \tabularnewline
56 & 0.0538 & 0.0329 & 0.0027 & 34087.6339 & 2840.6362 & 53.2976 \tabularnewline
57 & 0.0565 & 0.1583 & 0.0132 & 717796.1393 & 59816.3449 & 244.5738 \tabularnewline
58 & 0.0979 & -0.0204 & 0.0017 & 3989.3238 & 332.4436 & 18.233 \tabularnewline
59 & 0.1501 & -0.0448 & 0.0037 & 8205.0819 & 683.7568 & 26.1487 \tabularnewline
60 & 0.1313 & 0.1043 & 0.0087 & 58061.2428 & 4838.4369 & 69.5589 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2511&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]49[/C][C]0.1702[/C][C]-0.062[/C][C]0.0052[/C][C]10004.0809[/C][C]833.6734[/C][C]28.8734[/C][/ROW]
[ROW][C]50[/C][C]0.1394[/C][C]-0.0663[/C][C]0.0055[/C][C]19734.5913[/C][C]1644.5493[/C][C]40.553[/C][/ROW]
[ROW][C]51[/C][C]0.1352[/C][C]0.1238[/C][C]0.0103[/C][C]74589.7561[/C][C]6215.813[/C][C]78.8404[/C][/ROW]
[ROW][C]52[/C][C]0.0833[/C][C]-0.0299[/C][C]0.0025[/C][C]11659.8295[/C][C]971.6525[/C][C]31.1713[/C][/ROW]
[ROW][C]53[/C][C]0.0642[/C][C]-0.0013[/C][C]1e-04[/C][C]38.7969[/C][C]3.2331[/C][C]1.7981[/C][/ROW]
[ROW][C]54[/C][C]0.0615[/C][C]0.1401[/C][C]0.0117[/C][C]470850.8304[/C][C]39237.5692[/C][C]198.0848[/C][/ROW]
[ROW][C]55[/C][C]0.0517[/C][C]-0.0386[/C][C]0.0032[/C][C]50679.3225[/C][C]4223.2769[/C][C]64.9867[/C][/ROW]
[ROW][C]56[/C][C]0.0538[/C][C]0.0329[/C][C]0.0027[/C][C]34087.6339[/C][C]2840.6362[/C][C]53.2976[/C][/ROW]
[ROW][C]57[/C][C]0.0565[/C][C]0.1583[/C][C]0.0132[/C][C]717796.1393[/C][C]59816.3449[/C][C]244.5738[/C][/ROW]
[ROW][C]58[/C][C]0.0979[/C][C]-0.0204[/C][C]0.0017[/C][C]3989.3238[/C][C]332.4436[/C][C]18.233[/C][/ROW]
[ROW][C]59[/C][C]0.1501[/C][C]-0.0448[/C][C]0.0037[/C][C]8205.0819[/C][C]683.7568[/C][C]26.1487[/C][/ROW]
[ROW][C]60[/C][C]0.1313[/C][C]0.1043[/C][C]0.0087[/C][C]58061.2428[/C][C]4838.4369[/C][C]69.5589[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2511&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2511&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
490.1702-0.0620.005210004.0809833.673428.8734
500.1394-0.06630.005519734.59131644.549340.553
510.13520.12380.010374589.75616215.81378.8404
520.0833-0.02990.002511659.8295971.652531.1713
530.0642-0.00131e-0438.79693.23311.7981
540.06150.14010.0117470850.830439237.5692198.0848
550.0517-0.03860.003250679.32254223.276964.9867
560.05380.03290.002734087.63392840.636253.2976
570.05650.15830.0132717796.139359816.3449244.5738
580.0979-0.02040.00173989.3238332.443618.233
590.1501-0.04480.00378205.0819683.756826.1487
600.13130.10430.008758061.24284838.436969.5589



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