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, 19 Dec 2008 07:12:25 -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/2008/Dec/19/t1229695991cryskdu1u2mktik.htm/, Retrieved Wed, 15 May 2024 02:40:32 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35145, Retrieved Wed, 15 May 2024 02:40:32 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact158
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [acf Belgie] [2008-12-18 16:23:46] [005293453b571dbccb80b45226e44173]
-   P   [(Partial) Autocorrelation Function] [acf paper d=1 D=0] [2008-12-18 18:54:33] [005293453b571dbccb80b45226e44173]
-   P     [(Partial) Autocorrelation Function] [acf d=1 D=1] [2008-12-18 19:00:40] [005293453b571dbccb80b45226e44173]
- RMP       [ARIMA Backward Selection] [arima backward be...] [2008-12-18 21:15:10] [005293453b571dbccb80b45226e44173]
-   P         [ARIMA Backward Selection] [arima backward be...] [2008-12-18 21:23:00] [005293453b571dbccb80b45226e44173]
- RMP             [ARIMA Forecasting] [ARIMA forecast we...] [2008-12-19 14:12:25] [80c86a3cb2b11c1c3a9a42d67fc5074f] [Current]
Feedback Forum

Post a new message
Dataseries X:
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
560576
548854
531673
525919
511038
498662
555362
564591
541657
527070
509846
514258
516922
507561
492622
490243
469357
477580
528379
533590
517945




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35145&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[48])
36619916-------
37587625-------
38565742-------
39557274-------
40560576-------
41548854-------
42531673-------
43525919-------
44511038-------
45498662-------
46555362-------
47564591-------
48541657-------
49527070509366494701.7932524030.20680.009000
50509846487483466744.6798508221.32020.01731e-0400
51514258479015453615.8487504414.15130.00330.008700
52516922482317452988.5864511645.41360.01040.016400
53507561470595437804.8367503385.16330.01360.002800
54492622453414417494.1758489333.82420.01620.001600
55490243447660408862.1556486457.84440.01570.011600
56469357432779391302.3597474255.64030.04190.00331e-040
57477580420403376410.3795464395.62050.00540.01462e-040
58528379477103430730.7064523475.29360.01510.4925e-040.0032
59533590486332437696.3281534967.67190.02840.04518e-040.0129
60517945463398412599.6975514196.30250.01770.00340.00130.0013

