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 21:48:20 +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/t12930543807nomvtkreyv4gfz.htm/, Retrieved Mon, 06 May 2024 09:29:33 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114600, Retrieved Mon, 06 May 2024 09:29:33 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact163
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] [8214fe6d084e5ad7598b249a26cc9f06]
-    D                  [ARIMA Forecasting] [arima forecast la...] [2010-12-22 21:48:20] [b47314d83d48c7bf812ec2bcd743b159] [Current]
Feedback Forum

Post a new message
Dataseries X:
104708
101817
97898
95559
92822
90848
101141
105841
93647
90923
89130
90212
93196
91861
90593
89895
88819
87924
96906
101217
98709
98139
95529
98577
100772
100180
99200
96251
94514
93780
105192
107682
99687
99436
102049
102673
105813
105056
103916
103513
101893
102503
113149
116696
108500
107800
105941
108742
111680
111270
110698
108517
107127
107088
116321
125045
116779
122887
120162
123198
123610
122293
121289
119393
117494
116693
125062
127281
120195
119804
117113
119240
115823
116281
113816
114632
112987
111633
116721
114850
112797
105368
102524
101327
102612
98873
95993
93244
90403
88539
98106
96963
90781
89253
87794
89810
90864
89025
87621
87718
83433
84535
92223
91052
88456
88706
89137
94066
99258
100673
102269
100833
99314
101764
108242
108148
104761
103772
103737
111043
109906
109335
107247
105690
102755
102280
110590
109122
102803
101424
99138




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114600&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])
10789137-------
10894066-------
10999258-------
110100673-------
111102269-------
112100833-------
11399314-------
114101764-------
115108242-------
116108148-------
117104761-------
118103772-------
119103737-------
120111043106574.7355102226.1844110923.28660.0220.899610.8996
121109906109263.137103424.5745115101.69950.41460.27510.99960.9682
122109335108966.5163101322.0493116610.98330.46240.40480.98330.91
123107247108637.836299284.2825117991.38990.38540.44190.9090.8478
124105690107805.620396715.5398118895.70080.35420.53930.89110.7639
125102755105694.103592881.3359118506.87110.32650.50030.83550.6177
126102280106499.973291972.4915121027.45480.28460.69330.73860.6453
127110590114361.929598135.6727130588.18640.32430.92780.77010.9003
128109122114740.932696834.6156132647.24960.26930.67520.76470.8858
129102803110602.287691037.9725130166.60280.21730.55890.72080.7542
130101424109688.527388490.4976130886.5570.22240.73780.70780.7089
13199138109043.447286237.7296131849.16480.19730.74370.67580.6758

