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 computationSun, 19 Dec 2010 16:08:12 +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/19/t1292776529jdzu13k7vc5wgdn.htm/, Retrieved Sun, 05 May 2024 05:15:58 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112599, Retrieved Sun, 05 May 2024 05:15:58 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsMicha
Estimated Impact147
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting...] [2010-12-19 16:08:12] [d9583efbde8deefb6905064240c280b9] [Current]
-   P     [ARIMA Forecasting] [] [2010-12-27 21:51:15] [b2f924a86c4fbfa8afa1027f3839f526]
-   PD    [ARIMA Forecasting] [paper] [2010-12-28 15:40:56] [83d13bd1a1b3e64dad996f4022b3c29f]
-           [ARIMA Forecasting] [arima forecast - ...] [2010-12-28 18:06:13] [1df589bc3feb749f1946d8c1ee38b85f]
- RMP       [ARIMA Backward Selection] [paper] [2010-12-28 19:15:30] [83d13bd1a1b3e64dad996f4022b3c29f]
-             [ARIMA Backward Selection] [arima backward se...] [2010-12-29 11:14:43] [1df589bc3feb749f1946d8c1ee38b85f]
-           [ARIMA Forecasting] [arima forecasting...] [2010-12-29 11:18:38] [1df589bc3feb749f1946d8c1ee38b85f]
Feedback Forum

Post a new message
Dataseries X:
493
481
462
457
442
439
488
521
501
485
464
460
467
460
448
443
436
431
484
510
513
503
471
471
476
475
470
461
455
456
517
525
523
519
509
512
519
517
510
509
501
507
569
580
578
565
547
555
562
561
555
544
537
543
594
611
613
611
594
595
591
589
584
573
567
569
621
629
628
612
595
597
593
590
580
574
573
573
620
626
620
588
566
557
561
549
532
526
511
499
555
565
542
527
510
514
517
508
493
490
469
478
528
534
518
506
502
516
528
533
536
537
524
536
587
597
581
564
558
575
580
575
563
552
537
545
601
604
586
564
549




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112599&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])
107502-------
108516-------
109528-------
110533-------
111536-------
112537-------
113524-------
114536-------
115587-------
116597-------
117581-------
118564-------
119558-------
120575567.3099553.2006581.41920.14270.90210.902
121580576.4228555.2226597.6230.37040.552310.9557
122575576.7597549.3155604.20380.450.40850.99910.9098
123563573.1285539.7888606.46820.27580.45620.98550.8131
124552572.8477533.795611.90040.14770.68940.9640.7719
125537560.4289515.7749605.08290.15190.64430.94510.5425
126545568.7783518.6012618.95540.17650.89280.89980.6631
127601621.5155565.8769677.15420.23490.99650.8880.9874
128604631.7309570.6844692.77750.18660.83810.86760.991
129586617.7696551.3652684.17390.17420.65780.86110.9611
130564602.8762531.163674.58950.1440.67770.8560.89
131549595.2782518.3054672.25110.11930.78710.82870.8287

