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 computationTue, 09 Dec 2008 11:50:24 -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/09/t1228848857sbu9q27flubnpfs.htm/, Retrieved Fri, 17 May 2024 04:18:11 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=31692, Retrieved Fri, 17 May 2024 04:18:11 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact208
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [Airline data] [2007-10-18 09:58:47] [42daae401fd3def69a25014f2252b4c2]
F RMPD  [(Partial) Autocorrelation Function] [NSTS_Q5] [2008-11-30 17:55:01] [9f5bfe3b95f9ec3d2ed4c0a560a9648a]
F   PD    [(Partial) Autocorrelation Function] [NSTS_Q7 (bouw)] [2008-12-01 18:45:53] [9f5bfe3b95f9ec3d2ed4c0a560a9648a]
- RMPD        [ARIMA Forecasting] [ARIMA FORECASTING...] [2008-12-09 18:50:24] [a9e6d7cd6e144e8b311d9f96a24c5a25] [Current]
Feedback Forum

Post a new message
Dataseries X:
2648,9
2669,6
3042,3
2604,2
2732,1
2621,7
2483,7
2479,3
2684,6
2834,7
2566,1
2251,2
2350
2299,8
2542,8
2530,2
2508,1
2616,8
2534,1
2181,8
2578,9
2841,9
2529,9
2103,2
2326,2
2452,6
2782,1
2727,3
2648,2
2760,7
2613
2225,4
2713,9
2923,3
2707
2473,9
2521
2531,8
3068,8
2826,9
2674,2
2966,6
2798,8
2629,6
3124,6
3115,7
3083
2863,9
2728,7
2789,4
3225,7
3148,2
2836,5
3153,5
2656,9
2834,7
3172,5
2998,8
3103,1
2735,6
2818,1
2874,4
3438,5
2949,1
3306,8
3530
3003,8
3206,4
3514,6
3522,6
3525,5
2996,2
3231,1
3030
3541,7
3113,2
3390,8
3424,2
3079,8
3123,4
3317,1
3579,9
3317,9
2668,1
3609,2
3535,2
3644,7
3925,7
3663,2
3905,3
3990
3695,8




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=31692&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=31692&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31692&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[80])
683206.4-------
693514.6-------
703522.6-------
713525.5-------
722996.2-------
733231.1-------
743030-------
753541.7-------
763113.2-------
773390.80000000000-------
783424.2-------
793079.8-------
803123.4-------
813317.13530.10623150.32993960.85210.16620.96790.52810.9679
823579.93475.04533056.02563958.13230.33530.73920.42350.9232
833317.93500.52023000.52384093.69890.27310.39650.46710.8936
842668.13019.70762552.50063582.71250.11050.14960.53260.3591
853609.23190.27692648.67323856.20580.10880.93780.45220.578
863535.23078.28352520.45073774.94440.09930.06760.5540.4495
873644.73618.79092911.89064519.06930.47750.57220.56660.8596
883925.73195.73762545.19734033.8820.04390.14690.57650.5672
893663.23435.19732697.83814400.33660.32170.15960.53590.7367
903905.33549.92352753.19074607.66180.25510.41690.59210.7853
9139903142.13632417.36934113.14370.04350.06170.55010.5151
923695.83222.92332451.63714269.57610.18790.07540.57390.5739

