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 computationThu, 10 Dec 2009 11:08:29 -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/10/t1260468532kg2i09wveyys8f7.htm/, Retrieved Wed, 24 Apr 2024 22:01:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=65670, Retrieved Wed, 24 Apr 2024 22:01:12 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact161
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Shw10: ARIMA Fore...] [2009-12-04 15:42:20] [3c8b83428ce260cd44df892bb7619588]
-    D  [ARIMA Forecasting] [Shw10: Forecastin...] [2009-12-05 10:55:15] [3c8b83428ce260cd44df892bb7619588]
-   P       [ARIMA Forecasting] [Shw10: Forecastin...] [2009-12-10 18:08:29] [a5c6be3c0aa55fdb2a703a08e16947ef] [Current]
Feedback Forum

Post a new message
Dataseries X:
0.7461
0.7775
0.7790
0.7744
0.7905
0.7719
0.7811
0.7557
0.7637
0.7595
0.7471
0.7615
0.7487
0.7389
0.7337
0.7510
0.7382
0.7159
0.7542
0.7636
0.7433
0.7658
0.7627
0.7480
0.7692
0.7850
0.7913
0.7720
0.7880
0.8070
0.8268
0.8244
0.8487
0.8572
0.8214
0.8827
0.9216
0.8865
0.8816
0.8884
0.9466
0.9180
0.9337
0.9559
0.9626
0.9434
0.8639
0.7996
0.6680
0.6572
0.6928
0.6438
0.6454
0.6873
0.7265
0.7912




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=65670&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[44])
320.8244-------
330.8487-------
340.8572-------
350.8214-------
360.8827-------
370.9216-------
380.8865-------
390.8816-------
400.8884-------
410.9466-------
420.918-------
430.9337-------
440.9559-------
450.96260.94810.90520.9910.25350.360310.3603
460.94340.94760.89511.00020.43710.28850.99960.379
470.86390.94760.88731.0080.00330.554510.394
480.79960.94760.88041.014800.99270.97080.4046
490.6680.94760.87421.0211010.75630.4125
500.65720.94760.86841.0268010.93490.4188
510.69280.94760.86311.0321010.93710.4239
520.64380.94760.85811.0372010.90250.4281
530.64540.94760.85331.0419010.50840.4317
540.68730.94760.84881.0465010.72150.4348
550.72650.94760.84441.0508010.60420.4375
560.79120.94760.84031.0550.002110.43990.4399

