Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 05 Dec 2011 06:57:13 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/05/t1323086320vxy4vxfe9yiib10.htm/, Retrieved Fri, 03 May 2024 11:20:21 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=150860, Retrieved Fri, 03 May 2024 11:20:21 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact124
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
- R PD        [ARIMA Forecasting] [ARIMA Forecasting] [2011-12-05 11:57:13] [d41d8cd98f00b204e9800998ecf8427e] [Current]
-   P           [ARIMA Forecasting] [Arima Forecasting] [2011-12-07 19:38:22] [bc54fcbdb4f9c071218969745a8ec94b]
Feedback Forum

Post a new message
Dataseries X:
655362
873127
1107897
1555964
1671159
1493308
2957796
2638691
1305669
1280496
921900
867888
652586
913831
1108544
1555827
1699283
1509458
3268975
2425016
1312703
1365498
934453
775019
651142
843192
1146766
1652601
1465906
1652734
2922334
2702805
1458956
1410363
1019279
936574
708917
885295
1099663
1576220
1487870
1488635
2882530
2677026
1404398
1344370
936865
872705
628151
953712
1160384
1400618
1661511
1495347
2918786
2775677
1407026
1370199
964526
850851
683118
847224
1073256
1514326
1503734
1507712
2865698
2788128
1391596
1366378
946295
859626




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\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' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=150860&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' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=150860&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=150860&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' @ jenkins.wessa.net







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])
48872704.999999999-------
49628151-------
50953711.999999999-------
511160384-------
521400618-------
531661511-------
541495347-------
552918786-------
562775677-------
571407026-------
581370199-------
59964525.999999999-------
60850850.999999999-------
61683118663536.6949633757.6625697079.72560.126300.98070
62847224864610.3074808416.2696931710.44860.305810.00460.6561
6310732561134397.47381027887.17511273607.74550.194710.35721
6415143261600424.46941366770.33331968809.59770.32340.99750.85611
6515037341489463.08071290607.14031788188.17090.46270.43520.12951
6615077121585708.92051356828.20451944212.39130.33490.6730.68941
6728656982910688.68282080237.0995918351.38070.48830.81970.49790.9103
6827881282702679.10051987157.62434866648.03320.46920.44130.47360.9533
6913915961437782.56681254184.03551707664.59450.368700.58841
7013663781386986.92461217788.70731630569.31790.43410.48520.55371
71946295988821.5496911601.9571084785.04710.192500.69010.9976
72859626908284.2285845112.0817984758.36560.10620.1650.92950.9295

