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 computationTue, 07 Dec 2010 14:55:03 +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/07/t1291733608p97b1ojt2vosrkh.htm/, Retrieved Fri, 03 May 2024 23:44:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106380, Retrieved Fri, 03 May 2024 23:44:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact105
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]
-   PD        [ARIMA Forecasting] [forecasting ] [2010-12-07 14:55:03] [8f110cf3e3846d42560df9b5835185a6] [Current]
Feedback Forum

Post a new message
Dataseries X:
31806
34571
37121
40438
43635
48064
50846
53668
58465
58618
55826
60412
62714
63332
66050
62948
59535
57298
56599
57686
57472
60463
60784
63154
64042
65460
65268
65774
66028
67104
68102
69897
72185
73538
72325
74820
74813
74533
76916
80371
81261
81557
81446
81995
79948




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106380&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[33])
2157472-------
2260463-------
2360784-------
2463154-------
2564042-------
2665460-------
2765268-------
2865774-------
2966028-------
3067104-------
3168102-------
3269897-------
3372185-------
347353873935.868868805.15879251.05840.44170.740710.7407
357232572733.635263796.615382256.2840.46650.43430.9930.545
367482077035.356564063.100591202.78180.37960.74270.97260.7489
377481379436.934862605.491598269.88560.31520.68460.94540.7748
387453381448.563461004.9565104841.31080.28110.71090.90980.7812
397691683571.474959501.0816111720.51670.32150.73540.89870.7861
408037184155.802256764.2609116922.87770.41040.66750.86420.763
418126184436.75153902.4871121794.68920.43380.58450.83290.7398
428155786031.172752202.9861128265.47180.41780.58760.81010.7397
438144687492.444950493.835134596.6080.40070.59750.79010.7379
448199590064.853349709.7641142324.55890.38110.62670.77530.7488
457994893180.870549386.893150760.750.32620.64830.76260.7626

