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, 22 Dec 2010 20:45:09 +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/22/t1293050589a0y92qm09a3sdcy.htm/, Retrieved Mon, 06 May 2024 09:18:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114582, Retrieved Mon, 06 May 2024 09:18:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact150
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]
-   PD      [ARIMA Forecasting] [WS9 - ARIMA Forec...] [2010-12-04 16:25:58] [8ef49741e164ec6343c90c7935194465]
-   P         [ARIMA Forecasting] [WS9 - ARIMA Forec...] [2010-12-04 16:58:46] [8ef49741e164ec6343c90c7935194465]
-               [ARIMA Forecasting] [WS 9 arima] [2010-12-07 10:08:07] [8214fe6d084e5ad7598b249a26cc9f06]
-   PD            [ARIMA Forecasting] [paper arima forec...] [2010-12-10 12:43:26] [8214fe6d084e5ad7598b249a26cc9f06]
-   PD                [ARIMA Forecasting] [arima forecasting...] [2010-12-22 20:45:09] [b47314d83d48c7bf812ec2bcd743b159] [Current]
-    D                  [ARIMA Forecasting] [arima forecast la...] [2010-12-22 21:48:20] [8214fe6d084e5ad7598b249a26cc9f06]
Feedback Forum

Post a new message
Dataseries X:
56190
54300
51362
49802
48088
46696
56586
64148
56449
52538
49359
49583
51050
49610
48321
47692
46243
46248
56381
62329
60673
58393
55742
57135
57961
56571
55615
53494
52623
52820
66825
70695
65660
63238
61741
63642
65521
64006
62728
62438
61109
63422
78094
82030
75892
72431
69194
71171
72545
71503
69624
67407
66103
67466
81088
86781
79964
80407
76589
78083
78000
76431
75461
73739
71988
72929
85785
89261
84012
80924
76588
77546
73054
73430
71093
72202
70872
70452
80506
80400
77613
69056
65321
64018
64767
61099
58329
56396
54656
55259
66912
66631
59907
56274
54045
55792
55499
53216
52259
51257
48150
51125
61046
61022
56742
54485
53862
58228
61951
62874
64013
62937
61897
65267
75228
76161
71480
69070
68293
74685
72664
71965
69238
67738
65187
66170
77309
77134
70957
67749
65081




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114582&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[119])
10753862-------
10858228-------
10961951-------
11062874-------
11164013-------
11262937-------
11361897-------
11465267-------
11575228-------
11676161-------
11771480-------
11869070-------
11968293-------
1207468571134.365267641.842374626.88810.02320.944610.9446
1217266472985.924567953.940278017.90880.45010.25410.9662
1227196572390.391765576.58179204.20230.45130.46860.99690.8807
1236923872158.503763899.949680417.05780.24410.51830.97340.8205
1246773871127.894761505.590880750.19860.24490.64990.95240.7182
1256518769451.627358622.409780280.84480.22010.62180.91420.583
1266617071931.568759985.04583878.09250.17230.86580.86290.7247
1277730982364.835569392.565795337.10530.22250.99280.85960.9833
1287713483092.486569161.999797022.97340.20090.79210.83530.9813
1297095778300.92163472.680393129.16170.16580.56130.81640.9071
1306774975361.309559684.667791037.95130.17060.70910.78420.8116
1316508174000.321457518.490190482.15270.14440.77140.75130.7513

