Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 10 Dec 2007 10:35:42 -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/2007/Dec/10/t1197307284pmqc8se42g1j19y.htm/, Retrieved Mon, 06 May 2024 18:17:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3000, Retrieved Mon, 06 May 2024 18:17:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact237
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [dsfds] [2007-12-10 17:35:42] [fa77851485501f69e030fcd6dbd2de67] [Current]
Feedback Forum

Post a new message
Dataseries X:
467.037
460.070
447.988
442.867
436.087
431.328
484.015
509.673
512.927
502.831
470.984
471.067
476.049
474.605
470.439
461.251
454.724
455.626
516.847
525.192
522.975
518.585
509.239
512.238
519.164
517.009
509.933
509.127
500.857
506.971
569.323
579.714
577.992
565.464
547.344
554.788
562.325
560.854
555.332
543.599
536.662
542.722
593.530
610.763
612.613
611.324
594.167
595.454
590.865
589.379
584.428
573.100
567.456
569.028
620.735
628.884
628.232
612.117
595.404
597.141
593.408
590.072
579.799
574.205
572.775
572.942
619.567
625.809
619.916
587.625
565.742
557.274
560.576
548.854
531.673
525.919
511.038
498.662
555.362
564.591
541.657




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of compuational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3000&T=0

[TABLE]
[ROW][C]Summary of compuational 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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3000&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3000&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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[69])
57628.232-------
58612.117-------
59595.404-------
60597.141-------
61593.408-------
62590.072-------
63579.799-------
64574.205-------
65572.775-------
66572.942-------
67619.567-------
68625.809-------
69619.916-------
70587.625607.3486593.4295621.59420.00330.04190.25590.0419
71565.742590.0954569.1813611.77790.01390.58840.31570.0035
72557.274592.3718566.0447619.92340.00630.97090.36720.025
73560.576590.3344559.7435622.59710.03530.97770.42590.0362
74548.854587.643553.4403623.95950.01820.9280.44790.0408
75531.673579.2519542.2374618.79320.00920.93410.48920.0219
76525.919571.7176532.2196614.14690.01720.96780.45430.013
77511.038568.1899526.2164613.51150.00670.96620.42140.0126
78498.662569.5386524.9243617.94480.00210.99110.44520.0207
79555.362619.5492568.4201675.27730.01210.49970.4949
80564.591627.9111573.6032687.36090.01840.99160.52760.604
81541.657624.3458567.9947686.28750.00440.97070.55570.5557

