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 computationWed, 29 Dec 2010 13:43:23 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/29/t1293630125ifk912rpwpgokhd.htm/, Retrieved Fri, 03 May 2024 05:52:26 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116827, Retrieved Fri, 03 May 2024 05:52:26 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact105
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  D        [ARIMA Forecasting] [Paper: ARIMA fore...] [2010-12-29 13:43:23] [35c3410767ea63f72c8afa35bf7b6164] [Current]
Feedback Forum

Post a new message
Dataseries X:
3065
2997
2901
2815
2709
2711
3509
3369
3596
3448
3160
2934
2534
2266
2088
1932
1784
1851
2700
2580
2829
2298
2045
1824
1872
1801
1735
1639
1521
1758
2603
2540
3103
2801
2590
2324
2424
2288
2163
2082
1937
2155
2874
2836
3439
3278
3129
2959
3060
2898
2783
2632
2465
2689
3321
3359
4108
3407
3241
3013
3067
2965
2823
2718
2567
2658
3436
3375
3931
3371
3038




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116827&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' @ 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[59])
473129-------
482959-------
493060-------
502898-------
512783-------
522632-------
532465-------
542689-------
553321-------
563359-------
574108-------
583407-------
593241-------
6030133019.12042734.00173304.23920.48320.06360.66030.0636
6130673096.71482673.85123519.57840.44520.6510.56760.2518
6229652922.03112382.70723461.3550.4380.29920.53480.1232
6328232788.7062143.94993433.46220.45850.2960.50690.0846
6427182642.01961899.29213384.74720.42050.31650.51050.057
6525672469.65991634.72933304.59050.40960.280.50440.0351
6626582683.20951760.87543605.54350.47860.59750.49510.1179
6734363329.44112323.86754335.01470.41770.90470.50660.5684
6833753342.41062257.29944427.52190.47650.43290.4880.5727
6939314050.02872888.72035211.33710.42040.87270.4610.9139
7033713479.1552244.69184713.61820.43180.23660.54560.6473
7130383313.91822009.0884618.74840.33930.46580.54360.5436

