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 computationSat, 12 Dec 2009 10:36:09 -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/2009/Dec/12/t126063943633te2dr7i9lb43i.htm/, Retrieved Mon, 29 Apr 2024 16:03:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=67100, Retrieved Mon, 29 Apr 2024 16:03:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact118
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [arima] [2009-12-12 14:22:51] [f84db15a18b564cd160ebc7b4eade151]
-   P   [ARIMA Backward Selection] [Paper. Arima Back...] [2009-12-12 17:29:30] [d31db4f83c6a129f6d3e47077769e868]
- RM        [ARIMA Forecasting] [Paper. Arima Fore...] [2009-12-12 17:36:09] [852eae237d08746109043531619a60c9] [Current]
Feedback Forum

Post a new message
Dataseries X:
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
506174
501866
516141
528222
532638
536322
536535
523597
536214
586570




Summary of computational 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 computational 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=67100&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]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=67100&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67100&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 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[49])
37555362-------
38564591-------
39541657-------
40527070-------
41509846-------
42514258-------
43516922-------
44507561-------
45492622-------
46490243-------
47469357-------
48477580-------
49528379-------
50533590540048.9094523496.264556601.55480.22220.91650.00180.9165
51517945520643.0997498144.7105543141.48890.40710.12970.03360.2502
52506174504831.0757476004.1085533658.0430.46360.18630.06530.0547
53501866488830.0321452959.4004524700.66370.23810.17160.12540.0153
54516141493747.6958452062.5309535432.86070.14620.35130.16740.0517
55528222496291.3865448961.7125543621.06050.0930.20550.19650.092
56532638487299.5436434651.748539947.33920.04570.06380.22530.0631
57536322472426.5629414904.5707529948.55510.01470.02010.24570.0283
58536535470074.7787407923.9837532225.57380.0180.01830.26240.033
59523597449281.1373382774.9521515787.32250.01430.00510.2770.0099
60536214457516.1995386897.9783528134.42070.01450.03330.28880.0246
61586570508335.378433800.2688582870.48710.01980.23170.29910.2991