\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[69]) \tabularnewline
57 & 628.232 & - & - & - & - & - & - & - \tabularnewline
58 & 612.117 & - & - & - & - & - & - & - \tabularnewline
59 & 595.404 & - & - & - & - & - & - & - \tabularnewline
60 & 597.141 & - & - & - & - & - & - & - \tabularnewline
61 & 593.408 & - & - & - & - & - & - & - \tabularnewline
62 & 590.072 & - & - & - & - & - & - & - \tabularnewline
63 & 579.799 & - & - & - & - & - & - & - \tabularnewline
64 & 574.205 & - & - & - & - & - & - & - \tabularnewline
65 & 572.775 & - & - & - & - & - & - & - \tabularnewline
66 & 572.942 & - & - & - & - & - & - & - \tabularnewline
67 & 619.567 & - & - & - & - & - & - & - \tabularnewline
68 & 625.809 & - & - & - & - & - & - & - \tabularnewline
69 & 619.916 & - & - & - & - & - & - & - \tabularnewline
70 & 587.625 & 607.3486 & 593.4295 & 621.5942 & 0.0033 & 0.0419 & 0.2559 & 0.0419 \tabularnewline
71 & 565.742 & 590.0954 & 569.1813 & 611.7779 & 0.0139 & 0.5884 & 0.3157 & 0.0035 \tabularnewline
72 & 557.274 & 592.3718 & 566.0447 & 619.9234 & 0.0063 & 0.9709 & 0.3672 & 0.025 \tabularnewline
73 & 560.576 & 590.3344 & 559.7435 & 622.5971 & 0.0353 & 0.9777 & 0.4259 & 0.0362 \tabularnewline
74 & 548.854 & 587.643 & 553.4403 & 623.9595 & 0.0182 & 0.928 & 0.4479 & 0.0408 \tabularnewline
75 & 531.673 & 579.2519 & 542.2374 & 618.7932 & 0.0092 & 0.9341 & 0.4892 & 0.0219 \tabularnewline
76 & 525.919 & 571.7176 & 532.2196 & 614.1469 & 0.0172 & 0.9678 & 0.4543 & 0.013 \tabularnewline
77 & 511.038 & 568.1899 & 526.2164 & 613.5115 & 0.0067 & 0.9662 & 0.4214 & 0.0126 \tabularnewline
78 & 498.662 & 569.5386 & 524.9243 & 617.9448 & 0.0021 & 0.9911 & 0.4452 & 0.0207 \tabularnewline
79 & 555.362 & 619.5492 & 568.4201 & 675.2773 & 0.012 & 1 & 0.4997 & 0.4949 \tabularnewline
80 & 564.591 & 627.9111 & 573.6032 & 687.3609 & 0.0184 & 0.9916 & 0.5276 & 0.604 \tabularnewline
81 & 541.657 & 624.3458 & 567.9947 & 686.2875 & 0.0044 & 0.9707 & 0.5557 & 0.5557 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3000&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[69])[/C][/ROW]
[ROW][C]57[/C][C]628.232[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]612.117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]595.404[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]597.141[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]593.408[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]590.072[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]579.799[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]574.205[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]572.775[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]572.942[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]619.567[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]625.809[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]619.916[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]587.625[/C][C]607.3486[/C][C]593.4295[/C][C]621.5942[/C][C]0.0033[/C][C]0.0419[/C][C]0.2559[/C][C]0.0419[/C][/ROW]
[ROW][C]71[/C][C]565.742[/C][C]590.0954[/C][C]569.1813[/C][C]611.7779[/C][C]0.0139[/C][C]0.5884[/C][C]0.3157[/C][C]0.0035[/C][/ROW]
[ROW][C]72[/C][C]557.274[/C][C]592.3718[/C][C]566.0447[/C][C]619.9234[/C][C]0.0063[/C][C]0.9709[/C][C]0.3672[/C][C]0.025[/C][/ROW]
[ROW][C]73[/C][C]560.576[/C][C]590.3344[/C][C]559.7435[/C][C]622.5971[/C][C]0.0353[/C][C]0.9777[/C][C]0.4259[/C][C]0.0362[/C][/ROW]
[ROW][C]74[/C][C]548.854[/C][C]587.643[/C][C]553.4403[/C][C]623.9595[/C][C]0.0182[/C][C]0.928[/C][C]0.4479[/C][C]0.0408[/C][/ROW]
[ROW][C]75[/C][C]531.673[/C][C]579.2519[/C][C]542.2374[/C][C]618.7932[/C][C]0.0092[/C][C]0.9341[/C][C]0.4892[/C][C]0.0219[/C][/ROW]
[ROW][C]76[/C][C]525.919[/C][C]571.7176[/C][C]532.2196[/C][C]614.1469[/C][C]0.0172[/C][C]0.9678[/C][C]0.4543[/C][C]0.013[/C][/ROW]
[ROW][C]77[/C][C]511.038[/C][C]568.1899[/C][C]526.2164[/C][C]613.5115[/C][C]0.0067[/C][C]0.9662[/C][C]0.4214[/C][C]0.0126[/C][/ROW]
[ROW][C]78[/C][C]498.662[/C][C]569.5386[/C][C]524.9243[/C][C]617.9448[/C][C]0.0021[/C][C]0.9911[/C][C]0.4452[/C][C]0.0207[/C][/ROW]
[ROW][C]79[/C][C]555.362[/C][C]619.5492[/C][C]568.4201[/C][C]675.2773[/C][C]0.012[/C][C]1[/C][C]0.4997[/C][C]0.4949[/C][/ROW]
[ROW][C]80[/C][C]564.591[/C][C]627.9111[/C][C]573.6032[/C][C]687.3609[/C][C]0.0184[/C][C]0.9916[/C][C]0.5276[/C][C]0.604[/C][/ROW]
[ROW][C]81[/C][C]541.657[/C][C]624.3458[/C][C]567.9947[/C][C]686.2875[/C][C]0.0044[/C][C]0.9707[/C][C]0.5557[/C][C]0.5557[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3000&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3000&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[69])
57628.232-------
58612.117-------
59595.404-------
60597.141-------
61593.408-------
62590.072-------
63579.799-------
64574.205-------
65572.775-------
66572.942-------
67619.567-------
68625.809-------
69619.916-------
70587.625607.3486593.4295621.59420.00330.04190.25590.0419
71565.742590.0954569.1813611.77790.01390.58840.31570.0035
72557.274592.3718566.0447619.92340.00630.97090.36720.025
73560.576590.3344559.7435622.59710.03530.97770.42590.0362
74548.854587.643553.4403623.95950.01820.9280.44790.0408
75531.673579.2519542.2374618.79320.00920.93410.48920.0219
76525.919571.7176532.2196614.14690.01720.96780.45430.013
77511.038568.1899526.2164613.51150.00670.96620.42140.0126
78498.662569.5386524.9243617.94480.00210.99110.44520.0207
79555.362619.5492568.4201675.27730.01210.49970.4949
80564.591627.9111573.6032687.36090.01840.99160.52760.604
81541.657624.3458567.9947686.28750.00440.97070.55570.5557







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
700.012-0.03250.0027389.019932.41835.6937
710.0187-0.04130.0034593.086249.42387.0302
720.0237-0.05920.00491231.8579102.654810.1319
730.0279-0.05040.0042885.561373.79688.5905
740.0315-0.0660.00551504.5866125.382211.1974
750.0348-0.08210.00682263.7523188.64613.7348
760.0379-0.08010.00672097.5138174.792813.2209
770.0407-0.10060.00843266.3399272.19516.4983
780.0434-0.12440.01045023.4955418.624620.4603
790.0459-0.10360.00864119.9929343.332718.5292
800.0483-0.10080.00844009.4388334.119918.2789
810.0506-0.13240.0116837.4381569.786523.8702

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
70 & 0.012 & -0.0325 & 0.0027 & 389.0199 & 32.4183 & 5.6937 \tabularnewline
71 & 0.0187 & -0.0413 & 0.0034 & 593.0862 & 49.4238 & 7.0302 \tabularnewline
72 & 0.0237 & -0.0592 & 0.0049 & 1231.8579 & 102.6548 & 10.1319 \tabularnewline
73 & 0.0279 & -0.0504 & 0.0042 & 885.5613 & 73.7968 & 8.5905 \tabularnewline
74 & 0.0315 & -0.066 & 0.0055 & 1504.5866 & 125.3822 & 11.1974 \tabularnewline
75 & 0.0348 & -0.0821 & 0.0068 & 2263.7523 & 188.646 & 13.7348 \tabularnewline
76 & 0.0379 & -0.0801 & 0.0067 & 2097.5138 & 174.7928 & 13.2209 \tabularnewline
77 & 0.0407 & -0.1006 & 0.0084 & 3266.3399 & 272.195 & 16.4983 \tabularnewline
78 & 0.0434 & -0.1244 & 0.0104 & 5023.4955 & 418.6246 & 20.4603 \tabularnewline
79 & 0.0459 & -0.1036 & 0.0086 & 4119.9929 & 343.3327 & 18.5292 \tabularnewline
80 & 0.0483 & -0.1008 & 0.0084 & 4009.4388 & 334.1199 & 18.2789 \tabularnewline
81 & 0.0506 & -0.1324 & 0.011 & 6837.4381 & 569.7865 & 23.8702 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3000&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]70[/C][C]0.012[/C][C]-0.0325[/C][C]0.0027[/C][C]389.0199[/C][C]32.4183[/C][C]5.6937[/C][/ROW]
[ROW][C]71[/C][C]0.0187[/C][C]-0.0413[/C][C]0.0034[/C][C]593.0862[/C][C]49.4238[/C][C]7.0302[/C][/ROW]
[ROW][C]72[/C][C]0.0237[/C][C]-0.0592[/C][C]0.0049[/C][C]1231.8579[/C][C]102.6548[/C][C]10.1319[/C][/ROW]
[ROW][C]73[/C][C]0.0279[/C][C]-0.0504[/C][C]0.0042[/C][C]885.5613[/C][C]73.7968[/C][C]8.5905[/C][/ROW]
[ROW][C]74[/C][C]0.0315[/C][C]-0.066[/C][C]0.0055[/C][C]1504.5866[/C][C]125.3822[/C][C]11.1974[/C][/ROW]
[ROW][C]75[/C][C]0.0348[/C][C]-0.0821[/C][C]0.0068[/C][C]2263.7523[/C][C]188.646[/C][C]13.7348[/C][/ROW]
[ROW][C]76[/C][C]0.0379[/C][C]-0.0801[/C][C]0.0067[/C][C]2097.5138[/C][C]174.7928[/C][C]13.2209[/C][/ROW]
[ROW][C]77[/C][C]0.0407[/C][C]-0.1006[/C][C]0.0084[/C][C]3266.3399[/C][C]272.195[/C][C]16.4983[/C][/ROW]
[ROW][C]78[/C][C]0.0434[/C][C]-0.1244[/C][C]0.0104[/C][C]5023.4955[/C][C]418.6246[/C][C]20.4603[/C][/ROW]
[ROW][C]79[/C][C]0.0459[/C][C]-0.1036[/C][C]0.0086[/C][C]4119.9929[/C][C]343.3327[/C][C]18.5292[/C][/ROW]
[ROW][C]80[/C][C]0.0483[/C][C]-0.1008[/C][C]0.0084[/C][C]4009.4388[/C][C]334.1199[/C][C]18.2789[/C][/ROW]
[ROW][C]81[/C][C]0.0506[/C][C]-0.1324[/C][C]0.011[/C][C]6837.4381[/C][C]569.7865[/C][C]23.8702[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3000&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3000&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
700.012-0.03250.0027389.019932.41835.6937
710.0187-0.04130.0034593.086249.42387.0302
720.0237-0.05920.00491231.8579102.654810.1319
730.0279-0.05040.0042885.561373.79688.5905
740.0315-0.0660.00551504.5866125.382211.1974
750.0348-0.08210.00682263.7523188.64613.7348
760.0379-0.08010.00672097.5138174.792813.2209
770.0407-0.10060.00843266.3399272.19516.4983
780.0434-0.12440.01045023.4955418.624620.4603
790.0459-0.10360.00864119.9929343.332718.5292
800.0483-0.10080.00844009.4388334.119918.2789
810.0506-0.13240.0116837.4381569.786523.8702



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