\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 & 502 & - & - & - & - & - & - & - \tabularnewline
108 & 516 & - & - & - & - & - & - & - \tabularnewline
109 & 528 & - & - & - & - & - & - & - \tabularnewline
110 & 533 & - & - & - & - & - & - & - \tabularnewline
111 & 536 & - & - & - & - & - & - & - \tabularnewline
112 & 537 & - & - & - & - & - & - & - \tabularnewline
113 & 524 & - & - & - & - & - & - & - \tabularnewline
114 & 536 & - & - & - & - & - & - & - \tabularnewline
115 & 587 & - & - & - & - & - & - & - \tabularnewline
116 & 597 & - & - & - & - & - & - & - \tabularnewline
117 & 581 & - & - & - & - & - & - & - \tabularnewline
118 & 564 & - & - & - & - & - & - & - \tabularnewline
119 & 558 & - & - & - & - & - & - & - \tabularnewline
120 & 575 & 567.3099 & 553.2006 & 581.4192 & 0.1427 & 0.902 & 1 & 0.902 \tabularnewline
121 & 580 & 576.4228 & 555.2226 & 597.623 & 0.3704 & 0.5523 & 1 & 0.9557 \tabularnewline
122 & 575 & 576.7597 & 549.3155 & 604.2038 & 0.45 & 0.4085 & 0.9991 & 0.9098 \tabularnewline
123 & 563 & 573.1285 & 539.7888 & 606.4682 & 0.2758 & 0.4562 & 0.9855 & 0.8131 \tabularnewline
124 & 552 & 572.8477 & 533.795 & 611.9004 & 0.1477 & 0.6894 & 0.964 & 0.7719 \tabularnewline
125 & 537 & 560.4289 & 515.7749 & 605.0829 & 0.1519 & 0.6443 & 0.9451 & 0.5425 \tabularnewline
126 & 545 & 568.7783 & 518.6012 & 618.9554 & 0.1765 & 0.8928 & 0.8998 & 0.6631 \tabularnewline
127 & 601 & 621.5155 & 565.8769 & 677.1542 & 0.2349 & 0.9965 & 0.888 & 0.9874 \tabularnewline
128 & 604 & 631.7309 & 570.6844 & 692.7775 & 0.1866 & 0.8381 & 0.8676 & 0.991 \tabularnewline
129 & 586 & 617.7696 & 551.3652 & 684.1739 & 0.1742 & 0.6578 & 0.8611 & 0.9611 \tabularnewline
130 & 564 & 602.8762 & 531.163 & 674.5895 & 0.144 & 0.6777 & 0.856 & 0.89 \tabularnewline
131 & 549 & 595.2782 & 518.3054 & 672.2511 & 0.1193 & 0.7871 & 0.8287 & 0.8287 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112599&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]502[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]516[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]528[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]533[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]536[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]537[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]524[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]536[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]587[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]597[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]581[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]564[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]558[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]575[/C][C]567.3099[/C][C]553.2006[/C][C]581.4192[/C][C]0.1427[/C][C]0.902[/C][C]1[/C][C]0.902[/C][/ROW]
[ROW][C]121[/C][C]580[/C][C]576.4228[/C][C]555.2226[/C][C]597.623[/C][C]0.3704[/C][C]0.5523[/C][C]1[/C][C]0.9557[/C][/ROW]
[ROW][C]122[/C][C]575[/C][C]576.7597[/C][C]549.3155[/C][C]604.2038[/C][C]0.45[/C][C]0.4085[/C][C]0.9991[/C][C]0.9098[/C][/ROW]
[ROW][C]123[/C][C]563[/C][C]573.1285[/C][C]539.7888[/C][C]606.4682[/C][C]0.2758[/C][C]0.4562[/C][C]0.9855[/C][C]0.8131[/C][/ROW]
[ROW][C]124[/C][C]552[/C][C]572.8477[/C][C]533.795[/C][C]611.9004[/C][C]0.1477[/C][C]0.6894[/C][C]0.964[/C][C]0.7719[/C][/ROW]
[ROW][C]125[/C][C]537[/C][C]560.4289[/C][C]515.7749[/C][C]605.0829[/C][C]0.1519[/C][C]0.6443[/C][C]0.9451[/C][C]0.5425[/C][/ROW]
[ROW][C]126[/C][C]545[/C][C]568.7783[/C][C]518.6012[/C][C]618.9554[/C][C]0.1765[/C][C]0.8928[/C][C]0.8998[/C][C]0.6631[/C][/ROW]
[ROW][C]127[/C][C]601[/C][C]621.5155[/C][C]565.8769[/C][C]677.1542[/C][C]0.2349[/C][C]0.9965[/C][C]0.888[/C][C]0.9874[/C][/ROW]
[ROW][C]128[/C][C]604[/C][C]631.7309[/C][C]570.6844[/C][C]692.7775[/C][C]0.1866[/C][C]0.8381[/C][C]0.8676[/C][C]0.991[/C][/ROW]
[ROW][C]129[/C][C]586[/C][C]617.7696[/C][C]551.3652[/C][C]684.1739[/C][C]0.1742[/C][C]0.6578[/C][C]0.8611[/C][C]0.9611[/C][/ROW]
[ROW][C]130[/C][C]564[/C][C]602.8762[/C][C]531.163[/C][C]674.5895[/C][C]0.144[/C][C]0.6777[/C][C]0.856[/C][C]0.89[/C][/ROW]
[ROW][C]131[/C][C]549[/C][C]595.2782[/C][C]518.3054[/C][C]672.2511[/C][C]0.1193[/C][C]0.7871[/C][C]0.8287[/C][C]0.8287[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112599&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112599&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])
107502-------
108516-------
109528-------
110533-------
111536-------
112537-------
113524-------
114536-------
115587-------
116597-------
117581-------
118564-------
119558-------
120575567.3099553.2006581.41920.14270.90210.902
121580576.4228555.2226597.6230.37040.552310.9557
122575576.7597549.3155604.20380.450.40850.99910.9098
123563573.1285539.7888606.46820.27580.45620.98550.8131
124552572.8477533.795611.90040.14770.68940.9640.7719
125537560.4289515.7749605.08290.15190.64430.94510.5425
126545568.7783518.6012618.95540.17650.89280.89980.6631
127601621.5155565.8769677.15420.23490.99650.8880.9874
128604631.7309570.6844692.77750.18660.83810.86760.991
129586617.7696551.3652684.17390.17420.65780.86110.9611
130564602.8762531.163674.58950.1440.67770.8560.89
131549595.2782518.3054672.25110.11930.78710.82870.8287







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1200.01270.0136059.137600
1210.01880.00620.009912.796335.96695.9972
1220.0243-0.00310.00763.096425.01015.001
1230.0297-0.01770.0101102.586444.40426.6636
1240.0348-0.03640.0154434.6271122.448811.0657
1250.0407-0.04180.0198548.9132193.526213.9114
1260.045-0.04180.0229565.4069246.65215.7052
1270.0457-0.0330.0242420.8871268.431416.3839
1280.0493-0.04390.0264769.004324.050618.0014
1290.0548-0.05140.02891009.3048392.57619.8135
1300.0607-0.06450.03211511.3626494.283922.2325
1310.066-0.07770.03592141.6747631.566425.131

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
120 & 0.0127 & 0.0136 & 0 & 59.1376 & 0 & 0 \tabularnewline
121 & 0.0188 & 0.0062 & 0.0099 & 12.7963 & 35.9669 & 5.9972 \tabularnewline
122 & 0.0243 & -0.0031 & 0.0076 & 3.0964 & 25.0101 & 5.001 \tabularnewline
123 & 0.0297 & -0.0177 & 0.0101 & 102.5864 & 44.4042 & 6.6636 \tabularnewline
124 & 0.0348 & -0.0364 & 0.0154 & 434.6271 & 122.4488 & 11.0657 \tabularnewline
125 & 0.0407 & -0.0418 & 0.0198 & 548.9132 & 193.5262 & 13.9114 \tabularnewline
126 & 0.045 & -0.0418 & 0.0229 & 565.4069 & 246.652 & 15.7052 \tabularnewline
127 & 0.0457 & -0.033 & 0.0242 & 420.8871 & 268.4314 & 16.3839 \tabularnewline
128 & 0.0493 & -0.0439 & 0.0264 & 769.004 & 324.0506 & 18.0014 \tabularnewline
129 & 0.0548 & -0.0514 & 0.0289 & 1009.3048 & 392.576 & 19.8135 \tabularnewline
130 & 0.0607 & -0.0645 & 0.0321 & 1511.3626 & 494.2839 & 22.2325 \tabularnewline
131 & 0.066 & -0.0777 & 0.0359 & 2141.6747 & 631.5664 & 25.131 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112599&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.0127[/C][C]0.0136[/C][C]0[/C][C]59.1376[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]121[/C][C]0.0188[/C][C]0.0062[/C][C]0.0099[/C][C]12.7963[/C][C]35.9669[/C][C]5.9972[/C][/ROW]
[ROW][C]122[/C][C]0.0243[/C][C]-0.0031[/C][C]0.0076[/C][C]3.0964[/C][C]25.0101[/C][C]5.001[/C][/ROW]
[ROW][C]123[/C][C]0.0297[/C][C]-0.0177[/C][C]0.0101[/C][C]102.5864[/C][C]44.4042[/C][C]6.6636[/C][/ROW]
[ROW][C]124[/C][C]0.0348[/C][C]-0.0364[/C][C]0.0154[/C][C]434.6271[/C][C]122.4488[/C][C]11.0657[/C][/ROW]
[ROW][C]125[/C][C]0.0407[/C][C]-0.0418[/C][C]0.0198[/C][C]548.9132[/C][C]193.5262[/C][C]13.9114[/C][/ROW]
[ROW][C]126[/C][C]0.045[/C][C]-0.0418[/C][C]0.0229[/C][C]565.4069[/C][C]246.652[/C][C]15.7052[/C][/ROW]
[ROW][C]127[/C][C]0.0457[/C][C]-0.033[/C][C]0.0242[/C][C]420.8871[/C][C]268.4314[/C][C]16.3839[/C][/ROW]
[ROW][C]128[/C][C]0.0493[/C][C]-0.0439[/C][C]0.0264[/C][C]769.004[/C][C]324.0506[/C][C]18.0014[/C][/ROW]
[ROW][C]129[/C][C]0.0548[/C][C]-0.0514[/C][C]0.0289[/C][C]1009.3048[/C][C]392.576[/C][C]19.8135[/C][/ROW]
[ROW][C]130[/C][C]0.0607[/C][C]-0.0645[/C][C]0.0321[/C][C]1511.3626[/C][C]494.2839[/C][C]22.2325[/C][/ROW]
[ROW][C]131[/C][C]0.066[/C][C]-0.0777[/C][C]0.0359[/C][C]2141.6747[/C][C]631.5664[/C][C]25.131[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112599&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112599&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.01270.0136059.137600
1210.01880.00620.009912.796335.96695.9972
1220.0243-0.00310.00763.096425.01015.001
1230.0297-0.01770.0101102.586444.40426.6636
1240.0348-0.03640.0154434.6271122.448811.0657
1250.0407-0.04180.0198548.9132193.526213.9114
1260.045-0.04180.0229565.4069246.65215.7052
1270.0457-0.0330.0242420.8871268.431416.3839
1280.0493-0.04390.0264769.004324.050618.0014
1290.0548-0.05140.02891009.3048392.57619.8135
1300.0607-0.06450.03211511.3626494.283922.2325
1310.066-0.07770.03592141.6747631.566425.131



Parameters (Session):
par1 = 0 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; 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 = 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')