Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 05 Dec 2007 14:20:36 -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/05/t1196890104fgr1vbm4srdzau7.htm/, Retrieved Thu, 02 May 2024 15:59:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2527, Retrieved Thu, 02 May 2024 15:59:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsForecast
Estimated Impact190
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Forecast] [2007-12-05 21:20:36] [a1c3b9772d97ad2d7bb67d4cdac038f3] [Current]
Feedback Forum

Post a new message
Dataseries X:
467037
460070
447988
442867
436087
431328
484015
509673
512927
502831
470984
471067
476049
474605
470439
461251
454724
455626
516847
525192
522975
518585
509239
512238
519164
517009
509933
509127
500857
506971
569323
579714
577992
565464
547344
554788
562325
560854
555332
543599
536662
542722
593530
610763
612613
611324
594167
595454
590865
589379
584428
573100
567456
569028
620735
628884
628232
612117
595404
597141
593408
590072
579799
574205
572775
572942
619567
625809
619916
587625
565742
557274




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2527&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[60])
48595454-------
49590865-------
50589379-------
51584428-------
52573100-------
53567456-------
54569028-------
55620735-------
56628884-------
57628232-------
58612117-------
59595404-------
60597141-------
61593408599261.4311585370.0749613482.44170.20990.6150.87640.615
62590072598029.3399577329.4764619471.38680.23350.66360.78540.5324
63579799592254.2185568180.8189617347.59010.16530.56770.72950.3513
64574205581930.5759556001.2587609069.11610.28840.56120.73820.136
65572775574900.3059547347.8258603839.72710.44280.51880.69290.066
66572942578289.8408548674.655609503.53170.36850.63540.71960.1183
67619567635692.8018601104.3454672271.53050.19380.99960.78860.9806
68625809648320.3089611076.2024687834.38360.13210.92310.83250.9944
69619916648290.4917609195.8415689894.00950.09070.85520.82770.992
70587625637195.13597047.6296680042.28390.01170.78540.87430.9665
71565742618875.7638578287.7141662312.55090.00830.92070.85520.8366
72557274621473.713579179.4944666856.44030.00280.9920.85330.8533

