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 computationFri, 17 Dec 2010 16:00:24 +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/17/t1292601517bx3uer46p6j2daa.htm/, Retrieved Mon, 06 May 2024 14:28:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=111547, Retrieved Mon, 06 May 2024 14:28:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact167
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Monthly US soldie...] [2010-11-02 12:07:39] [b98453cac15ba1066b407e146608df68]
- RMP   [Variance Reduction Matrix] [Soldiers] [2010-11-29 09:51:25] [b98453cac15ba1066b407e146608df68]
- RM      [Standard Deviation-Mean Plot] [Soldiers] [2010-11-29 11:02:42] [b98453cac15ba1066b407e146608df68]
- RMP       [ARIMA Forecasting] [Soldiers] [2010-11-29 21:04:02] [b98453cac15ba1066b407e146608df68]
-   PD        [ARIMA Forecasting] [] [2010-12-15 17:27:57] [8d263c682820d5327cb5f02a8c3630cf]
F   PD          [ARIMA Forecasting] [] [2010-12-17 08:37:05] [4dfa50539945b119a90a7606969443b9]
-   PD              [ARIMA Forecasting] [echte voorspelling] [2010-12-17 16:00:24] [a4848c79f7a98c5639a543e143e21e11] [Current]
-                     [ARIMA Forecasting] [Arima forecasting] [2010-12-17 16:24:27] [c895532cb7349383dee5125244983cc8]
-                     [ARIMA Forecasting] [] [2010-12-17 19:43:59] [916599f00c9c716123aa8433d9efa14f]
Feedback Forum

Post a new message
Dataseries X:
10
10
10
10
10
9,94
10,06
10,06
10,06
10,06
10,06
10,06
10,06
10,06
10,06
10,06
10,06
10,06
10,06
10,06
9,94
9,94
9,94
9,94
9,94
9,94
10,06
10,06
9,94
10,06
10,06
10,06
10,18
10,28
10,28
10,18
10,28
10,28
10,28
10,18
10,28
10,28
10,18
10,18
10,18
10,28
10,28
10,18
10,18
10,18
10,18
10,18
10,18
10,28
10,28
10,28
10,18
10,18
10,18
10,28
10,18
10,18
10,28
10,18
10,18
10,18
10,28
10,28
10,28
10,28
10,28
10,28
10,18
10,18
10,18
10,18
10,18
10,18
10,18
10,18
10,18
10,28
10,28
10,28
10,28
10,28
10,28
10,28
10,28
10,18
10,28
10,28
10,28
10,28
10,18
10,28
10,28
10,28
10,18
10,18
10,28
10,28
10,28
10,28
10,28
10,28
10,28
10,18
10,28
10,28
10,28
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,34
10,34
10,34
10,42
10,42
10,42
10,42
10,34
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,34
10,34
10,34
10,34
10,42
10,42
10,34
10,34
10,34
10,42
10,42
10,42
10,34
10,34
10,34
10,34
10,34
10,42
10,42
10,42
10,34
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,34
10,34
10,34
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,42
10,34
10,34
10,42
10,42
10,55
10,55
10,55
10,55
10,55
10,55
10,55
10,55
10,55
10,55
10,49
10,49
10,55
10,55
10,55
10,55
10,55
10,55
10,49
10,55
10,55
10,55
10,55
10,55
10,55
10,49
10,49
10,55
10,55
10,55
10,49
10,55
10,55
10,55
10,55
10,55
10,55
10,55
10,55
10,55
10,49
10,49
10,49
10,55
10,55
10,55
10,49
10,55
10,55
10,55
10,63
10,63
10,63
10,63
10,63
10,57
10,63
10,63
10,63
10,63
10,57
10,57
10,57
10,63
10,63
10,63
10,63
10,57
10,63
10,63
10,57
10,63
10,63
10,63
10,63
10,57
10,63
10,6
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,6
10,6
10,6
10,6
10,7
10,7
10,6
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,7
10,8
10,8
10,8
10,8
10,7
10,7
10,7
10,85
10,75
10,75
10,75
10,75
10,75
10,75
10,75
10,75
10,75
10,75
10,75
10,85
10,85
10,85
10,85
10,85
10,85
10,85
10,85
10,85
10,85
10,75
10,75
10,85
10,85
10,85
10,85
10,75
10,75
10,75
10,75
10,75




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time17 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 17 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111547&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]17 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111547&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111547&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 time17 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[338])
32610.75-------
32710.75-------
32810.75-------
32910.75-------
33010.85-------
33110.85-------
33210.85-------
33310.85-------
33410.85-------
33510.85-------
33610.85-------
33710.85-------
33810.85-------
33910.8510.845110.753510.93750.45880.45880.97820.4588
34010.7510.845110.715810.9760.07710.47090.92290.4709
34110.7510.845110.68711.00560.12270.87730.87730.4762
34210.8510.854910.672311.04050.47950.86580.52050.5205
34310.8510.8510.646211.05770.50.50.50.5
34410.8510.8510.626911.07770.50.50.50.5
34510.8510.8510.609311.09620.50.50.50.5
34610.7510.8510.592911.11340.22840.50.50.5
34710.7510.8510.577511.12960.24160.75840.50.5
34810.7510.8510.562911.14490.25310.74690.50.5
34910.7510.8510.549111.15950.26330.73670.50.5
35010.7510.8510.535911.17350.27230.72770.50.5