\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 & 872704.999999999 & - & - & - & - & - & - & - \tabularnewline
49 & 628151 & - & - & - & - & - & - & - \tabularnewline
50 & 953711.999999999 & - & - & - & - & - & - & - \tabularnewline
51 & 1160384 & - & - & - & - & - & - & - \tabularnewline
52 & 1400618 & - & - & - & - & - & - & - \tabularnewline
53 & 1661511 & - & - & - & - & - & - & - \tabularnewline
54 & 1495347 & - & - & - & - & - & - & - \tabularnewline
55 & 2918786 & - & - & - & - & - & - & - \tabularnewline
56 & 2775677 & - & - & - & - & - & - & - \tabularnewline
57 & 1407026 & - & - & - & - & - & - & - \tabularnewline
58 & 1370199 & - & - & - & - & - & - & - \tabularnewline
59 & 964525.999999999 & - & - & - & - & - & - & - \tabularnewline
60 & 850850.999999999 & - & - & - & - & - & - & - \tabularnewline
61 & 683118 & 663536.6949 & 633757.6625 & 697079.7256 & 0.1263 & 0 & 0.9807 & 0 \tabularnewline
62 & 847224 & 864610.3074 & 808416.2696 & 931710.4486 & 0.3058 & 1 & 0.0046 & 0.6561 \tabularnewline
63 & 1073256 & 1134397.4738 & 1027887.1751 & 1273607.7455 & 0.1947 & 1 & 0.3572 & 1 \tabularnewline
64 & 1514326 & 1600424.4694 & 1366770.3333 & 1968809.5977 & 0.3234 & 0.9975 & 0.8561 & 1 \tabularnewline
65 & 1503734 & 1489463.0807 & 1290607.1403 & 1788188.1709 & 0.4627 & 0.4352 & 0.1295 & 1 \tabularnewline
66 & 1507712 & 1585708.9205 & 1356828.2045 & 1944212.3913 & 0.3349 & 0.673 & 0.6894 & 1 \tabularnewline
67 & 2865698 & 2910688.6828 & 2080237.099 & 5918351.3807 & 0.4883 & 0.8197 & 0.4979 & 0.9103 \tabularnewline
68 & 2788128 & 2702679.1005 & 1987157.6243 & 4866648.0332 & 0.4692 & 0.4413 & 0.4736 & 0.9533 \tabularnewline
69 & 1391596 & 1437782.5668 & 1254184.0355 & 1707664.5945 & 0.3687 & 0 & 0.5884 & 1 \tabularnewline
70 & 1366378 & 1386986.9246 & 1217788.7073 & 1630569.3179 & 0.4341 & 0.4852 & 0.5537 & 1 \tabularnewline
71 & 946295 & 988821.5496 & 911601.957 & 1084785.0471 & 0.1925 & 0 & 0.6901 & 0.9976 \tabularnewline
72 & 859626 & 908284.2285 & 845112.0817 & 984758.3656 & 0.1062 & 0.165 & 0.9295 & 0.9295 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=150860&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]872704.999999999[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]628151[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]953711.999999999[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]1160384[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]1400618[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]1661511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]1495347[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]2918786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]2775677[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1407026[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1370199[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]964525.999999999[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]850850.999999999[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]683118[/C][C]663536.6949[/C][C]633757.6625[/C][C]697079.7256[/C][C]0.1263[/C][C]0[/C][C]0.9807[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]847224[/C][C]864610.3074[/C][C]808416.2696[/C][C]931710.4486[/C][C]0.3058[/C][C]1[/C][C]0.0046[/C][C]0.6561[/C][/ROW]
[ROW][C]63[/C][C]1073256[/C][C]1134397.4738[/C][C]1027887.1751[/C][C]1273607.7455[/C][C]0.1947[/C][C]1[/C][C]0.3572[/C][C]1[/C][/ROW]
[ROW][C]64[/C][C]1514326[/C][C]1600424.4694[/C][C]1366770.3333[/C][C]1968809.5977[/C][C]0.3234[/C][C]0.9975[/C][C]0.8561[/C][C]1[/C][/ROW]
[ROW][C]65[/C][C]1503734[/C][C]1489463.0807[/C][C]1290607.1403[/C][C]1788188.1709[/C][C]0.4627[/C][C]0.4352[/C][C]0.1295[/C][C]1[/C][/ROW]
[ROW][C]66[/C][C]1507712[/C][C]1585708.9205[/C][C]1356828.2045[/C][C]1944212.3913[/C][C]0.3349[/C][C]0.673[/C][C]0.6894[/C][C]1[/C][/ROW]
[ROW][C]67[/C][C]2865698[/C][C]2910688.6828[/C][C]2080237.099[/C][C]5918351.3807[/C][C]0.4883[/C][C]0.8197[/C][C]0.4979[/C][C]0.9103[/C][/ROW]
[ROW][C]68[/C][C]2788128[/C][C]2702679.1005[/C][C]1987157.6243[/C][C]4866648.0332[/C][C]0.4692[/C][C]0.4413[/C][C]0.4736[/C][C]0.9533[/C][/ROW]
[ROW][C]69[/C][C]1391596[/C][C]1437782.5668[/C][C]1254184.0355[/C][C]1707664.5945[/C][C]0.3687[/C][C]0[/C][C]0.5884[/C][C]1[/C][/ROW]
[ROW][C]70[/C][C]1366378[/C][C]1386986.9246[/C][C]1217788.7073[/C][C]1630569.3179[/C][C]0.4341[/C][C]0.4852[/C][C]0.5537[/C][C]1[/C][/ROW]
[ROW][C]71[/C][C]946295[/C][C]988821.5496[/C][C]911601.957[/C][C]1084785.0471[/C][C]0.1925[/C][C]0[/C][C]0.6901[/C][C]0.9976[/C][/ROW]
[ROW][C]72[/C][C]859626[/C][C]908284.2285[/C][C]845112.0817[/C][C]984758.3656[/C][C]0.1062[/C][C]0.165[/C][C]0.9295[/C][C]0.9295[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=150860&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=150860&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])
48872704.999999999-------
49628151-------
50953711.999999999-------
511160384-------
521400618-------
531661511-------
541495347-------
552918786-------
562775677-------
571407026-------
581370199-------
59964525.999999999-------
60850850.999999999-------
61683118663536.6949633757.6625697079.72560.126300.98070
62847224864610.3074808416.2696931710.44860.305810.00460.6561
6310732561134397.47381027887.17511273607.74550.194710.35721
6415143261600424.46941366770.33331968809.59770.32340.99750.85611
6515037341489463.08071290607.14031788188.17090.46270.43520.12951
6615077121585708.92051356828.20451944212.39130.33490.6730.68941
6728656982910688.68282080237.0995918351.38070.48830.81970.49790.9103
6827881282702679.10051987157.62434866648.03320.46920.44130.47360.9533
6913915961437782.56681254184.03551707664.59450.368700.58841
7013663781386986.92461217788.70731630569.31790.43410.48520.55371
71946295988821.5496911601.9571084785.04710.192500.69010.9976
72859626908284.2285845112.0817984758.36560.10620.1650.92950.9295







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.02580.02950383427508.417900
620.0396-0.02010.0248302283686.2872342855597.352618516.3603
630.0626-0.05390.03453738279817.79451474663670.833238401.3499
640.1174-0.05380.03937412946432.80942959234361.327354398.8452
650.10230.00960.0334203659137.93072408119316.64849072.5923
660.1153-0.04920.0366083519608.01263020686031.875454960.7681
670.5272-0.01550.03312024161539.80672878325390.151353650.0269
680.40850.03160.03297301514424.20043431224019.407458576.6508
690.0958-0.03210.03282133198955.49453286999012.30657332.3557
700.0896-0.01490.031424727773.0233000771888.377754779.3016
710.0495-0.0430.03211808507419.19122892384209.360753780.8907
720.043-0.05360.03392367623197.01032848654124.998253372.7845

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0258 & 0.0295 & 0 & 383427508.4179 & 0 & 0 \tabularnewline
62 & 0.0396 & -0.0201 & 0.0248 & 302283686.2872 & 342855597.3526 & 18516.3603 \tabularnewline
63 & 0.0626 & -0.0539 & 0.0345 & 3738279817.7945 & 1474663670.8332 & 38401.3499 \tabularnewline
64 & 0.1174 & -0.0538 & 0.0393 & 7412946432.8094 & 2959234361.3273 & 54398.8452 \tabularnewline
65 & 0.1023 & 0.0096 & 0.0334 & 203659137.9307 & 2408119316.648 & 49072.5923 \tabularnewline
66 & 0.1153 & -0.0492 & 0.036 & 6083519608.0126 & 3020686031.8754 & 54960.7681 \tabularnewline
67 & 0.5272 & -0.0155 & 0.0331 & 2024161539.8067 & 2878325390.1513 & 53650.0269 \tabularnewline
68 & 0.4085 & 0.0316 & 0.0329 & 7301514424.2004 & 3431224019.4074 & 58576.6508 \tabularnewline
69 & 0.0958 & -0.0321 & 0.0328 & 2133198955.4945 & 3286999012.306 & 57332.3557 \tabularnewline
70 & 0.0896 & -0.0149 & 0.031 & 424727773.023 & 3000771888.3777 & 54779.3016 \tabularnewline
71 & 0.0495 & -0.043 & 0.0321 & 1808507419.1912 & 2892384209.3607 & 53780.8907 \tabularnewline
72 & 0.043 & -0.0536 & 0.0339 & 2367623197.0103 & 2848654124.9982 & 53372.7845 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=150860&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.0258[/C][C]0.0295[/C][C]0[/C][C]383427508.4179[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.0396[/C][C]-0.0201[/C][C]0.0248[/C][C]302283686.2872[/C][C]342855597.3526[/C][C]18516.3603[/C][/ROW]
[ROW][C]63[/C][C]0.0626[/C][C]-0.0539[/C][C]0.0345[/C][C]3738279817.7945[/C][C]1474663670.8332[/C][C]38401.3499[/C][/ROW]
[ROW][C]64[/C][C]0.1174[/C][C]-0.0538[/C][C]0.0393[/C][C]7412946432.8094[/C][C]2959234361.3273[/C][C]54398.8452[/C][/ROW]
[ROW][C]65[/C][C]0.1023[/C][C]0.0096[/C][C]0.0334[/C][C]203659137.9307[/C][C]2408119316.648[/C][C]49072.5923[/C][/ROW]
[ROW][C]66[/C][C]0.1153[/C][C]-0.0492[/C][C]0.036[/C][C]6083519608.0126[/C][C]3020686031.8754[/C][C]54960.7681[/C][/ROW]
[ROW][C]67[/C][C]0.5272[/C][C]-0.0155[/C][C]0.0331[/C][C]2024161539.8067[/C][C]2878325390.1513[/C][C]53650.0269[/C][/ROW]
[ROW][C]68[/C][C]0.4085[/C][C]0.0316[/C][C]0.0329[/C][C]7301514424.2004[/C][C]3431224019.4074[/C][C]58576.6508[/C][/ROW]
[ROW][C]69[/C][C]0.0958[/C][C]-0.0321[/C][C]0.0328[/C][C]2133198955.4945[/C][C]3286999012.306[/C][C]57332.3557[/C][/ROW]
[ROW][C]70[/C][C]0.0896[/C][C]-0.0149[/C][C]0.031[/C][C]424727773.023[/C][C]3000771888.3777[/C][C]54779.3016[/C][/ROW]
[ROW][C]71[/C][C]0.0495[/C][C]-0.043[/C][C]0.0321[/C][C]1808507419.1912[/C][C]2892384209.3607[/C][C]53780.8907[/C][/ROW]
[ROW][C]72[/C][C]0.043[/C][C]-0.0536[/C][C]0.0339[/C][C]2367623197.0103[/C][C]2848654124.9982[/C][C]53372.7845[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=150860&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=150860&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.02580.02950383427508.417900
620.0396-0.02010.0248302283686.2872342855597.352618516.3603
630.0626-0.05390.03453738279817.79451474663670.833238401.3499
640.1174-0.05380.03937412946432.80942959234361.327354398.8452
650.10230.00960.0334203659137.93072408119316.64849072.5923
660.1153-0.04920.0366083519608.01263020686031.875454960.7681
670.5272-0.01550.03312024161539.80672878325390.151353650.0269
680.40850.03160.03297301514424.20043431224019.407458576.6508
690.0958-0.03210.03282133198955.49453286999012.30657332.3557
700.0896-0.01490.031424727773.0233000771888.377754779.3016
710.0495-0.0430.03211808507419.19122892384209.360753780.8907
720.043-0.05360.03392367623197.01032848654124.998253372.7845



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