\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[60]) \tabularnewline
48 & 595454 & - & - & - & - & - & - & - \tabularnewline
49 & 590865 & - & - & - & - & - & - & - \tabularnewline
50 & 589379 & - & - & - & - & - & - & - \tabularnewline
51 & 584428 & - & - & - & - & - & - & - \tabularnewline
52 & 573100 & - & - & - & - & - & - & - \tabularnewline
53 & 567456 & - & - & - & - & - & - & - \tabularnewline
54 & 569028 & - & - & - & - & - & - & - \tabularnewline
55 & 620735 & - & - & - & - & - & - & - \tabularnewline
56 & 628884 & - & - & - & - & - & - & - \tabularnewline
57 & 628232 & - & - & - & - & - & - & - \tabularnewline
58 & 612117 & - & - & - & - & - & - & - \tabularnewline
59 & 595404 & - & - & - & - & - & - & - \tabularnewline
60 & 597141 & - & - & - & - & - & - & - \tabularnewline
61 & 593408 & 599261.4311 & 585370.0749 & 613482.4417 & 0.2099 & 0.615 & 0.8764 & 0.615 \tabularnewline
62 & 590072 & 598029.3399 & 577329.4764 & 619471.3868 & 0.2335 & 0.6636 & 0.7854 & 0.5324 \tabularnewline
63 & 579799 & 592254.2185 & 568180.8189 & 617347.5901 & 0.1653 & 0.5677 & 0.7295 & 0.3513 \tabularnewline
64 & 574205 & 581930.5759 & 556001.2587 & 609069.1161 & 0.2884 & 0.5612 & 0.7382 & 0.136 \tabularnewline
65 & 572775 & 574900.3059 & 547347.8258 & 603839.7271 & 0.4428 & 0.5188 & 0.6929 & 0.066 \tabularnewline
66 & 572942 & 578289.8408 & 548674.655 & 609503.5317 & 0.3685 & 0.6354 & 0.7196 & 0.1183 \tabularnewline
67 & 619567 & 635692.8018 & 601104.3454 & 672271.5305 & 0.1938 & 0.9996 & 0.7886 & 0.9806 \tabularnewline
68 & 625809 & 648320.3089 & 611076.2024 & 687834.3836 & 0.1321 & 0.9231 & 0.8325 & 0.9944 \tabularnewline
69 & 619916 & 648290.4917 & 609195.8415 & 689894.0095 & 0.0907 & 0.8552 & 0.8277 & 0.992 \tabularnewline
70 & 587625 & 637195.13 & 597047.6296 & 680042.2839 & 0.0117 & 0.7854 & 0.8743 & 0.9665 \tabularnewline
71 & 565742 & 618875.7638 & 578287.7141 & 662312.5509 & 0.0083 & 0.9207 & 0.8552 & 0.8366 \tabularnewline
72 & 557274 & 621473.713 & 579179.4944 & 666856.4403 & 0.0028 & 0.992 & 0.8533 & 0.8533 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2527&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[60])[/C][/ROW]
[ROW][C]48[/C][C]595454[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]590865[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]589379[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]584428[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]573100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]567456[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]569028[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]620735[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]628884[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]628232[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]612117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]595404[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]597141[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]593408[/C][C]599261.4311[/C][C]585370.0749[/C][C]613482.4417[/C][C]0.2099[/C][C]0.615[/C][C]0.8764[/C][C]0.615[/C][/ROW]
[ROW][C]62[/C][C]590072[/C][C]598029.3399[/C][C]577329.4764[/C][C]619471.3868[/C][C]0.2335[/C][C]0.6636[/C][C]0.7854[/C][C]0.5324[/C][/ROW]
[ROW][C]63[/C][C]579799[/C][C]592254.2185[/C][C]568180.8189[/C][C]617347.5901[/C][C]0.1653[/C][C]0.5677[/C][C]0.7295[/C][C]0.3513[/C][/ROW]
[ROW][C]64[/C][C]574205[/C][C]581930.5759[/C][C]556001.2587[/C][C]609069.1161[/C][C]0.2884[/C][C]0.5612[/C][C]0.7382[/C][C]0.136[/C][/ROW]
[ROW][C]65[/C][C]572775[/C][C]574900.3059[/C][C]547347.8258[/C][C]603839.7271[/C][C]0.4428[/C][C]0.5188[/C][C]0.6929[/C][C]0.066[/C][/ROW]
[ROW][C]66[/C][C]572942[/C][C]578289.8408[/C][C]548674.655[/C][C]609503.5317[/C][C]0.3685[/C][C]0.6354[/C][C]0.7196[/C][C]0.1183[/C][/ROW]
[ROW][C]67[/C][C]619567[/C][C]635692.8018[/C][C]601104.3454[/C][C]672271.5305[/C][C]0.1938[/C][C]0.9996[/C][C]0.7886[/C][C]0.9806[/C][/ROW]
[ROW][C]68[/C][C]625809[/C][C]648320.3089[/C][C]611076.2024[/C][C]687834.3836[/C][C]0.1321[/C][C]0.9231[/C][C]0.8325[/C][C]0.9944[/C][/ROW]
[ROW][C]69[/C][C]619916[/C][C]648290.4917[/C][C]609195.8415[/C][C]689894.0095[/C][C]0.0907[/C][C]0.8552[/C][C]0.8277[/C][C]0.992[/C][/ROW]
[ROW][C]70[/C][C]587625[/C][C]637195.13[/C][C]597047.6296[/C][C]680042.2839[/C][C]0.0117[/C][C]0.7854[/C][C]0.8743[/C][C]0.9665[/C][/ROW]
[ROW][C]71[/C][C]565742[/C][C]618875.7638[/C][C]578287.7141[/C][C]662312.5509[/C][C]0.0083[/C][C]0.9207[/C][C]0.8552[/C][C]0.8366[/C][/ROW]
[ROW][C]72[/C][C]557274[/C][C]621473.713[/C][C]579179.4944[/C][C]666856.4403[/C][C]0.0028[/C][C]0.992[/C][C]0.8533[/C][C]0.8533[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2527&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2527&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[60])
48595454-------
49590865-------
50589379-------
51584428-------
52573100-------
53567456-------
54569028-------
55620735-------
56628884-------
57628232-------
58612117-------
59595404-------
60597141-------
61593408599261.4311585370.0749613482.44170.20990.6150.87640.615
62590072598029.3399577329.4764619471.38680.23350.66360.78540.5324
63579799592254.2185568180.8189617347.59010.16530.56770.72950.3513
64574205581930.5759556001.2587609069.11610.28840.56120.73820.136
65572775574900.3059547347.8258603839.72710.44280.51880.69290.066
66572942578289.8408548674.655609503.53170.36850.63540.71960.1183
67619567635692.8018601104.3454672271.53050.19380.99960.78860.9806
68625809648320.3089611076.2024687834.38360.13210.92310.83250.9944
69619916648290.4917609195.8415689894.00950.09070.85520.82770.992
70587625637195.13597047.6296680042.28390.01170.78540.87430.9665
71565742618875.7638578287.7141662312.55090.00830.92070.85520.8366
72557274621473.713579179.4944666856.44030.00280.9920.85330.8533







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0121-0.00988e-0434262656.19212855221.34931689.74
620.0183-0.01330.001163319258.32195276604.86022297.0862
630.0216-0.0210.0018155132467.441212927705.62013595.5119
640.0238-0.01330.001159684523.64874973710.30412230.1817
650.0257-0.00373e-044516925.3216376410.4435613.523
660.0275-0.00928e-0428599401.25132383283.43761543.7887
670.0294-0.02540.0021260041484.661321670123.72184655.118
680.0311-0.03470.0029506759030.054342229919.17126498.4551
690.0327-0.04380.0036805111778.28567092648.19048191.0102
700.0343-0.07780.00652457197786.2671204766482.188914309.6639
710.0358-0.08590.00722823196857.003235266404.750215338.3964
720.0373-0.10330.00864121603147.4731343466928.956118532.8608

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0121 & -0.0098 & 8e-04 & 34262656.1921 & 2855221.3493 & 1689.74 \tabularnewline
62 & 0.0183 & -0.0133 & 0.0011 & 63319258.3219 & 5276604.8602 & 2297.0862 \tabularnewline
63 & 0.0216 & -0.021 & 0.0018 & 155132467.4412 & 12927705.6201 & 3595.5119 \tabularnewline
64 & 0.0238 & -0.0133 & 0.0011 & 59684523.6487 & 4973710.3041 & 2230.1817 \tabularnewline
65 & 0.0257 & -0.0037 & 3e-04 & 4516925.3216 & 376410.4435 & 613.523 \tabularnewline
66 & 0.0275 & -0.0092 & 8e-04 & 28599401.2513 & 2383283.4376 & 1543.7887 \tabularnewline
67 & 0.0294 & -0.0254 & 0.0021 & 260041484.6613 & 21670123.7218 & 4655.118 \tabularnewline
68 & 0.0311 & -0.0347 & 0.0029 & 506759030.0543 & 42229919.1712 & 6498.4551 \tabularnewline
69 & 0.0327 & -0.0438 & 0.0036 & 805111778.285 & 67092648.1904 & 8191.0102 \tabularnewline
70 & 0.0343 & -0.0778 & 0.0065 & 2457197786.2671 & 204766482.1889 & 14309.6639 \tabularnewline
71 & 0.0358 & -0.0859 & 0.0072 & 2823196857.003 & 235266404.7502 & 15338.3964 \tabularnewline
72 & 0.0373 & -0.1033 & 0.0086 & 4121603147.4731 & 343466928.9561 & 18532.8608 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2527&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]61[/C][C]0.0121[/C][C]-0.0098[/C][C]8e-04[/C][C]34262656.1921[/C][C]2855221.3493[/C][C]1689.74[/C][/ROW]
[ROW][C]62[/C][C]0.0183[/C][C]-0.0133[/C][C]0.0011[/C][C]63319258.3219[/C][C]5276604.8602[/C][C]2297.0862[/C][/ROW]
[ROW][C]63[/C][C]0.0216[/C][C]-0.021[/C][C]0.0018[/C][C]155132467.4412[/C][C]12927705.6201[/C][C]3595.5119[/C][/ROW]
[ROW][C]64[/C][C]0.0238[/C][C]-0.0133[/C][C]0.0011[/C][C]59684523.6487[/C][C]4973710.3041[/C][C]2230.1817[/C][/ROW]
[ROW][C]65[/C][C]0.0257[/C][C]-0.0037[/C][C]3e-04[/C][C]4516925.3216[/C][C]376410.4435[/C][C]613.523[/C][/ROW]
[ROW][C]66[/C][C]0.0275[/C][C]-0.0092[/C][C]8e-04[/C][C]28599401.2513[/C][C]2383283.4376[/C][C]1543.7887[/C][/ROW]
[ROW][C]67[/C][C]0.0294[/C][C]-0.0254[/C][C]0.0021[/C][C]260041484.6613[/C][C]21670123.7218[/C][C]4655.118[/C][/ROW]
[ROW][C]68[/C][C]0.0311[/C][C]-0.0347[/C][C]0.0029[/C][C]506759030.0543[/C][C]42229919.1712[/C][C]6498.4551[/C][/ROW]
[ROW][C]69[/C][C]0.0327[/C][C]-0.0438[/C][C]0.0036[/C][C]805111778.285[/C][C]67092648.1904[/C][C]8191.0102[/C][/ROW]
[ROW][C]70[/C][C]0.0343[/C][C]-0.0778[/C][C]0.0065[/C][C]2457197786.2671[/C][C]204766482.1889[/C][C]14309.6639[/C][/ROW]
[ROW][C]71[/C][C]0.0358[/C][C]-0.0859[/C][C]0.0072[/C][C]2823196857.003[/C][C]235266404.7502[/C][C]15338.3964[/C][/ROW]
[ROW][C]72[/C][C]0.0373[/C][C]-0.1033[/C][C]0.0086[/C][C]4121603147.4731[/C][C]343466928.9561[/C][C]18532.8608[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2527&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2527&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
610.0121-0.00988e-0434262656.19212855221.34931689.74
620.0183-0.01330.001163319258.32195276604.86022297.0862
630.0216-0.0210.0018155132467.441212927705.62013595.5119
640.0238-0.01330.001159684523.64874973710.30412230.1817
650.0257-0.00373e-044516925.3216376410.4435613.523
660.0275-0.00928e-0428599401.25132383283.43761543.7887
670.0294-0.02540.0021260041484.661321670123.72184655.118
680.0311-0.03470.0029506759030.054342229919.17126498.4551
690.0327-0.04380.0036805111778.28567092648.19048191.0102
700.0343-0.07780.00652457197786.2671204766482.188914309.6639
710.0358-0.08590.00722823196857.003235266404.750215338.3964
720.0373-0.10330.00864121603147.4731343466928.956118532.8608



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