\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[44]) \tabularnewline
32 & 0.8244 & - & - & - & - & - & - & - \tabularnewline
33 & 0.8487 & - & - & - & - & - & - & - \tabularnewline
34 & 0.8572 & - & - & - & - & - & - & - \tabularnewline
35 & 0.8214 & - & - & - & - & - & - & - \tabularnewline
36 & 0.8827 & - & - & - & - & - & - & - \tabularnewline
37 & 0.9216 & - & - & - & - & - & - & - \tabularnewline
38 & 0.8865 & - & - & - & - & - & - & - \tabularnewline
39 & 0.8816 & - & - & - & - & - & - & - \tabularnewline
40 & 0.8884 & - & - & - & - & - & - & - \tabularnewline
41 & 0.9466 & - & - & - & - & - & - & - \tabularnewline
42 & 0.918 & - & - & - & - & - & - & - \tabularnewline
43 & 0.9337 & - & - & - & - & - & - & - \tabularnewline
44 & 0.9559 & - & - & - & - & - & - & - \tabularnewline
45 & 0.9626 & 0.9481 & 0.9052 & 0.991 & 0.2535 & 0.3603 & 1 & 0.3603 \tabularnewline
46 & 0.9434 & 0.9476 & 0.8951 & 1.0002 & 0.4371 & 0.2885 & 0.9996 & 0.379 \tabularnewline
47 & 0.8639 & 0.9476 & 0.8873 & 1.008 & 0.0033 & 0.5545 & 1 & 0.394 \tabularnewline
48 & 0.7996 & 0.9476 & 0.8804 & 1.0148 & 0 & 0.9927 & 0.9708 & 0.4046 \tabularnewline
49 & 0.668 & 0.9476 & 0.8742 & 1.0211 & 0 & 1 & 0.7563 & 0.4125 \tabularnewline
50 & 0.6572 & 0.9476 & 0.8684 & 1.0268 & 0 & 1 & 0.9349 & 0.4188 \tabularnewline
51 & 0.6928 & 0.9476 & 0.8631 & 1.0321 & 0 & 1 & 0.9371 & 0.4239 \tabularnewline
52 & 0.6438 & 0.9476 & 0.8581 & 1.0372 & 0 & 1 & 0.9025 & 0.4281 \tabularnewline
53 & 0.6454 & 0.9476 & 0.8533 & 1.0419 & 0 & 1 & 0.5084 & 0.4317 \tabularnewline
54 & 0.6873 & 0.9476 & 0.8488 & 1.0465 & 0 & 1 & 0.7215 & 0.4348 \tabularnewline
55 & 0.7265 & 0.9476 & 0.8444 & 1.0508 & 0 & 1 & 0.6042 & 0.4375 \tabularnewline
56 & 0.7912 & 0.9476 & 0.8403 & 1.055 & 0.0021 & 1 & 0.4399 & 0.4399 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=65670&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[44])[/C][/ROW]
[ROW][C]32[/C][C]0.8244[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]0.8487[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]0.8572[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]0.8214[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]0.8827[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]0.9216[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]0.8865[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]0.8816[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]0.8884[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]0.9466[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]0.918[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]0.9337[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]0.9559[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]0.9626[/C][C]0.9481[/C][C]0.9052[/C][C]0.991[/C][C]0.2535[/C][C]0.3603[/C][C]1[/C][C]0.3603[/C][/ROW]
[ROW][C]46[/C][C]0.9434[/C][C]0.9476[/C][C]0.8951[/C][C]1.0002[/C][C]0.4371[/C][C]0.2885[/C][C]0.9996[/C][C]0.379[/C][/ROW]
[ROW][C]47[/C][C]0.8639[/C][C]0.9476[/C][C]0.8873[/C][C]1.008[/C][C]0.0033[/C][C]0.5545[/C][C]1[/C][C]0.394[/C][/ROW]
[ROW][C]48[/C][C]0.7996[/C][C]0.9476[/C][C]0.8804[/C][C]1.0148[/C][C]0[/C][C]0.9927[/C][C]0.9708[/C][C]0.4046[/C][/ROW]
[ROW][C]49[/C][C]0.668[/C][C]0.9476[/C][C]0.8742[/C][C]1.0211[/C][C]0[/C][C]1[/C][C]0.7563[/C][C]0.4125[/C][/ROW]
[ROW][C]50[/C][C]0.6572[/C][C]0.9476[/C][C]0.8684[/C][C]1.0268[/C][C]0[/C][C]1[/C][C]0.9349[/C][C]0.4188[/C][/ROW]
[ROW][C]51[/C][C]0.6928[/C][C]0.9476[/C][C]0.8631[/C][C]1.0321[/C][C]0[/C][C]1[/C][C]0.9371[/C][C]0.4239[/C][/ROW]
[ROW][C]52[/C][C]0.6438[/C][C]0.9476[/C][C]0.8581[/C][C]1.0372[/C][C]0[/C][C]1[/C][C]0.9025[/C][C]0.4281[/C][/ROW]
[ROW][C]53[/C][C]0.6454[/C][C]0.9476[/C][C]0.8533[/C][C]1.0419[/C][C]0[/C][C]1[/C][C]0.5084[/C][C]0.4317[/C][/ROW]
[ROW][C]54[/C][C]0.6873[/C][C]0.9476[/C][C]0.8488[/C][C]1.0465[/C][C]0[/C][C]1[/C][C]0.7215[/C][C]0.4348[/C][/ROW]
[ROW][C]55[/C][C]0.7265[/C][C]0.9476[/C][C]0.8444[/C][C]1.0508[/C][C]0[/C][C]1[/C][C]0.6042[/C][C]0.4375[/C][/ROW]
[ROW][C]56[/C][C]0.7912[/C][C]0.9476[/C][C]0.8403[/C][C]1.055[/C][C]0.0021[/C][C]1[/C][C]0.4399[/C][C]0.4399[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=65670&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=65670&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[44])
320.8244-------
330.8487-------
340.8572-------
350.8214-------
360.8827-------
370.9216-------
380.8865-------
390.8816-------
400.8884-------
410.9466-------
420.918-------
430.9337-------
440.9559-------
450.96260.94810.90520.9910.25350.360310.3603
460.94340.94760.89511.00020.43710.28850.99960.379
470.86390.94760.88731.0080.00330.554510.394
480.79960.94760.88041.014800.99270.97080.4046
490.6680.94760.87421.0211010.75630.4125
500.65720.94760.86841.0268010.93490.4188
510.69280.94760.86311.0321010.93710.4239
520.64380.94760.85811.0372010.90250.4281
530.64540.94760.85331.0419010.50840.4317
540.68730.94760.84881.0465010.72150.4348
550.72650.94760.84441.0508010.60420.4375
560.79120.94760.84031.0550.002110.43990.4399







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
450.02310.01530.00132e-0400.0042
460.0283-0.00454e-04000.0012
470.0325-0.08830.00740.0076e-040.0242
480.0362-0.15620.0130.02190.00180.0427
490.0395-0.29510.02460.07820.00650.0807
500.0426-0.30650.02550.08430.0070.0838
510.0455-0.26890.02240.06490.00540.0736
520.0482-0.32060.02670.09230.00770.0877
530.0508-0.31890.02660.09130.00760.0872
540.0532-0.27470.02290.06780.00560.0751
550.0556-0.23330.01940.04890.00410.0638
560.0578-0.16510.01380.02450.0020.0452

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
45 & 0.0231 & 0.0153 & 0.0013 & 2e-04 & 0 & 0.0042 \tabularnewline
46 & 0.0283 & -0.0045 & 4e-04 & 0 & 0 & 0.0012 \tabularnewline
47 & 0.0325 & -0.0883 & 0.0074 & 0.007 & 6e-04 & 0.0242 \tabularnewline
48 & 0.0362 & -0.1562 & 0.013 & 0.0219 & 0.0018 & 0.0427 \tabularnewline
49 & 0.0395 & -0.2951 & 0.0246 & 0.0782 & 0.0065 & 0.0807 \tabularnewline
50 & 0.0426 & -0.3065 & 0.0255 & 0.0843 & 0.007 & 0.0838 \tabularnewline
51 & 0.0455 & -0.2689 & 0.0224 & 0.0649 & 0.0054 & 0.0736 \tabularnewline
52 & 0.0482 & -0.3206 & 0.0267 & 0.0923 & 0.0077 & 0.0877 \tabularnewline
53 & 0.0508 & -0.3189 & 0.0266 & 0.0913 & 0.0076 & 0.0872 \tabularnewline
54 & 0.0532 & -0.2747 & 0.0229 & 0.0678 & 0.0056 & 0.0751 \tabularnewline
55 & 0.0556 & -0.2333 & 0.0194 & 0.0489 & 0.0041 & 0.0638 \tabularnewline
56 & 0.0578 & -0.1651 & 0.0138 & 0.0245 & 0.002 & 0.0452 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=65670&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]45[/C][C]0.0231[/C][C]0.0153[/C][C]0.0013[/C][C]2e-04[/C][C]0[/C][C]0.0042[/C][/ROW]
[ROW][C]46[/C][C]0.0283[/C][C]-0.0045[/C][C]4e-04[/C][C]0[/C][C]0[/C][C]0.0012[/C][/ROW]
[ROW][C]47[/C][C]0.0325[/C][C]-0.0883[/C][C]0.0074[/C][C]0.007[/C][C]6e-04[/C][C]0.0242[/C][/ROW]
[ROW][C]48[/C][C]0.0362[/C][C]-0.1562[/C][C]0.013[/C][C]0.0219[/C][C]0.0018[/C][C]0.0427[/C][/ROW]
[ROW][C]49[/C][C]0.0395[/C][C]-0.2951[/C][C]0.0246[/C][C]0.0782[/C][C]0.0065[/C][C]0.0807[/C][/ROW]
[ROW][C]50[/C][C]0.0426[/C][C]-0.3065[/C][C]0.0255[/C][C]0.0843[/C][C]0.007[/C][C]0.0838[/C][/ROW]
[ROW][C]51[/C][C]0.0455[/C][C]-0.2689[/C][C]0.0224[/C][C]0.0649[/C][C]0.0054[/C][C]0.0736[/C][/ROW]
[ROW][C]52[/C][C]0.0482[/C][C]-0.3206[/C][C]0.0267[/C][C]0.0923[/C][C]0.0077[/C][C]0.0877[/C][/ROW]
[ROW][C]53[/C][C]0.0508[/C][C]-0.3189[/C][C]0.0266[/C][C]0.0913[/C][C]0.0076[/C][C]0.0872[/C][/ROW]
[ROW][C]54[/C][C]0.0532[/C][C]-0.2747[/C][C]0.0229[/C][C]0.0678[/C][C]0.0056[/C][C]0.0751[/C][/ROW]
[ROW][C]55[/C][C]0.0556[/C][C]-0.2333[/C][C]0.0194[/C][C]0.0489[/C][C]0.0041[/C][C]0.0638[/C][/ROW]
[ROW][C]56[/C][C]0.0578[/C][C]-0.1651[/C][C]0.0138[/C][C]0.0245[/C][C]0.002[/C][C]0.0452[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=65670&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=65670&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
450.02310.01530.00132e-0400.0042
460.0283-0.00454e-04000.0012
470.0325-0.08830.00740.0076e-040.0242
480.0362-0.15620.0130.02190.00180.0427
490.0395-0.29510.02460.07820.00650.0807
500.0426-0.30650.02550.08430.0070.0838
510.0455-0.26890.02240.06490.00540.0736
520.0482-0.32060.02670.09230.00770.0877
530.0508-0.31890.02660.09130.00760.0872
540.0532-0.27470.02290.06780.00560.0751
550.0556-0.23330.01940.04890.00410.0638
560.0578-0.16510.01380.02450.0020.0452



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