\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 & 89137 & - & - & - & - & - & - & - \tabularnewline
108 & 94066 & - & - & - & - & - & - & - \tabularnewline
109 & 99258 & - & - & - & - & - & - & - \tabularnewline
110 & 100673 & - & - & - & - & - & - & - \tabularnewline
111 & 102269 & - & - & - & - & - & - & - \tabularnewline
112 & 100833 & - & - & - & - & - & - & - \tabularnewline
113 & 99314 & - & - & - & - & - & - & - \tabularnewline
114 & 101764 & - & - & - & - & - & - & - \tabularnewline
115 & 108242 & - & - & - & - & - & - & - \tabularnewline
116 & 108148 & - & - & - & - & - & - & - \tabularnewline
117 & 104761 & - & - & - & - & - & - & - \tabularnewline
118 & 103772 & - & - & - & - & - & - & - \tabularnewline
119 & 103737 & - & - & - & - & - & - & - \tabularnewline
120 & 111043 & 106574.7355 & 102226.1844 & 110923.2866 & 0.022 & 0.8996 & 1 & 0.8996 \tabularnewline
121 & 109906 & 109263.137 & 103424.5745 & 115101.6995 & 0.4146 & 0.2751 & 0.9996 & 0.9682 \tabularnewline
122 & 109335 & 108966.5163 & 101322.0493 & 116610.9833 & 0.4624 & 0.4048 & 0.9833 & 0.91 \tabularnewline
123 & 107247 & 108637.8362 & 99284.2825 & 117991.3899 & 0.3854 & 0.4419 & 0.909 & 0.8478 \tabularnewline
124 & 105690 & 107805.6203 & 96715.5398 & 118895.7008 & 0.3542 & 0.5393 & 0.8911 & 0.7639 \tabularnewline
125 & 102755 & 105694.1035 & 92881.3359 & 118506.8711 & 0.3265 & 0.5003 & 0.8355 & 0.6177 \tabularnewline
126 & 102280 & 106499.9732 & 91972.4915 & 121027.4548 & 0.2846 & 0.6933 & 0.7386 & 0.6453 \tabularnewline
127 & 110590 & 114361.9295 & 98135.6727 & 130588.1864 & 0.3243 & 0.9278 & 0.7701 & 0.9003 \tabularnewline
128 & 109122 & 114740.9326 & 96834.6156 & 132647.2496 & 0.2693 & 0.6752 & 0.7647 & 0.8858 \tabularnewline
129 & 102803 & 110602.2876 & 91037.9725 & 130166.6028 & 0.2173 & 0.5589 & 0.7208 & 0.7542 \tabularnewline
130 & 101424 & 109688.5273 & 88490.4976 & 130886.557 & 0.2224 & 0.7378 & 0.7078 & 0.7089 \tabularnewline
131 & 99138 & 109043.4472 & 86237.7296 & 131849.1648 & 0.1973 & 0.7437 & 0.6758 & 0.6758 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114600&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]89137[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]94066[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]99258[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]100673[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]102269[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]100833[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]99314[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]101764[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]108242[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]108148[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]104761[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]103772[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]103737[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]111043[/C][C]106574.7355[/C][C]102226.1844[/C][C]110923.2866[/C][C]0.022[/C][C]0.8996[/C][C]1[/C][C]0.8996[/C][/ROW]
[ROW][C]121[/C][C]109906[/C][C]109263.137[/C][C]103424.5745[/C][C]115101.6995[/C][C]0.4146[/C][C]0.2751[/C][C]0.9996[/C][C]0.9682[/C][/ROW]
[ROW][C]122[/C][C]109335[/C][C]108966.5163[/C][C]101322.0493[/C][C]116610.9833[/C][C]0.4624[/C][C]0.4048[/C][C]0.9833[/C][C]0.91[/C][/ROW]
[ROW][C]123[/C][C]107247[/C][C]108637.8362[/C][C]99284.2825[/C][C]117991.3899[/C][C]0.3854[/C][C]0.4419[/C][C]0.909[/C][C]0.8478[/C][/ROW]
[ROW][C]124[/C][C]105690[/C][C]107805.6203[/C][C]96715.5398[/C][C]118895.7008[/C][C]0.3542[/C][C]0.5393[/C][C]0.8911[/C][C]0.7639[/C][/ROW]
[ROW][C]125[/C][C]102755[/C][C]105694.1035[/C][C]92881.3359[/C][C]118506.8711[/C][C]0.3265[/C][C]0.5003[/C][C]0.8355[/C][C]0.6177[/C][/ROW]
[ROW][C]126[/C][C]102280[/C][C]106499.9732[/C][C]91972.4915[/C][C]121027.4548[/C][C]0.2846[/C][C]0.6933[/C][C]0.7386[/C][C]0.6453[/C][/ROW]
[ROW][C]127[/C][C]110590[/C][C]114361.9295[/C][C]98135.6727[/C][C]130588.1864[/C][C]0.3243[/C][C]0.9278[/C][C]0.7701[/C][C]0.9003[/C][/ROW]
[ROW][C]128[/C][C]109122[/C][C]114740.9326[/C][C]96834.6156[/C][C]132647.2496[/C][C]0.2693[/C][C]0.6752[/C][C]0.7647[/C][C]0.8858[/C][/ROW]
[ROW][C]129[/C][C]102803[/C][C]110602.2876[/C][C]91037.9725[/C][C]130166.6028[/C][C]0.2173[/C][C]0.5589[/C][C]0.7208[/C][C]0.7542[/C][/ROW]
[ROW][C]130[/C][C]101424[/C][C]109688.5273[/C][C]88490.4976[/C][C]130886.557[/C][C]0.2224[/C][C]0.7378[/C][C]0.7078[/C][C]0.7089[/C][/ROW]
[ROW][C]131[/C][C]99138[/C][C]109043.4472[/C][C]86237.7296[/C][C]131849.1648[/C][C]0.1973[/C][C]0.7437[/C][C]0.6758[/C][C]0.6758[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114600&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114600&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])
10789137-------
10894066-------
10999258-------
110100673-------
111102269-------
112100833-------
11399314-------
114101764-------
115108242-------
116108148-------
117104761-------
118103772-------
119103737-------
120111043106574.7355102226.1844110923.28660.0220.899610.8996
121109906109263.137103424.5745115101.69950.41460.27510.99960.9682
122109335108966.5163101322.0493116610.98330.46240.40480.98330.91
123107247108637.836299284.2825117991.38990.38540.44190.9090.8478
124105690107805.620396715.5398118895.70080.35420.53930.89110.7639
125102755105694.103592881.3359118506.87110.32650.50030.83550.6177
126102280106499.973291972.4915121027.45480.28460.69330.73860.6453
127110590114361.929598135.6727130588.18640.32430.92780.77010.9003
128109122114740.932696834.6156132647.24960.26930.67520.76470.8858
129102803110602.287691037.9725130166.60280.21730.55890.72080.7542
130101424109688.527388490.4976130886.5570.22240.73780.70780.7089
13199138109043.447286237.7296131849.16480.19730.74370.67580.6758







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1200.02080.0419019965387.598400
1210.02730.00590.0239413272.806710189330.20253192.073
1220.03580.00340.0171135780.26976838146.89162614.9851
1230.0439-0.01280.0161934425.45935612216.53352369.0117
1240.0525-0.01960.01674475849.18125384943.06312320.548
1250.0618-0.02780.01868638329.50925927174.13742434.5788
1260.0696-0.03960.021617808173.42537624459.752761.2424
1270.0724-0.0330.02314227452.48449833.83122906.8598
1280.0796-0.0490.025931572403.800811019008.27233319.4892
1290.0902-0.07050.030460828887.679415999996.2133999.9995
1300.0986-0.07530.034468302411.79220754761.26564555.7394
1310.1067-0.09080.039198117883.645827201688.13065215.5238

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
120 & 0.0208 & 0.0419 & 0 & 19965387.5984 & 0 & 0 \tabularnewline
121 & 0.0273 & 0.0059 & 0.0239 & 413272.8067 & 10189330.2025 & 3192.073 \tabularnewline
122 & 0.0358 & 0.0034 & 0.0171 & 135780.2697 & 6838146.8916 & 2614.9851 \tabularnewline
123 & 0.0439 & -0.0128 & 0.016 & 1934425.4593 & 5612216.5335 & 2369.0117 \tabularnewline
124 & 0.0525 & -0.0196 & 0.0167 & 4475849.1812 & 5384943.0631 & 2320.548 \tabularnewline
125 & 0.0618 & -0.0278 & 0.0186 & 8638329.5092 & 5927174.1374 & 2434.5788 \tabularnewline
126 & 0.0696 & -0.0396 & 0.0216 & 17808173.4253 & 7624459.75 & 2761.2424 \tabularnewline
127 & 0.0724 & -0.033 & 0.023 & 14227452.4 & 8449833.8312 & 2906.8598 \tabularnewline
128 & 0.0796 & -0.049 & 0.0259 & 31572403.8008 & 11019008.2723 & 3319.4892 \tabularnewline
129 & 0.0902 & -0.0705 & 0.0304 & 60828887.6794 & 15999996.213 & 3999.9995 \tabularnewline
130 & 0.0986 & -0.0753 & 0.0344 & 68302411.792 & 20754761.2656 & 4555.7394 \tabularnewline
131 & 0.1067 & -0.0908 & 0.0391 & 98117883.6458 & 27201688.1306 & 5215.5238 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114600&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.0208[/C][C]0.0419[/C][C]0[/C][C]19965387.5984[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]121[/C][C]0.0273[/C][C]0.0059[/C][C]0.0239[/C][C]413272.8067[/C][C]10189330.2025[/C][C]3192.073[/C][/ROW]
[ROW][C]122[/C][C]0.0358[/C][C]0.0034[/C][C]0.0171[/C][C]135780.2697[/C][C]6838146.8916[/C][C]2614.9851[/C][/ROW]
[ROW][C]123[/C][C]0.0439[/C][C]-0.0128[/C][C]0.016[/C][C]1934425.4593[/C][C]5612216.5335[/C][C]2369.0117[/C][/ROW]
[ROW][C]124[/C][C]0.0525[/C][C]-0.0196[/C][C]0.0167[/C][C]4475849.1812[/C][C]5384943.0631[/C][C]2320.548[/C][/ROW]
[ROW][C]125[/C][C]0.0618[/C][C]-0.0278[/C][C]0.0186[/C][C]8638329.5092[/C][C]5927174.1374[/C][C]2434.5788[/C][/ROW]
[ROW][C]126[/C][C]0.0696[/C][C]-0.0396[/C][C]0.0216[/C][C]17808173.4253[/C][C]7624459.75[/C][C]2761.2424[/C][/ROW]
[ROW][C]127[/C][C]0.0724[/C][C]-0.033[/C][C]0.023[/C][C]14227452.4[/C][C]8449833.8312[/C][C]2906.8598[/C][/ROW]
[ROW][C]128[/C][C]0.0796[/C][C]-0.049[/C][C]0.0259[/C][C]31572403.8008[/C][C]11019008.2723[/C][C]3319.4892[/C][/ROW]
[ROW][C]129[/C][C]0.0902[/C][C]-0.0705[/C][C]0.0304[/C][C]60828887.6794[/C][C]15999996.213[/C][C]3999.9995[/C][/ROW]
[ROW][C]130[/C][C]0.0986[/C][C]-0.0753[/C][C]0.0344[/C][C]68302411.792[/C][C]20754761.2656[/C][C]4555.7394[/C][/ROW]
[ROW][C]131[/C][C]0.1067[/C][C]-0.0908[/C][C]0.0391[/C][C]98117883.6458[/C][C]27201688.1306[/C][C]5215.5238[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114600&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114600&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.02080.0419019965387.598400
1210.02730.00590.0239413272.806710189330.20253192.073
1220.03580.00340.0171135780.26976838146.89162614.9851
1230.0439-0.01280.0161934425.45935612216.53352369.0117
1240.0525-0.01960.01674475849.18125384943.06312320.548
1250.0618-0.02780.01868638329.50925927174.13742434.5788
1260.0696-0.03960.021617808173.42537624459.752761.2424
1270.0724-0.0330.02314227452.48449833.83122906.8598
1280.0796-0.0490.025931572403.800811019008.27233319.4892
1290.0902-0.07050.030460828887.679415999996.2133999.9995
1300.0986-0.07530.034468302411.79220754761.26564555.7394
1310.1067-0.09080.039198117883.645827201688.13065215.5238



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 = 1 ; 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')