\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[48]) \tabularnewline
36 & 619916 & - & - & - & - & - & - & - \tabularnewline
37 & 587625 & - & - & - & - & - & - & - \tabularnewline
38 & 565742 & - & - & - & - & - & - & - \tabularnewline
39 & 557274 & - & - & - & - & - & - & - \tabularnewline
40 & 560576 & - & - & - & - & - & - & - \tabularnewline
41 & 548854 & - & - & - & - & - & - & - \tabularnewline
42 & 531673 & - & - & - & - & - & - & - \tabularnewline
43 & 525919 & - & - & - & - & - & - & - \tabularnewline
44 & 511038 & - & - & - & - & - & - & - \tabularnewline
45 & 498662 & - & - & - & - & - & - & - \tabularnewline
46 & 555362 & - & - & - & - & - & - & - \tabularnewline
47 & 564591 & - & - & - & - & - & - & - \tabularnewline
48 & 541657 & - & - & - & - & - & - & - \tabularnewline
49 & 527070 & 509366 & 494701.7932 & 524030.2068 & 0.009 & 0 & 0 & 0 \tabularnewline
50 & 509846 & 487483 & 466744.6798 & 508221.3202 & 0.0173 & 1e-04 & 0 & 0 \tabularnewline
51 & 514258 & 479015 & 453615.8487 & 504414.1513 & 0.0033 & 0.0087 & 0 & 0 \tabularnewline
52 & 516922 & 482317 & 452988.5864 & 511645.4136 & 0.0104 & 0.0164 & 0 & 0 \tabularnewline
53 & 507561 & 470595 & 437804.8367 & 503385.1633 & 0.0136 & 0.0028 & 0 & 0 \tabularnewline
54 & 492622 & 453414 & 417494.1758 & 489333.8242 & 0.0162 & 0.0016 & 0 & 0 \tabularnewline
55 & 490243 & 447660 & 408862.1556 & 486457.8444 & 0.0157 & 0.0116 & 0 & 0 \tabularnewline
56 & 469357 & 432779 & 391302.3597 & 474255.6403 & 0.0419 & 0.0033 & 1e-04 & 0 \tabularnewline
57 & 477580 & 420403 & 376410.3795 & 464395.6205 & 0.0054 & 0.0146 & 2e-04 & 0 \tabularnewline
58 & 528379 & 477103 & 430730.7064 & 523475.2936 & 0.0151 & 0.492 & 5e-04 & 0.0032 \tabularnewline
59 & 533590 & 486332 & 437696.3281 & 534967.6719 & 0.0284 & 0.0451 & 8e-04 & 0.0129 \tabularnewline
60 & 517945 & 463398 & 412599.6975 & 514196.3025 & 0.0177 & 0.0034 & 0.0013 & 0.0013 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35145&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[48])[/C][/ROW]
[ROW][C]36[/C][C]619916[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]587625[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]565742[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]557274[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]560576[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]548854[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]531673[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]525919[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]511038[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]498662[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]555362[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]564591[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]541657[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]527070[/C][C]509366[/C][C]494701.7932[/C][C]524030.2068[/C][C]0.009[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]509846[/C][C]487483[/C][C]466744.6798[/C][C]508221.3202[/C][C]0.0173[/C][C]1e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]514258[/C][C]479015[/C][C]453615.8487[/C][C]504414.1513[/C][C]0.0033[/C][C]0.0087[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]52[/C][C]516922[/C][C]482317[/C][C]452988.5864[/C][C]511645.4136[/C][C]0.0104[/C][C]0.0164[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]53[/C][C]507561[/C][C]470595[/C][C]437804.8367[/C][C]503385.1633[/C][C]0.0136[/C][C]0.0028[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]54[/C][C]492622[/C][C]453414[/C][C]417494.1758[/C][C]489333.8242[/C][C]0.0162[/C][C]0.0016[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]55[/C][C]490243[/C][C]447660[/C][C]408862.1556[/C][C]486457.8444[/C][C]0.0157[/C][C]0.0116[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]56[/C][C]469357[/C][C]432779[/C][C]391302.3597[/C][C]474255.6403[/C][C]0.0419[/C][C]0.0033[/C][C]1e-04[/C][C]0[/C][/ROW]
[ROW][C]57[/C][C]477580[/C][C]420403[/C][C]376410.3795[/C][C]464395.6205[/C][C]0.0054[/C][C]0.0146[/C][C]2e-04[/C][C]0[/C][/ROW]
[ROW][C]58[/C][C]528379[/C][C]477103[/C][C]430730.7064[/C][C]523475.2936[/C][C]0.0151[/C][C]0.492[/C][C]5e-04[/C][C]0.0032[/C][/ROW]
[ROW][C]59[/C][C]533590[/C][C]486332[/C][C]437696.3281[/C][C]534967.6719[/C][C]0.0284[/C][C]0.0451[/C][C]8e-04[/C][C]0.0129[/C][/ROW]
[ROW][C]60[/C][C]517945[/C][C]463398[/C][C]412599.6975[/C][C]514196.3025[/C][C]0.0177[/C][C]0.0034[/C][C]0.0013[/C][C]0.0013[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35145&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35145&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[48])
36619916-------
37587625-------
38565742-------
39557274-------
40560576-------
41548854-------
42531673-------
43525919-------
44511038-------
45498662-------
46555362-------
47564591-------
48541657-------
49527070509366494701.7932524030.20680.009000
50509846487483466744.6798508221.32020.01731e-0400
51514258479015453615.8487504414.15130.00330.008700
52516922482317452988.5864511645.41360.01040.016400
53507561470595437804.8367503385.16330.01360.002800
54492622453414417494.1758489333.82420.01620.001600
55490243447660408862.1556486457.84440.01570.011600
56469357432779391302.3597474255.64030.04190.00331e-040
57477580420403376410.3795464395.62050.00540.01462e-040
58528379477103430730.7064523475.29360.01510.4925e-040.0032
59533590486332437696.3281534967.67190.02840.04518e-040.0129
60517945463398412599.6975514196.30250.01770.00340.00130.0013







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.01470.03480.002931343161626119301.33335110.7046
500.02170.04590.003850010376941675314.08336455.642
510.02710.07360.00611242069049103505754.083310173.7778
520.0310.07170.006119750602599792168.759989.603
530.03560.07860.0065136648515611387376310671.165
540.04040.08650.00721537267264128105605.333311318.3747
550.04420.09510.00791813311889151109324.083312292.6533
560.04890.08450.0071337950084111495840.333310559.1591
570.05340.1360.01133269209329272434110.7516505.5782
580.04960.10750.009262922817621910234814802.1062
590.0510.09720.00812233318564186109880.333313642.2095
600.05590.11770.00982975375209247947934.083315746.3626

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0147 & 0.0348 & 0.0029 & 313431616 & 26119301.3333 & 5110.7046 \tabularnewline
50 & 0.0217 & 0.0459 & 0.0038 & 500103769 & 41675314.0833 & 6455.642 \tabularnewline
51 & 0.0271 & 0.0736 & 0.0061 & 1242069049 & 103505754.0833 & 10173.7778 \tabularnewline
52 & 0.031 & 0.0717 & 0.006 & 1197506025 & 99792168.75 & 9989.603 \tabularnewline
53 & 0.0356 & 0.0786 & 0.0065 & 1366485156 & 113873763 & 10671.165 \tabularnewline
54 & 0.0404 & 0.0865 & 0.0072 & 1537267264 & 128105605.3333 & 11318.3747 \tabularnewline
55 & 0.0442 & 0.0951 & 0.0079 & 1813311889 & 151109324.0833 & 12292.6533 \tabularnewline
56 & 0.0489 & 0.0845 & 0.007 & 1337950084 & 111495840.3333 & 10559.1591 \tabularnewline
57 & 0.0534 & 0.136 & 0.0113 & 3269209329 & 272434110.75 & 16505.5782 \tabularnewline
58 & 0.0496 & 0.1075 & 0.009 & 2629228176 & 219102348 & 14802.1062 \tabularnewline
59 & 0.051 & 0.0972 & 0.0081 & 2233318564 & 186109880.3333 & 13642.2095 \tabularnewline
60 & 0.0559 & 0.1177 & 0.0098 & 2975375209 & 247947934.0833 & 15746.3626 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35145&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]49[/C][C]0.0147[/C][C]0.0348[/C][C]0.0029[/C][C]313431616[/C][C]26119301.3333[/C][C]5110.7046[/C][/ROW]
[ROW][C]50[/C][C]0.0217[/C][C]0.0459[/C][C]0.0038[/C][C]500103769[/C][C]41675314.0833[/C][C]6455.642[/C][/ROW]
[ROW][C]51[/C][C]0.0271[/C][C]0.0736[/C][C]0.0061[/C][C]1242069049[/C][C]103505754.0833[/C][C]10173.7778[/C][/ROW]
[ROW][C]52[/C][C]0.031[/C][C]0.0717[/C][C]0.006[/C][C]1197506025[/C][C]99792168.75[/C][C]9989.603[/C][/ROW]
[ROW][C]53[/C][C]0.0356[/C][C]0.0786[/C][C]0.0065[/C][C]1366485156[/C][C]113873763[/C][C]10671.165[/C][/ROW]
[ROW][C]54[/C][C]0.0404[/C][C]0.0865[/C][C]0.0072[/C][C]1537267264[/C][C]128105605.3333[/C][C]11318.3747[/C][/ROW]
[ROW][C]55[/C][C]0.0442[/C][C]0.0951[/C][C]0.0079[/C][C]1813311889[/C][C]151109324.0833[/C][C]12292.6533[/C][/ROW]
[ROW][C]56[/C][C]0.0489[/C][C]0.0845[/C][C]0.007[/C][C]1337950084[/C][C]111495840.3333[/C][C]10559.1591[/C][/ROW]
[ROW][C]57[/C][C]0.0534[/C][C]0.136[/C][C]0.0113[/C][C]3269209329[/C][C]272434110.75[/C][C]16505.5782[/C][/ROW]
[ROW][C]58[/C][C]0.0496[/C][C]0.1075[/C][C]0.009[/C][C]2629228176[/C][C]219102348[/C][C]14802.1062[/C][/ROW]
[ROW][C]59[/C][C]0.051[/C][C]0.0972[/C][C]0.0081[/C][C]2233318564[/C][C]186109880.3333[/C][C]13642.2095[/C][/ROW]
[ROW][C]60[/C][C]0.0559[/C][C]0.1177[/C][C]0.0098[/C][C]2975375209[/C][C]247947934.0833[/C][C]15746.3626[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35145&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35145&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
490.01470.03480.002931343161626119301.33335110.7046
500.02170.04590.003850010376941675314.08336455.642
510.02710.07360.00611242069049103505754.083310173.7778
520.0310.07170.006119750602599792168.759989.603
530.03560.07860.0065136648515611387376310671.165
540.04040.08650.00721537267264128105605.333311318.3747
550.04420.09510.00791813311889151109324.083312292.6533
560.04890.08450.0071337950084111495840.333310559.1591
570.05340.1360.01133269209329272434110.7516505.5782
580.04960.10750.009262922817621910234814802.1062
590.0510.09720.00812233318564186109880.333313642.2095
600.05590.11770.00982975375209247947934.083315746.3626



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 = 0 ; par7 = 0 ; par8 = 0 ; 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,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)
}
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.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')