\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[33]) \tabularnewline
21 & 57472 & - & - & - & - & - & - & - \tabularnewline
22 & 60463 & - & - & - & - & - & - & - \tabularnewline
23 & 60784 & - & - & - & - & - & - & - \tabularnewline
24 & 63154 & - & - & - & - & - & - & - \tabularnewline
25 & 64042 & - & - & - & - & - & - & - \tabularnewline
26 & 65460 & - & - & - & - & - & - & - \tabularnewline
27 & 65268 & - & - & - & - & - & - & - \tabularnewline
28 & 65774 & - & - & - & - & - & - & - \tabularnewline
29 & 66028 & - & - & - & - & - & - & - \tabularnewline
30 & 67104 & - & - & - & - & - & - & - \tabularnewline
31 & 68102 & - & - & - & - & - & - & - \tabularnewline
32 & 69897 & - & - & - & - & - & - & - \tabularnewline
33 & 72185 & - & - & - & - & - & - & - \tabularnewline
34 & 73538 & 73935.8688 & 68805.158 & 79251.0584 & 0.4417 & 0.7407 & 1 & 0.7407 \tabularnewline
35 & 72325 & 72733.6352 & 63796.6153 & 82256.284 & 0.4665 & 0.4343 & 0.993 & 0.545 \tabularnewline
36 & 74820 & 77035.3565 & 64063.1005 & 91202.7818 & 0.3796 & 0.7427 & 0.9726 & 0.7489 \tabularnewline
37 & 74813 & 79436.9348 & 62605.4915 & 98269.8856 & 0.3152 & 0.6846 & 0.9454 & 0.7748 \tabularnewline
38 & 74533 & 81448.5634 & 61004.9565 & 104841.3108 & 0.2811 & 0.7109 & 0.9098 & 0.7812 \tabularnewline
39 & 76916 & 83571.4749 & 59501.0816 & 111720.5167 & 0.3215 & 0.7354 & 0.8987 & 0.7861 \tabularnewline
40 & 80371 & 84155.8022 & 56764.2609 & 116922.8777 & 0.4104 & 0.6675 & 0.8642 & 0.763 \tabularnewline
41 & 81261 & 84436.751 & 53902.4871 & 121794.6892 & 0.4338 & 0.5845 & 0.8329 & 0.7398 \tabularnewline
42 & 81557 & 86031.1727 & 52202.9861 & 128265.4718 & 0.4178 & 0.5876 & 0.8101 & 0.7397 \tabularnewline
43 & 81446 & 87492.4449 & 50493.835 & 134596.608 & 0.4007 & 0.5975 & 0.7901 & 0.7379 \tabularnewline
44 & 81995 & 90064.8533 & 49709.7641 & 142324.5589 & 0.3811 & 0.6267 & 0.7753 & 0.7488 \tabularnewline
45 & 79948 & 93180.8705 & 49386.893 & 150760.75 & 0.3262 & 0.6483 & 0.7626 & 0.7626 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106380&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[33])[/C][/ROW]
[ROW][C]21[/C][C]57472[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]22[/C][C]60463[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]23[/C][C]60784[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]24[/C][C]63154[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]64042[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]65460[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]65268[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]65774[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]66028[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]67104[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]68102[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]69897[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]72185[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]73538[/C][C]73935.8688[/C][C]68805.158[/C][C]79251.0584[/C][C]0.4417[/C][C]0.7407[/C][C]1[/C][C]0.7407[/C][/ROW]
[ROW][C]35[/C][C]72325[/C][C]72733.6352[/C][C]63796.6153[/C][C]82256.284[/C][C]0.4665[/C][C]0.4343[/C][C]0.993[/C][C]0.545[/C][/ROW]
[ROW][C]36[/C][C]74820[/C][C]77035.3565[/C][C]64063.1005[/C][C]91202.7818[/C][C]0.3796[/C][C]0.7427[/C][C]0.9726[/C][C]0.7489[/C][/ROW]
[ROW][C]37[/C][C]74813[/C][C]79436.9348[/C][C]62605.4915[/C][C]98269.8856[/C][C]0.3152[/C][C]0.6846[/C][C]0.9454[/C][C]0.7748[/C][/ROW]
[ROW][C]38[/C][C]74533[/C][C]81448.5634[/C][C]61004.9565[/C][C]104841.3108[/C][C]0.2811[/C][C]0.7109[/C][C]0.9098[/C][C]0.7812[/C][/ROW]
[ROW][C]39[/C][C]76916[/C][C]83571.4749[/C][C]59501.0816[/C][C]111720.5167[/C][C]0.3215[/C][C]0.7354[/C][C]0.8987[/C][C]0.7861[/C][/ROW]
[ROW][C]40[/C][C]80371[/C][C]84155.8022[/C][C]56764.2609[/C][C]116922.8777[/C][C]0.4104[/C][C]0.6675[/C][C]0.8642[/C][C]0.763[/C][/ROW]
[ROW][C]41[/C][C]81261[/C][C]84436.751[/C][C]53902.4871[/C][C]121794.6892[/C][C]0.4338[/C][C]0.5845[/C][C]0.8329[/C][C]0.7398[/C][/ROW]
[ROW][C]42[/C][C]81557[/C][C]86031.1727[/C][C]52202.9861[/C][C]128265.4718[/C][C]0.4178[/C][C]0.5876[/C][C]0.8101[/C][C]0.7397[/C][/ROW]
[ROW][C]43[/C][C]81446[/C][C]87492.4449[/C][C]50493.835[/C][C]134596.608[/C][C]0.4007[/C][C]0.5975[/C][C]0.7901[/C][C]0.7379[/C][/ROW]
[ROW][C]44[/C][C]81995[/C][C]90064.8533[/C][C]49709.7641[/C][C]142324.5589[/C][C]0.3811[/C][C]0.6267[/C][C]0.7753[/C][C]0.7488[/C][/ROW]
[ROW][C]45[/C][C]79948[/C][C]93180.8705[/C][C]49386.893[/C][C]150760.75[/C][C]0.3262[/C][C]0.6483[/C][C]0.7626[/C][C]0.7626[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106380&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106380&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[33])
2157472-------
2260463-------
2360784-------
2463154-------
2564042-------
2665460-------
2765268-------
2865774-------
2966028-------
3067104-------
3168102-------
3269897-------
3372185-------
347353873935.868868805.15879251.05840.44170.740710.7407
357232572733.635263796.615382256.2840.46650.43430.9930.545
367482077035.356564063.100591202.78180.37960.74270.97260.7489
377481379436.934862605.491598269.88560.31520.68460.94540.7748
387453381448.563461004.9565104841.31080.28110.71090.90980.7812
397691683571.474959501.0816111720.51670.32150.73540.89870.7861
408037184155.802256764.2609116922.87770.41040.66750.86420.763
418126184436.75153902.4871121794.68920.43380.58450.83290.7398
428155786031.172752202.9861128265.47180.41780.58760.81010.7397
438144687492.444950493.835134596.6080.40070.59750.79010.7379
448199590064.853349709.7641142324.55890.38110.62670.77530.7488
457994893180.870549386.893150760.750.32620.64830.76260.7626







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
340.0367-0.00540158299.556800
350.0668-0.00560.0055166982.702162641.1294403.2879
360.0938-0.02880.01334907804.42661744362.22841320.7431
370.121-0.05820.024521380772.84676653464.8832579.4311
380.1465-0.08490.036647825017.769214887775.46033858.468
390.1718-0.07960.043844295345.949519789037.20854448.4871
400.1987-0.0450.043914324727.772519008421.57474359.8649
410.2257-0.03760.043110085394.273517893043.16214230.0169
420.2505-0.0520.044120018221.059718129174.03964257.8368
430.2747-0.06910.046636559496.213819972206.2574469.0274
440.296-0.08960.050565122532.975224076781.41324906.8097
450.3153-0.1420.0582175108860.785636662788.02766054.9804

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
34 & 0.0367 & -0.0054 & 0 & 158299.5568 & 0 & 0 \tabularnewline
35 & 0.0668 & -0.0056 & 0.0055 & 166982.702 & 162641.1294 & 403.2879 \tabularnewline
36 & 0.0938 & -0.0288 & 0.0133 & 4907804.4266 & 1744362.2284 & 1320.7431 \tabularnewline
37 & 0.121 & -0.0582 & 0.0245 & 21380772.8467 & 6653464.883 & 2579.4311 \tabularnewline
38 & 0.1465 & -0.0849 & 0.0366 & 47825017.7692 & 14887775.4603 & 3858.468 \tabularnewline
39 & 0.1718 & -0.0796 & 0.0438 & 44295345.9495 & 19789037.2085 & 4448.4871 \tabularnewline
40 & 0.1987 & -0.045 & 0.0439 & 14324727.7725 & 19008421.5747 & 4359.8649 \tabularnewline
41 & 0.2257 & -0.0376 & 0.0431 & 10085394.2735 & 17893043.1621 & 4230.0169 \tabularnewline
42 & 0.2505 & -0.052 & 0.0441 & 20018221.0597 & 18129174.0396 & 4257.8368 \tabularnewline
43 & 0.2747 & -0.0691 & 0.0466 & 36559496.2138 & 19972206.257 & 4469.0274 \tabularnewline
44 & 0.296 & -0.0896 & 0.0505 & 65122532.9752 & 24076781.4132 & 4906.8097 \tabularnewline
45 & 0.3153 & -0.142 & 0.0582 & 175108860.7856 & 36662788.0276 & 6054.9804 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106380&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]34[/C][C]0.0367[/C][C]-0.0054[/C][C]0[/C][C]158299.5568[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]35[/C][C]0.0668[/C][C]-0.0056[/C][C]0.0055[/C][C]166982.702[/C][C]162641.1294[/C][C]403.2879[/C][/ROW]
[ROW][C]36[/C][C]0.0938[/C][C]-0.0288[/C][C]0.0133[/C][C]4907804.4266[/C][C]1744362.2284[/C][C]1320.7431[/C][/ROW]
[ROW][C]37[/C][C]0.121[/C][C]-0.0582[/C][C]0.0245[/C][C]21380772.8467[/C][C]6653464.883[/C][C]2579.4311[/C][/ROW]
[ROW][C]38[/C][C]0.1465[/C][C]-0.0849[/C][C]0.0366[/C][C]47825017.7692[/C][C]14887775.4603[/C][C]3858.468[/C][/ROW]
[ROW][C]39[/C][C]0.1718[/C][C]-0.0796[/C][C]0.0438[/C][C]44295345.9495[/C][C]19789037.2085[/C][C]4448.4871[/C][/ROW]
[ROW][C]40[/C][C]0.1987[/C][C]-0.045[/C][C]0.0439[/C][C]14324727.7725[/C][C]19008421.5747[/C][C]4359.8649[/C][/ROW]
[ROW][C]41[/C][C]0.2257[/C][C]-0.0376[/C][C]0.0431[/C][C]10085394.2735[/C][C]17893043.1621[/C][C]4230.0169[/C][/ROW]
[ROW][C]42[/C][C]0.2505[/C][C]-0.052[/C][C]0.0441[/C][C]20018221.0597[/C][C]18129174.0396[/C][C]4257.8368[/C][/ROW]
[ROW][C]43[/C][C]0.2747[/C][C]-0.0691[/C][C]0.0466[/C][C]36559496.2138[/C][C]19972206.257[/C][C]4469.0274[/C][/ROW]
[ROW][C]44[/C][C]0.296[/C][C]-0.0896[/C][C]0.0505[/C][C]65122532.9752[/C][C]24076781.4132[/C][C]4906.8097[/C][/ROW]
[ROW][C]45[/C][C]0.3153[/C][C]-0.142[/C][C]0.0582[/C][C]175108860.7856[/C][C]36662788.0276[/C][C]6054.9804[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106380&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106380&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
340.0367-0.00540158299.556800
350.0668-0.00560.0055166982.702162641.1294403.2879
360.0938-0.02880.01334907804.42661744362.22841320.7431
370.121-0.05820.024521380772.84676653464.8832579.4311
380.1465-0.08490.036647825017.769214887775.46033858.468
390.1718-0.07960.043844295345.949519789037.20854448.4871
400.1987-0.0450.043914324727.772519008421.57474359.8649
410.2257-0.03760.043110085394.273517893043.16214230.0169
420.2505-0.0520.044120018221.059718129174.03964257.8368
430.2747-0.06910.046636559496.213819972206.2574469.0274
440.296-0.08960.050565122532.975224076781.41324906.8097
450.3153-0.1420.0582175108860.785636662788.02766054.9804



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