\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[59]) \tabularnewline
47 & 3129 & - & - & - & - & - & - & - \tabularnewline
48 & 2959 & - & - & - & - & - & - & - \tabularnewline
49 & 3060 & - & - & - & - & - & - & - \tabularnewline
50 & 2898 & - & - & - & - & - & - & - \tabularnewline
51 & 2783 & - & - & - & - & - & - & - \tabularnewline
52 & 2632 & - & - & - & - & - & - & - \tabularnewline
53 & 2465 & - & - & - & - & - & - & - \tabularnewline
54 & 2689 & - & - & - & - & - & - & - \tabularnewline
55 & 3321 & - & - & - & - & - & - & - \tabularnewline
56 & 3359 & - & - & - & - & - & - & - \tabularnewline
57 & 4108 & - & - & - & - & - & - & - \tabularnewline
58 & 3407 & - & - & - & - & - & - & - \tabularnewline
59 & 3241 & - & - & - & - & - & - & - \tabularnewline
60 & 3013 & 3019.1204 & 2734.0017 & 3304.2392 & 0.4832 & 0.0636 & 0.6603 & 0.0636 \tabularnewline
61 & 3067 & 3096.7148 & 2673.8512 & 3519.5784 & 0.4452 & 0.651 & 0.5676 & 0.2518 \tabularnewline
62 & 2965 & 2922.0311 & 2382.7072 & 3461.355 & 0.438 & 0.2992 & 0.5348 & 0.1232 \tabularnewline
63 & 2823 & 2788.706 & 2143.9499 & 3433.4622 & 0.4585 & 0.296 & 0.5069 & 0.0846 \tabularnewline
64 & 2718 & 2642.0196 & 1899.2921 & 3384.7472 & 0.4205 & 0.3165 & 0.5105 & 0.057 \tabularnewline
65 & 2567 & 2469.6599 & 1634.7293 & 3304.5905 & 0.4096 & 0.28 & 0.5044 & 0.0351 \tabularnewline
66 & 2658 & 2683.2095 & 1760.8754 & 3605.5435 & 0.4786 & 0.5975 & 0.4951 & 0.1179 \tabularnewline
67 & 3436 & 3329.4411 & 2323.8675 & 4335.0147 & 0.4177 & 0.9047 & 0.5066 & 0.5684 \tabularnewline
68 & 3375 & 3342.4106 & 2257.2994 & 4427.5219 & 0.4765 & 0.4329 & 0.488 & 0.5727 \tabularnewline
69 & 3931 & 4050.0287 & 2888.7203 & 5211.3371 & 0.4204 & 0.8727 & 0.461 & 0.9139 \tabularnewline
70 & 3371 & 3479.155 & 2244.6918 & 4713.6182 & 0.4318 & 0.2366 & 0.5456 & 0.6473 \tabularnewline
71 & 3038 & 3313.9182 & 2009.088 & 4618.7484 & 0.3393 & 0.4658 & 0.5436 & 0.5436 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116827&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[59])[/C][/ROW]
[ROW][C]47[/C][C]3129[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2959[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]3060[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]2898[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]2783[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]2632[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]2465[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]2689[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]3321[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]3359[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]4108[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]3407[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]3241[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]3013[/C][C]3019.1204[/C][C]2734.0017[/C][C]3304.2392[/C][C]0.4832[/C][C]0.0636[/C][C]0.6603[/C][C]0.0636[/C][/ROW]
[ROW][C]61[/C][C]3067[/C][C]3096.7148[/C][C]2673.8512[/C][C]3519.5784[/C][C]0.4452[/C][C]0.651[/C][C]0.5676[/C][C]0.2518[/C][/ROW]
[ROW][C]62[/C][C]2965[/C][C]2922.0311[/C][C]2382.7072[/C][C]3461.355[/C][C]0.438[/C][C]0.2992[/C][C]0.5348[/C][C]0.1232[/C][/ROW]
[ROW][C]63[/C][C]2823[/C][C]2788.706[/C][C]2143.9499[/C][C]3433.4622[/C][C]0.4585[/C][C]0.296[/C][C]0.5069[/C][C]0.0846[/C][/ROW]
[ROW][C]64[/C][C]2718[/C][C]2642.0196[/C][C]1899.2921[/C][C]3384.7472[/C][C]0.4205[/C][C]0.3165[/C][C]0.5105[/C][C]0.057[/C][/ROW]
[ROW][C]65[/C][C]2567[/C][C]2469.6599[/C][C]1634.7293[/C][C]3304.5905[/C][C]0.4096[/C][C]0.28[/C][C]0.5044[/C][C]0.0351[/C][/ROW]
[ROW][C]66[/C][C]2658[/C][C]2683.2095[/C][C]1760.8754[/C][C]3605.5435[/C][C]0.4786[/C][C]0.5975[/C][C]0.4951[/C][C]0.1179[/C][/ROW]
[ROW][C]67[/C][C]3436[/C][C]3329.4411[/C][C]2323.8675[/C][C]4335.0147[/C][C]0.4177[/C][C]0.9047[/C][C]0.5066[/C][C]0.5684[/C][/ROW]
[ROW][C]68[/C][C]3375[/C][C]3342.4106[/C][C]2257.2994[/C][C]4427.5219[/C][C]0.4765[/C][C]0.4329[/C][C]0.488[/C][C]0.5727[/C][/ROW]
[ROW][C]69[/C][C]3931[/C][C]4050.0287[/C][C]2888.7203[/C][C]5211.3371[/C][C]0.4204[/C][C]0.8727[/C][C]0.461[/C][C]0.9139[/C][/ROW]
[ROW][C]70[/C][C]3371[/C][C]3479.155[/C][C]2244.6918[/C][C]4713.6182[/C][C]0.4318[/C][C]0.2366[/C][C]0.5456[/C][C]0.6473[/C][/ROW]
[ROW][C]71[/C][C]3038[/C][C]3313.9182[/C][C]2009.088[/C][C]4618.7484[/C][C]0.3393[/C][C]0.4658[/C][C]0.5436[/C][C]0.5436[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116827&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116827&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[59])
473129-------
482959-------
493060-------
502898-------
512783-------
522632-------
532465-------
542689-------
553321-------
563359-------
574108-------
583407-------
593241-------
6030133019.12042734.00173304.23920.48320.06360.66030.0636
6130673096.71482673.85123519.57840.44520.6510.56760.2518
6229652922.03112382.70723461.3550.4380.29920.53480.1232
6328232788.7062143.94993433.46220.45850.2960.50690.0846
6427182642.01961899.29213384.74720.42050.31650.51050.057
6525672469.65991634.72933304.59050.40960.280.50440.0351
6626582683.20951760.87543605.54350.47860.59750.49510.1179
6734363329.44112323.86754335.01470.41770.90470.50660.5684
6833753342.41062257.29944427.52190.47650.43290.4880.5727
6939314050.02872888.72035211.33710.42040.87270.4610.9139
7033713479.1552244.69184713.61820.43180.23660.54560.6473
7130383313.91822009.0884618.74840.33930.46580.54360.5436







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
600.0482-0.002037.459800
610.0697-0.00960.0058882.9695460.214721.4526
620.09420.01470.00881846.3256922.251630.3686
630.1180.01230.00971176.0754985.707631.396
640.14340.02880.01355773.01561943.169244.0814
650.17250.03940.01789475.09743198.490556.5552
660.1754-0.00940.0166635.51822832.351653.2198
670.15410.0320.018511354.79913897.657662.4312
680.16560.00980.01751062.06633582.591959.8548
690.1463-0.02940.018714167.82734641.115468.1257
700.181-0.03110.019911697.50875282.605772.6815
710.2009-0.08330.025176130.854511186.6264105.7668

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
60 & 0.0482 & -0.002 & 0 & 37.4598 & 0 & 0 \tabularnewline
61 & 0.0697 & -0.0096 & 0.0058 & 882.9695 & 460.2147 & 21.4526 \tabularnewline
62 & 0.0942 & 0.0147 & 0.0088 & 1846.3256 & 922.2516 & 30.3686 \tabularnewline
63 & 0.118 & 0.0123 & 0.0097 & 1176.0754 & 985.7076 & 31.396 \tabularnewline
64 & 0.1434 & 0.0288 & 0.0135 & 5773.0156 & 1943.1692 & 44.0814 \tabularnewline
65 & 0.1725 & 0.0394 & 0.0178 & 9475.0974 & 3198.4905 & 56.5552 \tabularnewline
66 & 0.1754 & -0.0094 & 0.0166 & 635.5182 & 2832.3516 & 53.2198 \tabularnewline
67 & 0.1541 & 0.032 & 0.0185 & 11354.7991 & 3897.6576 & 62.4312 \tabularnewline
68 & 0.1656 & 0.0098 & 0.0175 & 1062.0663 & 3582.5919 & 59.8548 \tabularnewline
69 & 0.1463 & -0.0294 & 0.0187 & 14167.8273 & 4641.1154 & 68.1257 \tabularnewline
70 & 0.181 & -0.0311 & 0.0199 & 11697.5087 & 5282.6057 & 72.6815 \tabularnewline
71 & 0.2009 & -0.0833 & 0.0251 & 76130.8545 & 11186.6264 & 105.7668 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116827&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]60[/C][C]0.0482[/C][C]-0.002[/C][C]0[/C][C]37.4598[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]61[/C][C]0.0697[/C][C]-0.0096[/C][C]0.0058[/C][C]882.9695[/C][C]460.2147[/C][C]21.4526[/C][/ROW]
[ROW][C]62[/C][C]0.0942[/C][C]0.0147[/C][C]0.0088[/C][C]1846.3256[/C][C]922.2516[/C][C]30.3686[/C][/ROW]
[ROW][C]63[/C][C]0.118[/C][C]0.0123[/C][C]0.0097[/C][C]1176.0754[/C][C]985.7076[/C][C]31.396[/C][/ROW]
[ROW][C]64[/C][C]0.1434[/C][C]0.0288[/C][C]0.0135[/C][C]5773.0156[/C][C]1943.1692[/C][C]44.0814[/C][/ROW]
[ROW][C]65[/C][C]0.1725[/C][C]0.0394[/C][C]0.0178[/C][C]9475.0974[/C][C]3198.4905[/C][C]56.5552[/C][/ROW]
[ROW][C]66[/C][C]0.1754[/C][C]-0.0094[/C][C]0.0166[/C][C]635.5182[/C][C]2832.3516[/C][C]53.2198[/C][/ROW]
[ROW][C]67[/C][C]0.1541[/C][C]0.032[/C][C]0.0185[/C][C]11354.7991[/C][C]3897.6576[/C][C]62.4312[/C][/ROW]
[ROW][C]68[/C][C]0.1656[/C][C]0.0098[/C][C]0.0175[/C][C]1062.0663[/C][C]3582.5919[/C][C]59.8548[/C][/ROW]
[ROW][C]69[/C][C]0.1463[/C][C]-0.0294[/C][C]0.0187[/C][C]14167.8273[/C][C]4641.1154[/C][C]68.1257[/C][/ROW]
[ROW][C]70[/C][C]0.181[/C][C]-0.0311[/C][C]0.0199[/C][C]11697.5087[/C][C]5282.6057[/C][C]72.6815[/C][/ROW]
[ROW][C]71[/C][C]0.2009[/C][C]-0.0833[/C][C]0.0251[/C][C]76130.8545[/C][C]11186.6264[/C][C]105.7668[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116827&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116827&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
600.0482-0.002037.459800
610.0697-0.00960.0058882.9695460.214721.4526
620.09420.01470.00881846.3256922.251630.3686
630.1180.01230.00971176.0754985.707631.396
640.14340.02880.01355773.01561943.169244.0814
650.17250.03940.01789475.09743198.490556.5552
660.1754-0.00940.0166635.51822832.351653.2198
670.15410.0320.018511354.79913897.657662.4312
680.16560.00980.01751062.06633582.591959.8548
690.1463-0.02940.018714167.82734641.115468.1257
700.181-0.03110.019911697.50875282.605772.6815
710.2009-0.08330.025176130.854511186.6264105.7668



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