\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[80]) \tabularnewline
68 & 3206.4 & - & - & - & - & - & - & - \tabularnewline
69 & 3514.6 & - & - & - & - & - & - & - \tabularnewline
70 & 3522.6 & - & - & - & - & - & - & - \tabularnewline
71 & 3525.5 & - & - & - & - & - & - & - \tabularnewline
72 & 2996.2 & - & - & - & - & - & - & - \tabularnewline
73 & 3231.1 & - & - & - & - & - & - & - \tabularnewline
74 & 3030 & - & - & - & - & - & - & - \tabularnewline
75 & 3541.7 & - & - & - & - & - & - & - \tabularnewline
76 & 3113.2 & - & - & - & - & - & - & - \tabularnewline
77 & 3390.80000000000 & - & - & - & - & - & - & - \tabularnewline
78 & 3424.2 & - & - & - & - & - & - & - \tabularnewline
79 & 3079.8 & - & - & - & - & - & - & - \tabularnewline
80 & 3123.4 & - & - & - & - & - & - & - \tabularnewline
81 & 3317.1 & 3530.1062 & 3150.3299 & 3960.8521 & 0.1662 & 0.9679 & 0.5281 & 0.9679 \tabularnewline
82 & 3579.9 & 3475.0453 & 3056.0256 & 3958.1323 & 0.3353 & 0.7392 & 0.4235 & 0.9232 \tabularnewline
83 & 3317.9 & 3500.5202 & 3000.5238 & 4093.6989 & 0.2731 & 0.3965 & 0.4671 & 0.8936 \tabularnewline
84 & 2668.1 & 3019.7076 & 2552.5006 & 3582.7125 & 0.1105 & 0.1496 & 0.5326 & 0.3591 \tabularnewline
85 & 3609.2 & 3190.2769 & 2648.6732 & 3856.2058 & 0.1088 & 0.9378 & 0.4522 & 0.578 \tabularnewline
86 & 3535.2 & 3078.2835 & 2520.4507 & 3774.9444 & 0.0993 & 0.0676 & 0.554 & 0.4495 \tabularnewline
87 & 3644.7 & 3618.7909 & 2911.8906 & 4519.0693 & 0.4775 & 0.5722 & 0.5666 & 0.8596 \tabularnewline
88 & 3925.7 & 3195.7376 & 2545.1973 & 4033.882 & 0.0439 & 0.1469 & 0.5765 & 0.5672 \tabularnewline
89 & 3663.2 & 3435.1973 & 2697.8381 & 4400.3366 & 0.3217 & 0.1596 & 0.5359 & 0.7367 \tabularnewline
90 & 3905.3 & 3549.9235 & 2753.1907 & 4607.6618 & 0.2551 & 0.4169 & 0.5921 & 0.7853 \tabularnewline
91 & 3990 & 3142.1363 & 2417.3693 & 4113.1437 & 0.0435 & 0.0617 & 0.5501 & 0.5151 \tabularnewline
92 & 3695.8 & 3222.9233 & 2451.6371 & 4269.5761 & 0.1879 & 0.0754 & 0.5739 & 0.5739 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=31692&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[80])[/C][/ROW]
[ROW][C]68[/C][C]3206.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]3514.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]3522.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]3525.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]2996.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]3231.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]3030[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]3541.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]3113.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]3390.80000000000[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]3424.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]3079.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]3123.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]3317.1[/C][C]3530.1062[/C][C]3150.3299[/C][C]3960.8521[/C][C]0.1662[/C][C]0.9679[/C][C]0.5281[/C][C]0.9679[/C][/ROW]
[ROW][C]82[/C][C]3579.9[/C][C]3475.0453[/C][C]3056.0256[/C][C]3958.1323[/C][C]0.3353[/C][C]0.7392[/C][C]0.4235[/C][C]0.9232[/C][/ROW]
[ROW][C]83[/C][C]3317.9[/C][C]3500.5202[/C][C]3000.5238[/C][C]4093.6989[/C][C]0.2731[/C][C]0.3965[/C][C]0.4671[/C][C]0.8936[/C][/ROW]
[ROW][C]84[/C][C]2668.1[/C][C]3019.7076[/C][C]2552.5006[/C][C]3582.7125[/C][C]0.1105[/C][C]0.1496[/C][C]0.5326[/C][C]0.3591[/C][/ROW]
[ROW][C]85[/C][C]3609.2[/C][C]3190.2769[/C][C]2648.6732[/C][C]3856.2058[/C][C]0.1088[/C][C]0.9378[/C][C]0.4522[/C][C]0.578[/C][/ROW]
[ROW][C]86[/C][C]3535.2[/C][C]3078.2835[/C][C]2520.4507[/C][C]3774.9444[/C][C]0.0993[/C][C]0.0676[/C][C]0.554[/C][C]0.4495[/C][/ROW]
[ROW][C]87[/C][C]3644.7[/C][C]3618.7909[/C][C]2911.8906[/C][C]4519.0693[/C][C]0.4775[/C][C]0.5722[/C][C]0.5666[/C][C]0.8596[/C][/ROW]
[ROW][C]88[/C][C]3925.7[/C][C]3195.7376[/C][C]2545.1973[/C][C]4033.882[/C][C]0.0439[/C][C]0.1469[/C][C]0.5765[/C][C]0.5672[/C][/ROW]
[ROW][C]89[/C][C]3663.2[/C][C]3435.1973[/C][C]2697.8381[/C][C]4400.3366[/C][C]0.3217[/C][C]0.1596[/C][C]0.5359[/C][C]0.7367[/C][/ROW]
[ROW][C]90[/C][C]3905.3[/C][C]3549.9235[/C][C]2753.1907[/C][C]4607.6618[/C][C]0.2551[/C][C]0.4169[/C][C]0.5921[/C][C]0.7853[/C][/ROW]
[ROW][C]91[/C][C]3990[/C][C]3142.1363[/C][C]2417.3693[/C][C]4113.1437[/C][C]0.0435[/C][C]0.0617[/C][C]0.5501[/C][C]0.5151[/C][/ROW]
[ROW][C]92[/C][C]3695.8[/C][C]3222.9233[/C][C]2451.6371[/C][C]4269.5761[/C][C]0.1879[/C][C]0.0754[/C][C]0.5739[/C][C]0.5739[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=31692&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31692&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[80])
683206.4-------
693514.6-------
703522.6-------
713525.5-------
722996.2-------
733231.1-------
743030-------
753541.7-------
763113.2-------
773390.80000000000-------
783424.2-------
793079.8-------
803123.4-------
813317.13530.10623150.32993960.85210.16620.96790.52810.9679
823579.93475.04533056.02563958.13230.33530.73920.42350.9232
833317.93500.52023000.52384093.69890.27310.39650.46710.8936
842668.13019.70762552.50063582.71250.11050.14960.53260.3591
853609.23190.27692648.67323856.20580.10880.93780.45220.578
863535.23078.28352520.45073774.94440.09930.06760.5540.4495
873644.73618.79092911.89064519.06930.47750.57220.56660.8596
883925.73195.73762545.19734033.8820.04390.14690.57650.5672
893663.23435.19732697.83814400.33660.32170.15960.53590.7367
903905.33549.92352753.19074607.66180.25510.41690.59210.7853
9139903142.13632417.36934113.14370.04350.06170.55010.5151
923695.83222.92332451.63714269.57610.18790.07540.57390.5739







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
810.0623-0.06030.00545371.63633780.969761.4896
820.07090.03020.002510994.5172916.209830.269
830.0865-0.05220.004333350.12332779.176952.7179
840.0951-0.11640.0097123627.913410302.3261101.5004
850.10650.13130.0109175496.547514624.7123120.9327
860.11550.14840.0124208772.665417397.7221131.9004
870.12690.00726e-04671.28155.94017.4793
880.13380.22840.019532845.091644403.7576210.722
890.14330.06640.005551985.24494332.103765.8187
900.1520.10010.0083126292.421610524.3685102.5883
910.15770.26980.0225718872.854459906.0712244.7572
920.16570.14670.0122223612.333818634.3612136.5077

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
81 & 0.0623 & -0.0603 & 0.005 & 45371.6363 & 3780.9697 & 61.4896 \tabularnewline
82 & 0.0709 & 0.0302 & 0.0025 & 10994.5172 & 916.2098 & 30.269 \tabularnewline
83 & 0.0865 & -0.0522 & 0.0043 & 33350.1233 & 2779.1769 & 52.7179 \tabularnewline
84 & 0.0951 & -0.1164 & 0.0097 & 123627.9134 & 10302.3261 & 101.5004 \tabularnewline
85 & 0.1065 & 0.1313 & 0.0109 & 175496.5475 & 14624.7123 & 120.9327 \tabularnewline
86 & 0.1155 & 0.1484 & 0.0124 & 208772.6654 & 17397.7221 & 131.9004 \tabularnewline
87 & 0.1269 & 0.0072 & 6e-04 & 671.281 & 55.9401 & 7.4793 \tabularnewline
88 & 0.1338 & 0.2284 & 0.019 & 532845.0916 & 44403.7576 & 210.722 \tabularnewline
89 & 0.1433 & 0.0664 & 0.0055 & 51985.2449 & 4332.1037 & 65.8187 \tabularnewline
90 & 0.152 & 0.1001 & 0.0083 & 126292.4216 & 10524.3685 & 102.5883 \tabularnewline
91 & 0.1577 & 0.2698 & 0.0225 & 718872.8544 & 59906.0712 & 244.7572 \tabularnewline
92 & 0.1657 & 0.1467 & 0.0122 & 223612.3338 & 18634.3612 & 136.5077 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=31692&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]81[/C][C]0.0623[/C][C]-0.0603[/C][C]0.005[/C][C]45371.6363[/C][C]3780.9697[/C][C]61.4896[/C][/ROW]
[ROW][C]82[/C][C]0.0709[/C][C]0.0302[/C][C]0.0025[/C][C]10994.5172[/C][C]916.2098[/C][C]30.269[/C][/ROW]
[ROW][C]83[/C][C]0.0865[/C][C]-0.0522[/C][C]0.0043[/C][C]33350.1233[/C][C]2779.1769[/C][C]52.7179[/C][/ROW]
[ROW][C]84[/C][C]0.0951[/C][C]-0.1164[/C][C]0.0097[/C][C]123627.9134[/C][C]10302.3261[/C][C]101.5004[/C][/ROW]
[ROW][C]85[/C][C]0.1065[/C][C]0.1313[/C][C]0.0109[/C][C]175496.5475[/C][C]14624.7123[/C][C]120.9327[/C][/ROW]
[ROW][C]86[/C][C]0.1155[/C][C]0.1484[/C][C]0.0124[/C][C]208772.6654[/C][C]17397.7221[/C][C]131.9004[/C][/ROW]
[ROW][C]87[/C][C]0.1269[/C][C]0.0072[/C][C]6e-04[/C][C]671.281[/C][C]55.9401[/C][C]7.4793[/C][/ROW]
[ROW][C]88[/C][C]0.1338[/C][C]0.2284[/C][C]0.019[/C][C]532845.0916[/C][C]44403.7576[/C][C]210.722[/C][/ROW]
[ROW][C]89[/C][C]0.1433[/C][C]0.0664[/C][C]0.0055[/C][C]51985.2449[/C][C]4332.1037[/C][C]65.8187[/C][/ROW]
[ROW][C]90[/C][C]0.152[/C][C]0.1001[/C][C]0.0083[/C][C]126292.4216[/C][C]10524.3685[/C][C]102.5883[/C][/ROW]
[ROW][C]91[/C][C]0.1577[/C][C]0.2698[/C][C]0.0225[/C][C]718872.8544[/C][C]59906.0712[/C][C]244.7572[/C][/ROW]
[ROW][C]92[/C][C]0.1657[/C][C]0.1467[/C][C]0.0122[/C][C]223612.3338[/C][C]18634.3612[/C][C]136.5077[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=31692&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31692&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
810.0623-0.06030.00545371.63633780.969761.4896
820.07090.03020.002510994.5172916.209830.269
830.0865-0.05220.004333350.12332779.176952.7179
840.0951-0.11640.0097123627.913410302.3261101.5004
850.10650.13130.0109175496.547514624.7123120.9327
860.11550.14840.0124208772.665417397.7221131.9004
870.12690.00726e-04671.28155.94017.4793
880.13380.22840.019532845.091644403.7576210.722
890.14330.06640.005551985.24494332.103765.8187
900.1520.10010.0083126292.421610524.3685102.5883
910.15770.26980.0225718872.854459906.0712244.7572
920.16570.14670.0122223612.333818634.3612136.5077



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