\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[49]) \tabularnewline
37 & 555362 & - & - & - & - & - & - & - \tabularnewline
38 & 564591 & - & - & - & - & - & - & - \tabularnewline
39 & 541657 & - & - & - & - & - & - & - \tabularnewline
40 & 527070 & - & - & - & - & - & - & - \tabularnewline
41 & 509846 & - & - & - & - & - & - & - \tabularnewline
42 & 514258 & - & - & - & - & - & - & - \tabularnewline
43 & 516922 & - & - & - & - & - & - & - \tabularnewline
44 & 507561 & - & - & - & - & - & - & - \tabularnewline
45 & 492622 & - & - & - & - & - & - & - \tabularnewline
46 & 490243 & - & - & - & - & - & - & - \tabularnewline
47 & 469357 & - & - & - & - & - & - & - \tabularnewline
48 & 477580 & - & - & - & - & - & - & - \tabularnewline
49 & 528379 & - & - & - & - & - & - & - \tabularnewline
50 & 533590 & 540048.9094 & 523496.264 & 556601.5548 & 0.2222 & 0.9165 & 0.0018 & 0.9165 \tabularnewline
51 & 517945 & 520643.0997 & 498144.7105 & 543141.4889 & 0.4071 & 0.1297 & 0.0336 & 0.2502 \tabularnewline
52 & 506174 & 504831.0757 & 476004.1085 & 533658.043 & 0.4636 & 0.1863 & 0.0653 & 0.0547 \tabularnewline
53 & 501866 & 488830.0321 & 452959.4004 & 524700.6637 & 0.2381 & 0.1716 & 0.1254 & 0.0153 \tabularnewline
54 & 516141 & 493747.6958 & 452062.5309 & 535432.8607 & 0.1462 & 0.3513 & 0.1674 & 0.0517 \tabularnewline
55 & 528222 & 496291.3865 & 448961.7125 & 543621.0605 & 0.093 & 0.2055 & 0.1965 & 0.092 \tabularnewline
56 & 532638 & 487299.5436 & 434651.748 & 539947.3392 & 0.0457 & 0.0638 & 0.2253 & 0.0631 \tabularnewline
57 & 536322 & 472426.5629 & 414904.5707 & 529948.5551 & 0.0147 & 0.0201 & 0.2457 & 0.0283 \tabularnewline
58 & 536535 & 470074.7787 & 407923.9837 & 532225.5738 & 0.018 & 0.0183 & 0.2624 & 0.033 \tabularnewline
59 & 523597 & 449281.1373 & 382774.9521 & 515787.3225 & 0.0143 & 0.0051 & 0.277 & 0.0099 \tabularnewline
60 & 536214 & 457516.1995 & 386897.9783 & 528134.4207 & 0.0145 & 0.0333 & 0.2888 & 0.0246 \tabularnewline
61 & 586570 & 508335.378 & 433800.2688 & 582870.4871 & 0.0198 & 0.2317 & 0.2991 & 0.2991 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67100&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[49])[/C][/ROW]
[ROW][C]37[/C][C]555362[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]564591[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]541657[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]527070[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]509846[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]514258[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]516922[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]507561[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]492622[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]490243[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]469357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]477580[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]528379[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]533590[/C][C]540048.9094[/C][C]523496.264[/C][C]556601.5548[/C][C]0.2222[/C][C]0.9165[/C][C]0.0018[/C][C]0.9165[/C][/ROW]
[ROW][C]51[/C][C]517945[/C][C]520643.0997[/C][C]498144.7105[/C][C]543141.4889[/C][C]0.4071[/C][C]0.1297[/C][C]0.0336[/C][C]0.2502[/C][/ROW]
[ROW][C]52[/C][C]506174[/C][C]504831.0757[/C][C]476004.1085[/C][C]533658.043[/C][C]0.4636[/C][C]0.1863[/C][C]0.0653[/C][C]0.0547[/C][/ROW]
[ROW][C]53[/C][C]501866[/C][C]488830.0321[/C][C]452959.4004[/C][C]524700.6637[/C][C]0.2381[/C][C]0.1716[/C][C]0.1254[/C][C]0.0153[/C][/ROW]
[ROW][C]54[/C][C]516141[/C][C]493747.6958[/C][C]452062.5309[/C][C]535432.8607[/C][C]0.1462[/C][C]0.3513[/C][C]0.1674[/C][C]0.0517[/C][/ROW]
[ROW][C]55[/C][C]528222[/C][C]496291.3865[/C][C]448961.7125[/C][C]543621.0605[/C][C]0.093[/C][C]0.2055[/C][C]0.1965[/C][C]0.092[/C][/ROW]
[ROW][C]56[/C][C]532638[/C][C]487299.5436[/C][C]434651.748[/C][C]539947.3392[/C][C]0.0457[/C][C]0.0638[/C][C]0.2253[/C][C]0.0631[/C][/ROW]
[ROW][C]57[/C][C]536322[/C][C]472426.5629[/C][C]414904.5707[/C][C]529948.5551[/C][C]0.0147[/C][C]0.0201[/C][C]0.2457[/C][C]0.0283[/C][/ROW]
[ROW][C]58[/C][C]536535[/C][C]470074.7787[/C][C]407923.9837[/C][C]532225.5738[/C][C]0.018[/C][C]0.0183[/C][C]0.2624[/C][C]0.033[/C][/ROW]
[ROW][C]59[/C][C]523597[/C][C]449281.1373[/C][C]382774.9521[/C][C]515787.3225[/C][C]0.0143[/C][C]0.0051[/C][C]0.277[/C][C]0.0099[/C][/ROW]
[ROW][C]60[/C][C]536214[/C][C]457516.1995[/C][C]386897.9783[/C][C]528134.4207[/C][C]0.0145[/C][C]0.0333[/C][C]0.2888[/C][C]0.0246[/C][/ROW]
[ROW][C]61[/C][C]586570[/C][C]508335.378[/C][C]433800.2688[/C][C]582870.4871[/C][C]0.0198[/C][C]0.2317[/C][C]0.2991[/C][C]0.2991[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67100&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67100&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[49])
37555362-------
38564591-------
39541657-------
40527070-------
41509846-------
42514258-------
43516922-------
44507561-------
45492622-------
46490243-------
47469357-------
48477580-------
49528379-------
50533590540048.9094523496.264556601.55480.22220.91650.00180.9165
51517945520643.0997498144.7105543141.48890.40710.12970.03360.2502
52506174504831.0757476004.1085533658.0430.46360.18630.06530.0547
53501866488830.0321452959.4004524700.66370.23810.17160.12540.0153
54516141493747.6958452062.5309535432.86070.14620.35130.16740.0517
55528222496291.3865448961.7125543621.06050.0930.20550.19650.092
56532638487299.5436434651.748539947.33920.04570.06380.22530.0631
57536322472426.5629414904.5707529948.55510.01470.02010.24570.0283
58536535470074.7787407923.9837532225.57380.0180.01830.26240.033
59523597449281.1373382774.9521515787.32250.01430.00510.2770.0099
60536214457516.1995386897.9783528134.42070.01450.03330.28880.0246
61586570508335.378433800.2688582870.48710.01980.23170.29910.2991







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0156-0.012041717510.95700
510.022-0.00520.00867279741.925624498626.44134949.6087
520.02910.00270.00661803445.574216933566.15224115.0415
530.03740.02670.0116169936459.780255184289.55927428.6129
540.04310.04540.0184501460072.0884144439446.065112018.2963
550.04870.06430.0261019564080.3165290293551.773617038.0032
560.05510.0930.03562055575627.5793542476705.460223291.1293
570.06210.13520.04814082626881.7496984995477.496331384.6376
580.06750.14140.05844416961008.74871366324980.968836963.8334
590.07550.16540.06915522847447.1721781977227.589142213.4721
600.07880.1720.07856193343802.17842183010552.551846722.6985
610.07480.15390.08486120656086.49472511147680.380450111.3528

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0156 & -0.012 & 0 & 41717510.957 & 0 & 0 \tabularnewline
51 & 0.022 & -0.0052 & 0.0086 & 7279741.9256 & 24498626.4413 & 4949.6087 \tabularnewline
52 & 0.0291 & 0.0027 & 0.0066 & 1803445.5742 & 16933566.1522 & 4115.0415 \tabularnewline
53 & 0.0374 & 0.0267 & 0.0116 & 169936459.7802 & 55184289.5592 & 7428.6129 \tabularnewline
54 & 0.0431 & 0.0454 & 0.0184 & 501460072.0884 & 144439446.0651 & 12018.2963 \tabularnewline
55 & 0.0487 & 0.0643 & 0.026 & 1019564080.3165 & 290293551.7736 & 17038.0032 \tabularnewline
56 & 0.0551 & 0.093 & 0.0356 & 2055575627.5793 & 542476705.4602 & 23291.1293 \tabularnewline
57 & 0.0621 & 0.1352 & 0.0481 & 4082626881.7496 & 984995477.4963 & 31384.6376 \tabularnewline
58 & 0.0675 & 0.1414 & 0.0584 & 4416961008.7487 & 1366324980.9688 & 36963.8334 \tabularnewline
59 & 0.0755 & 0.1654 & 0.0691 & 5522847447.172 & 1781977227.5891 & 42213.4721 \tabularnewline
60 & 0.0788 & 0.172 & 0.0785 & 6193343802.1784 & 2183010552.5518 & 46722.6985 \tabularnewline
61 & 0.0748 & 0.1539 & 0.0848 & 6120656086.4947 & 2511147680.3804 & 50111.3528 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67100&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]50[/C][C]0.0156[/C][C]-0.012[/C][C]0[/C][C]41717510.957[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.022[/C][C]-0.0052[/C][C]0.0086[/C][C]7279741.9256[/C][C]24498626.4413[/C][C]4949.6087[/C][/ROW]
[ROW][C]52[/C][C]0.0291[/C][C]0.0027[/C][C]0.0066[/C][C]1803445.5742[/C][C]16933566.1522[/C][C]4115.0415[/C][/ROW]
[ROW][C]53[/C][C]0.0374[/C][C]0.0267[/C][C]0.0116[/C][C]169936459.7802[/C][C]55184289.5592[/C][C]7428.6129[/C][/ROW]
[ROW][C]54[/C][C]0.0431[/C][C]0.0454[/C][C]0.0184[/C][C]501460072.0884[/C][C]144439446.0651[/C][C]12018.2963[/C][/ROW]
[ROW][C]55[/C][C]0.0487[/C][C]0.0643[/C][C]0.026[/C][C]1019564080.3165[/C][C]290293551.7736[/C][C]17038.0032[/C][/ROW]
[ROW][C]56[/C][C]0.0551[/C][C]0.093[/C][C]0.0356[/C][C]2055575627.5793[/C][C]542476705.4602[/C][C]23291.1293[/C][/ROW]
[ROW][C]57[/C][C]0.0621[/C][C]0.1352[/C][C]0.0481[/C][C]4082626881.7496[/C][C]984995477.4963[/C][C]31384.6376[/C][/ROW]
[ROW][C]58[/C][C]0.0675[/C][C]0.1414[/C][C]0.0584[/C][C]4416961008.7487[/C][C]1366324980.9688[/C][C]36963.8334[/C][/ROW]
[ROW][C]59[/C][C]0.0755[/C][C]0.1654[/C][C]0.0691[/C][C]5522847447.172[/C][C]1781977227.5891[/C][C]42213.4721[/C][/ROW]
[ROW][C]60[/C][C]0.0788[/C][C]0.172[/C][C]0.0785[/C][C]6193343802.1784[/C][C]2183010552.5518[/C][C]46722.6985[/C][/ROW]
[ROW][C]61[/C][C]0.0748[/C][C]0.1539[/C][C]0.0848[/C][C]6120656086.4947[/C][C]2511147680.3804[/C][C]50111.3528[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67100&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67100&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
500.0156-0.012041717510.95700
510.022-0.00520.00867279741.925624498626.44134949.6087
520.02910.00270.00661803445.574216933566.15224115.0415
530.03740.02670.0116169936459.780255184289.55927428.6129
540.04310.04540.0184501460072.0884144439446.065112018.2963
550.04870.06430.0261019564080.3165290293551.773617038.0032
560.05510.0930.03562055575627.5793542476705.460223291.1293
570.06210.13520.04814082626881.7496984995477.496331384.6376
580.06750.14140.05844416961008.74871366324980.968836963.8334
590.07550.16540.06915522847447.1721781977227.589142213.4721
600.07880.1720.07856193343802.17842183010552.551846722.6985
610.07480.15390.08486120656086.49472511147680.380450111.3528



Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; 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,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')