\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[119]) \tabularnewline
107 & 53862 & - & - & - & - & - & - & - \tabularnewline
108 & 58228 & - & - & - & - & - & - & - \tabularnewline
109 & 61951 & - & - & - & - & - & - & - \tabularnewline
110 & 62874 & - & - & - & - & - & - & - \tabularnewline
111 & 64013 & - & - & - & - & - & - & - \tabularnewline
112 & 62937 & - & - & - & - & - & - & - \tabularnewline
113 & 61897 & - & - & - & - & - & - & - \tabularnewline
114 & 65267 & - & - & - & - & - & - & - \tabularnewline
115 & 75228 & - & - & - & - & - & - & - \tabularnewline
116 & 76161 & - & - & - & - & - & - & - \tabularnewline
117 & 71480 & - & - & - & - & - & - & - \tabularnewline
118 & 69070 & - & - & - & - & - & - & - \tabularnewline
119 & 68293 & - & - & - & - & - & - & - \tabularnewline
120 & 74685 & 71134.3652 & 67641.8423 & 74626.8881 & 0.0232 & 0.9446 & 1 & 0.9446 \tabularnewline
121 & 72664 & 72985.9245 & 67953.9402 & 78017.9088 & 0.4501 & 0.254 & 1 & 0.9662 \tabularnewline
122 & 71965 & 72390.3917 & 65576.581 & 79204.2023 & 0.4513 & 0.4686 & 0.9969 & 0.8807 \tabularnewline
123 & 69238 & 72158.5037 & 63899.9496 & 80417.0578 & 0.2441 & 0.5183 & 0.9734 & 0.8205 \tabularnewline
124 & 67738 & 71127.8947 & 61505.5908 & 80750.1986 & 0.2449 & 0.6499 & 0.9524 & 0.7182 \tabularnewline
125 & 65187 & 69451.6273 & 58622.4097 & 80280.8448 & 0.2201 & 0.6218 & 0.9142 & 0.583 \tabularnewline
126 & 66170 & 71931.5687 & 59985.045 & 83878.0925 & 0.1723 & 0.8658 & 0.8629 & 0.7247 \tabularnewline
127 & 77309 & 82364.8355 & 69392.5657 & 95337.1053 & 0.2225 & 0.9928 & 0.8596 & 0.9833 \tabularnewline
128 & 77134 & 83092.4865 & 69161.9997 & 97022.9734 & 0.2009 & 0.7921 & 0.8353 & 0.9813 \tabularnewline
129 & 70957 & 78300.921 & 63472.6803 & 93129.1617 & 0.1658 & 0.5613 & 0.8164 & 0.9071 \tabularnewline
130 & 67749 & 75361.3095 & 59684.6677 & 91037.9513 & 0.1706 & 0.7091 & 0.7842 & 0.8116 \tabularnewline
131 & 65081 & 74000.3214 & 57518.4901 & 90482.1527 & 0.1444 & 0.7714 & 0.7513 & 0.7513 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114582&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[119])[/C][/ROW]
[ROW][C]107[/C][C]53862[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]58228[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]61951[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]62874[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]64013[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]62937[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]61897[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]65267[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]75228[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]76161[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]71480[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]69070[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]68293[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]74685[/C][C]71134.3652[/C][C]67641.8423[/C][C]74626.8881[/C][C]0.0232[/C][C]0.9446[/C][C]1[/C][C]0.9446[/C][/ROW]
[ROW][C]121[/C][C]72664[/C][C]72985.9245[/C][C]67953.9402[/C][C]78017.9088[/C][C]0.4501[/C][C]0.254[/C][C]1[/C][C]0.9662[/C][/ROW]
[ROW][C]122[/C][C]71965[/C][C]72390.3917[/C][C]65576.581[/C][C]79204.2023[/C][C]0.4513[/C][C]0.4686[/C][C]0.9969[/C][C]0.8807[/C][/ROW]
[ROW][C]123[/C][C]69238[/C][C]72158.5037[/C][C]63899.9496[/C][C]80417.0578[/C][C]0.2441[/C][C]0.5183[/C][C]0.9734[/C][C]0.8205[/C][/ROW]
[ROW][C]124[/C][C]67738[/C][C]71127.8947[/C][C]61505.5908[/C][C]80750.1986[/C][C]0.2449[/C][C]0.6499[/C][C]0.9524[/C][C]0.7182[/C][/ROW]
[ROW][C]125[/C][C]65187[/C][C]69451.6273[/C][C]58622.4097[/C][C]80280.8448[/C][C]0.2201[/C][C]0.6218[/C][C]0.9142[/C][C]0.583[/C][/ROW]
[ROW][C]126[/C][C]66170[/C][C]71931.5687[/C][C]59985.045[/C][C]83878.0925[/C][C]0.1723[/C][C]0.8658[/C][C]0.8629[/C][C]0.7247[/C][/ROW]
[ROW][C]127[/C][C]77309[/C][C]82364.8355[/C][C]69392.5657[/C][C]95337.1053[/C][C]0.2225[/C][C]0.9928[/C][C]0.8596[/C][C]0.9833[/C][/ROW]
[ROW][C]128[/C][C]77134[/C][C]83092.4865[/C][C]69161.9997[/C][C]97022.9734[/C][C]0.2009[/C][C]0.7921[/C][C]0.8353[/C][C]0.9813[/C][/ROW]
[ROW][C]129[/C][C]70957[/C][C]78300.921[/C][C]63472.6803[/C][C]93129.1617[/C][C]0.1658[/C][C]0.5613[/C][C]0.8164[/C][C]0.9071[/C][/ROW]
[ROW][C]130[/C][C]67749[/C][C]75361.3095[/C][C]59684.6677[/C][C]91037.9513[/C][C]0.1706[/C][C]0.7091[/C][C]0.7842[/C][C]0.8116[/C][/ROW]
[ROW][C]131[/C][C]65081[/C][C]74000.3214[/C][C]57518.4901[/C][C]90482.1527[/C][C]0.1444[/C][C]0.7714[/C][C]0.7513[/C][C]0.7513[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114582&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114582&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[119])
10753862-------
10858228-------
10961951-------
11062874-------
11164013-------
11262937-------
11361897-------
11465267-------
11575228-------
11676161-------
11771480-------
11869070-------
11968293-------
1207468571134.365267641.842374626.88810.02320.944610.9446
1217266472985.924567953.940278017.90880.45010.25410.9662
1227196572390.391765576.58179204.20230.45130.46860.99690.8807
1236923872158.503763899.949680417.05780.24410.51830.97340.8205
1246773871127.894761505.590880750.19860.24490.64990.95240.7182
1256518769451.627358622.409780280.84480.22010.62180.91420.583
1266617071931.568759985.04583878.09250.17230.86580.86290.7247
1277730982364.835569392.565795337.10530.22250.99280.85960.9833
1287713483092.486569161.999797022.97340.20090.79210.83530.9813
1297095778300.92163472.680393129.16170.16580.56130.81640.9071
1306774975361.309559684.667791037.95130.17060.70910.78420.8116
1316508174000.321457518.490190482.15270.14440.77140.75130.7513







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1200.0250.0499012607007.469100
1210.0352-0.00440.0272103635.39526355321.43212520.9763
1220.048-0.00590.0201180958.06274297200.3092072.969
1230.0584-0.04050.02528529341.84115355235.6922314.1382
1240.069-0.04770.029711491386.11136582465.77592565.6317
1250.0796-0.06140.03518187045.67038516562.4252918.315
1260.0847-0.08010.041433195674.446612042149.85663470.1801
1270.0804-0.06140.043925561472.717913732065.21433705.6801
1280.0855-0.07170.04735503561.90316151120.40194018.8457
1290.0966-0.09380.051753933175.469319929325.90864464.2274
1300.1061-0.1010.056257947255.754123385501.34914835.8558
1310.1136-0.12050.061579554293.83928066234.05665297.7575

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
120 & 0.025 & 0.0499 & 0 & 12607007.4691 & 0 & 0 \tabularnewline
121 & 0.0352 & -0.0044 & 0.0272 & 103635.3952 & 6355321.4321 & 2520.9763 \tabularnewline
122 & 0.048 & -0.0059 & 0.0201 & 180958.0627 & 4297200.309 & 2072.969 \tabularnewline
123 & 0.0584 & -0.0405 & 0.0252 & 8529341.8411 & 5355235.692 & 2314.1382 \tabularnewline
124 & 0.069 & -0.0477 & 0.0297 & 11491386.1113 & 6582465.7759 & 2565.6317 \tabularnewline
125 & 0.0796 & -0.0614 & 0.035 & 18187045.6703 & 8516562.425 & 2918.315 \tabularnewline
126 & 0.0847 & -0.0801 & 0.0414 & 33195674.4466 & 12042149.8566 & 3470.1801 \tabularnewline
127 & 0.0804 & -0.0614 & 0.0439 & 25561472.7179 & 13732065.2143 & 3705.6801 \tabularnewline
128 & 0.0855 & -0.0717 & 0.047 & 35503561.903 & 16151120.4019 & 4018.8457 \tabularnewline
129 & 0.0966 & -0.0938 & 0.0517 & 53933175.4693 & 19929325.9086 & 4464.2274 \tabularnewline
130 & 0.1061 & -0.101 & 0.0562 & 57947255.7541 & 23385501.3491 & 4835.8558 \tabularnewline
131 & 0.1136 & -0.1205 & 0.0615 & 79554293.839 & 28066234.0566 & 5297.7575 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114582&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]120[/C][C]0.025[/C][C]0.0499[/C][C]0[/C][C]12607007.4691[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]121[/C][C]0.0352[/C][C]-0.0044[/C][C]0.0272[/C][C]103635.3952[/C][C]6355321.4321[/C][C]2520.9763[/C][/ROW]
[ROW][C]122[/C][C]0.048[/C][C]-0.0059[/C][C]0.0201[/C][C]180958.0627[/C][C]4297200.309[/C][C]2072.969[/C][/ROW]
[ROW][C]123[/C][C]0.0584[/C][C]-0.0405[/C][C]0.0252[/C][C]8529341.8411[/C][C]5355235.692[/C][C]2314.1382[/C][/ROW]
[ROW][C]124[/C][C]0.069[/C][C]-0.0477[/C][C]0.0297[/C][C]11491386.1113[/C][C]6582465.7759[/C][C]2565.6317[/C][/ROW]
[ROW][C]125[/C][C]0.0796[/C][C]-0.0614[/C][C]0.035[/C][C]18187045.6703[/C][C]8516562.425[/C][C]2918.315[/C][/ROW]
[ROW][C]126[/C][C]0.0847[/C][C]-0.0801[/C][C]0.0414[/C][C]33195674.4466[/C][C]12042149.8566[/C][C]3470.1801[/C][/ROW]
[ROW][C]127[/C][C]0.0804[/C][C]-0.0614[/C][C]0.0439[/C][C]25561472.7179[/C][C]13732065.2143[/C][C]3705.6801[/C][/ROW]
[ROW][C]128[/C][C]0.0855[/C][C]-0.0717[/C][C]0.047[/C][C]35503561.903[/C][C]16151120.4019[/C][C]4018.8457[/C][/ROW]
[ROW][C]129[/C][C]0.0966[/C][C]-0.0938[/C][C]0.0517[/C][C]53933175.4693[/C][C]19929325.9086[/C][C]4464.2274[/C][/ROW]
[ROW][C]130[/C][C]0.1061[/C][C]-0.101[/C][C]0.0562[/C][C]57947255.7541[/C][C]23385501.3491[/C][C]4835.8558[/C][/ROW]
[ROW][C]131[/C][C]0.1136[/C][C]-0.1205[/C][C]0.0615[/C][C]79554293.839[/C][C]28066234.0566[/C][C]5297.7575[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114582&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114582&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
1200.0250.0499012607007.469100
1210.0352-0.00440.0272103635.39526355321.43212520.9763
1220.048-0.00590.0201180958.06274297200.3092072.969
1230.0584-0.04050.02528529341.84115355235.6922314.1382
1240.069-0.04770.029711491386.11136582465.77592565.6317
1250.0796-0.06140.03518187045.67038516562.4252918.315
1260.0847-0.08010.041433195674.446612042149.85663470.1801
1270.0804-0.06140.043925561472.717913732065.21433705.6801
1280.0855-0.07170.04735503561.90316151120.40194018.8457
1290.0966-0.09380.051753933175.469319929325.90864464.2274
1300.1061-0.1010.056257947255.754123385501.34914835.8558
1310.1136-0.12050.061579554293.83928066234.05665297.7575



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