\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[338]) \tabularnewline
326 & 10.75 & - & - & - & - & - & - & - \tabularnewline
327 & 10.75 & - & - & - & - & - & - & - \tabularnewline
328 & 10.75 & - & - & - & - & - & - & - \tabularnewline
329 & 10.75 & - & - & - & - & - & - & - \tabularnewline
330 & 10.85 & - & - & - & - & - & - & - \tabularnewline
331 & 10.85 & - & - & - & - & - & - & - \tabularnewline
332 & 10.85 & - & - & - & - & - & - & - \tabularnewline
333 & 10.85 & - & - & - & - & - & - & - \tabularnewline
334 & 10.85 & - & - & - & - & - & - & - \tabularnewline
335 & 10.85 & - & - & - & - & - & - & - \tabularnewline
336 & 10.85 & - & - & - & - & - & - & - \tabularnewline
337 & 10.85 & - & - & - & - & - & - & - \tabularnewline
338 & 10.85 & - & - & - & - & - & - & - \tabularnewline
339 & 10.85 & 10.8451 & 10.7535 & 10.9375 & 0.4588 & 0.4588 & 0.9782 & 0.4588 \tabularnewline
340 & 10.75 & 10.8451 & 10.7158 & 10.976 & 0.0771 & 0.4709 & 0.9229 & 0.4709 \tabularnewline
341 & 10.75 & 10.8451 & 10.687 & 11.0056 & 0.1227 & 0.8773 & 0.8773 & 0.4762 \tabularnewline
342 & 10.85 & 10.8549 & 10.6723 & 11.0405 & 0.4795 & 0.8658 & 0.5205 & 0.5205 \tabularnewline
343 & 10.85 & 10.85 & 10.6462 & 11.0577 & 0.5 & 0.5 & 0.5 & 0.5 \tabularnewline
344 & 10.85 & 10.85 & 10.6269 & 11.0777 & 0.5 & 0.5 & 0.5 & 0.5 \tabularnewline
345 & 10.85 & 10.85 & 10.6093 & 11.0962 & 0.5 & 0.5 & 0.5 & 0.5 \tabularnewline
346 & 10.75 & 10.85 & 10.5929 & 11.1134 & 0.2284 & 0.5 & 0.5 & 0.5 \tabularnewline
347 & 10.75 & 10.85 & 10.5775 & 11.1296 & 0.2416 & 0.7584 & 0.5 & 0.5 \tabularnewline
348 & 10.75 & 10.85 & 10.5629 & 11.1449 & 0.2531 & 0.7469 & 0.5 & 0.5 \tabularnewline
349 & 10.75 & 10.85 & 10.5491 & 11.1595 & 0.2633 & 0.7367 & 0.5 & 0.5 \tabularnewline
350 & 10.75 & 10.85 & 10.5359 & 11.1735 & 0.2723 & 0.7277 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111547&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[338])[/C][/ROW]
[ROW][C]326[/C][C]10.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]327[/C][C]10.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]328[/C][C]10.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]329[/C][C]10.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]330[/C][C]10.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]331[/C][C]10.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]332[/C][C]10.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]333[/C][C]10.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]334[/C][C]10.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]335[/C][C]10.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]336[/C][C]10.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]337[/C][C]10.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]338[/C][C]10.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]339[/C][C]10.85[/C][C]10.8451[/C][C]10.7535[/C][C]10.9375[/C][C]0.4588[/C][C]0.4588[/C][C]0.9782[/C][C]0.4588[/C][/ROW]
[ROW][C]340[/C][C]10.75[/C][C]10.8451[/C][C]10.7158[/C][C]10.976[/C][C]0.0771[/C][C]0.4709[/C][C]0.9229[/C][C]0.4709[/C][/ROW]
[ROW][C]341[/C][C]10.75[/C][C]10.8451[/C][C]10.687[/C][C]11.0056[/C][C]0.1227[/C][C]0.8773[/C][C]0.8773[/C][C]0.4762[/C][/ROW]
[ROW][C]342[/C][C]10.85[/C][C]10.8549[/C][C]10.6723[/C][C]11.0405[/C][C]0.4795[/C][C]0.8658[/C][C]0.5205[/C][C]0.5205[/C][/ROW]
[ROW][C]343[/C][C]10.85[/C][C]10.85[/C][C]10.6462[/C][C]11.0577[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]344[/C][C]10.85[/C][C]10.85[/C][C]10.6269[/C][C]11.0777[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]345[/C][C]10.85[/C][C]10.85[/C][C]10.6093[/C][C]11.0962[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]346[/C][C]10.75[/C][C]10.85[/C][C]10.5929[/C][C]11.1134[/C][C]0.2284[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]347[/C][C]10.75[/C][C]10.85[/C][C]10.5775[/C][C]11.1296[/C][C]0.2416[/C][C]0.7584[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]348[/C][C]10.75[/C][C]10.85[/C][C]10.5629[/C][C]11.1449[/C][C]0.2531[/C][C]0.7469[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]349[/C][C]10.75[/C][C]10.85[/C][C]10.5491[/C][C]11.1595[/C][C]0.2633[/C][C]0.7367[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]350[/C][C]10.75[/C][C]10.85[/C][C]10.5359[/C][C]11.1735[/C][C]0.2723[/C][C]0.7277[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111547&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111547&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[338])
32610.75-------
32710.75-------
32810.75-------
32910.75-------
33010.85-------
33110.85-------
33210.85-------
33310.85-------
33410.85-------
33510.85-------
33610.85-------
33710.85-------
33810.85-------
33910.8510.845110.753510.93750.45880.45880.97820.4588
34010.7510.845110.715810.9760.07710.47090.92290.4709
34110.7510.845110.68711.00560.12270.87730.87730.4762
34210.8510.854910.672311.04050.47950.86580.52050.5205
34310.8510.8510.646211.05770.50.50.50.5
34410.8510.8510.626911.07770.50.50.50.5
34510.8510.8510.609311.09620.50.50.50.5
34610.7510.8510.592911.11340.22840.50.50.5
34710.7510.8510.577511.12960.24160.75840.50.5
34810.7510.8510.562911.14490.25310.74690.50.5
34910.7510.8510.549111.15950.26330.73670.50.5
35010.7510.8510.535911.17350.27230.72770.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
3390.00435e-040000
3400.0062-0.00880.00460.0090.00450.0673
3410.0075-0.00880.0060.0090.0060.0777
3420.0087-4e-040.004600.00450.0673
3430.009800.003700.00360.0602
3440.010700.003100.0030.055
3450.011600.002600.00260.0509
3460.0124-0.00920.00350.010.00350.0593
3470.0131-0.00920.00410.010.00420.0651
3480.0139-0.00920.00460.010.00480.0694
3490.0146-0.00920.0050.010.00530.0727
3500.0152-0.00920.00540.010.00570.0754

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
339 & 0.0043 & 5e-04 & 0 & 0 & 0 & 0 \tabularnewline
340 & 0.0062 & -0.0088 & 0.0046 & 0.009 & 0.0045 & 0.0673 \tabularnewline
341 & 0.0075 & -0.0088 & 0.006 & 0.009 & 0.006 & 0.0777 \tabularnewline
342 & 0.0087 & -4e-04 & 0.0046 & 0 & 0.0045 & 0.0673 \tabularnewline
343 & 0.0098 & 0 & 0.0037 & 0 & 0.0036 & 0.0602 \tabularnewline
344 & 0.0107 & 0 & 0.0031 & 0 & 0.003 & 0.055 \tabularnewline
345 & 0.0116 & 0 & 0.0026 & 0 & 0.0026 & 0.0509 \tabularnewline
346 & 0.0124 & -0.0092 & 0.0035 & 0.01 & 0.0035 & 0.0593 \tabularnewline
347 & 0.0131 & -0.0092 & 0.0041 & 0.01 & 0.0042 & 0.0651 \tabularnewline
348 & 0.0139 & -0.0092 & 0.0046 & 0.01 & 0.0048 & 0.0694 \tabularnewline
349 & 0.0146 & -0.0092 & 0.005 & 0.01 & 0.0053 & 0.0727 \tabularnewline
350 & 0.0152 & -0.0092 & 0.0054 & 0.01 & 0.0057 & 0.0754 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111547&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]339[/C][C]0.0043[/C][C]5e-04[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]340[/C][C]0.0062[/C][C]-0.0088[/C][C]0.0046[/C][C]0.009[/C][C]0.0045[/C][C]0.0673[/C][/ROW]
[ROW][C]341[/C][C]0.0075[/C][C]-0.0088[/C][C]0.006[/C][C]0.009[/C][C]0.006[/C][C]0.0777[/C][/ROW]
[ROW][C]342[/C][C]0.0087[/C][C]-4e-04[/C][C]0.0046[/C][C]0[/C][C]0.0045[/C][C]0.0673[/C][/ROW]
[ROW][C]343[/C][C]0.0098[/C][C]0[/C][C]0.0037[/C][C]0[/C][C]0.0036[/C][C]0.0602[/C][/ROW]
[ROW][C]344[/C][C]0.0107[/C][C]0[/C][C]0.0031[/C][C]0[/C][C]0.003[/C][C]0.055[/C][/ROW]
[ROW][C]345[/C][C]0.0116[/C][C]0[/C][C]0.0026[/C][C]0[/C][C]0.0026[/C][C]0.0509[/C][/ROW]
[ROW][C]346[/C][C]0.0124[/C][C]-0.0092[/C][C]0.0035[/C][C]0.01[/C][C]0.0035[/C][C]0.0593[/C][/ROW]
[ROW][C]347[/C][C]0.0131[/C][C]-0.0092[/C][C]0.0041[/C][C]0.01[/C][C]0.0042[/C][C]0.0651[/C][/ROW]
[ROW][C]348[/C][C]0.0139[/C][C]-0.0092[/C][C]0.0046[/C][C]0.01[/C][C]0.0048[/C][C]0.0694[/C][/ROW]
[ROW][C]349[/C][C]0.0146[/C][C]-0.0092[/C][C]0.005[/C][C]0.01[/C][C]0.0053[/C][C]0.0727[/C][/ROW]
[ROW][C]350[/C][C]0.0152[/C][C]-0.0092[/C][C]0.0054[/C][C]0.01[/C][C]0.0057[/C][C]0.0754[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111547&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111547&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
3390.00435e-040000
3400.0062-0.00880.00460.0090.00450.0673
3410.0075-0.00880.0060.0090.0060.0777
3420.0087-4e-040.004600.00450.0673
3430.009800.003700.00360.0602
3440.010700.003100.0030.055
3450.011600.002600.00260.0509
3460.0124-0.00920.00350.010.00350.0593
3470.0131-0.00920.00410.010.00420.0651
3480.0139-0.00920.00460.010.00480.0694
3490.0146-0.00920.0050.010.00530.0727
3500.0152-0.00920.00540.010.00570.0754



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