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, 08 Dec 2009 11:52:08 -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/08/t1260298548e1g1w3x0gfoazjn.htm/, Retrieved Sun, 28 Apr 2024 17:55:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=64789, Retrieved Sun, 28 Apr 2024 17:55:16 +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 Backward Selection] [WS9] [2009-12-03 19:52:17] [445b292c553470d9fed8bc2796fd3a00]
- R P   [ARIMA Backward Selection] [] [2009-12-06 09:21:36] [b98453cac15ba1066b407e146608df68]
- RMP       [ARIMA Forecasting] [Forecasting WS10] [2009-12-08 18:52:08] [82f421ff86a0429b20e3ed68bd89f1bd] [Current]
Feedback Forum

Post a new message
Dataseries X:
7.55
7.55
7.59
7.59
7.59
7.57
7.57
7.59
7.6
7.64
7.64
7.76
7.76
7.76
7.77
7.83
7.94
7.94
7.94
8.09
8.18
8.26
8.28
8.28
8.28
8.29
8.3
8.3
8.31
8.33
8.33
8.34
8.48
8.59
8.67
8.67
8.67
8.71
8.72
8.72
8.72
8.74
8.74
8.74
8.74
8.79
8.85
8.86
8.87
8.92
8.96
8.97
8.99
8.98
8.98
9.01
9.01
9.03
9.05
9.05




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64789&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[48])
368.67-------
378.67-------
388.71-------
398.72-------
408.72-------
418.72-------
428.74-------
438.74-------
448.74-------
458.74-------
468.79-------
478.85-------
488.86-------
498.878.86398.78178.94610.44210.53710.537
508.928.87718.73279.02150.28010.53820.98830.5916
518.968.89618.69949.09280.26230.4060.96040.6406
528.978.90668.6659.14830.30360.33250.9350.6474
538.998.91198.62139.20260.29930.34770.90220.6369
548.988.91728.57589.25860.35930.3380.84550.6287
558.988.92388.53329.31440.38890.38890.82180.6255
569.018.92898.4929.36590.35810.40940.80160.6214
579.018.93248.45049.41440.37610.37610.7830.6157
589.038.9358.40919.4610.36170.390.70550.6101
599.058.93768.36919.50620.34920.37510.61870.6055
609.058.93998.33049.54940.36170.36170.60140.6014

\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 & 8.67 & - & - & - & - & - & - & - \tabularnewline
37 & 8.67 & - & - & - & - & - & - & - \tabularnewline
38 & 8.71 & - & - & - & - & - & - & - \tabularnewline
39 & 8.72 & - & - & - & - & - & - & - \tabularnewline
40 & 8.72 & - & - & - & - & - & - & - \tabularnewline
41 & 8.72 & - & - & - & - & - & - & - \tabularnewline
42 & 8.74 & - & - & - & - & - & - & - \tabularnewline
43 & 8.74 & - & - & - & - & - & - & - \tabularnewline
44 & 8.74 & - & - & - & - & - & - & - \tabularnewline
45 & 8.74 & - & - & - & - & - & - & - \tabularnewline
46 & 8.79 & - & - & - & - & - & - & - \tabularnewline
47 & 8.85 & - & - & - & - & - & - & - \tabularnewline
48 & 8.86 & - & - & - & - & - & - & - \tabularnewline
49 & 8.87 & 8.8639 & 8.7817 & 8.9461 & 0.4421 & 0.537 & 1 & 0.537 \tabularnewline
50 & 8.92 & 8.8771 & 8.7327 & 9.0215 & 0.2801 & 0.5382 & 0.9883 & 0.5916 \tabularnewline
51 & 8.96 & 8.8961 & 8.6994 & 9.0928 & 0.2623 & 0.406 & 0.9604 & 0.6406 \tabularnewline
52 & 8.97 & 8.9066 & 8.665 & 9.1483 & 0.3036 & 0.3325 & 0.935 & 0.6474 \tabularnewline
53 & 8.99 & 8.9119 & 8.6213 & 9.2026 & 0.2993 & 0.3477 & 0.9022 & 0.6369 \tabularnewline
54 & 8.98 & 8.9172 & 8.5758 & 9.2586 & 0.3593 & 0.338 & 0.8455 & 0.6287 \tabularnewline
55 & 8.98 & 8.9238 & 8.5332 & 9.3144 & 0.3889 & 0.3889 & 0.8218 & 0.6255 \tabularnewline
56 & 9.01 & 8.9289 & 8.492 & 9.3659 & 0.3581 & 0.4094 & 0.8016 & 0.6214 \tabularnewline
57 & 9.01 & 8.9324 & 8.4504 & 9.4144 & 0.3761 & 0.3761 & 0.783 & 0.6157 \tabularnewline
58 & 9.03 & 8.935 & 8.4091 & 9.461 & 0.3617 & 0.39 & 0.7055 & 0.6101 \tabularnewline
59 & 9.05 & 8.9376 & 8.3691 & 9.5062 & 0.3492 & 0.3751 & 0.6187 & 0.6055 \tabularnewline
60 & 9.05 & 8.9399 & 8.3304 & 9.5494 & 0.3617 & 0.3617 & 0.6014 & 0.6014 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64789&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]8.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]8.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]8.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]8.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]8.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]8.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]8.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]8.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]8.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]8.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]8.79[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]8.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]8.86[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]8.87[/C][C]8.8639[/C][C]8.7817[/C][C]8.9461[/C][C]0.4421[/C][C]0.537[/C][C]1[/C][C]0.537[/C][/ROW]
[ROW][C]50[/C][C]8.92[/C][C]8.8771[/C][C]8.7327[/C][C]9.0215[/C][C]0.2801[/C][C]0.5382[/C][C]0.9883[/C][C]0.5916[/C][/ROW]
[ROW][C]51[/C][C]8.96[/C][C]8.8961[/C][C]8.6994[/C][C]9.0928[/C][C]0.2623[/C][C]0.406[/C][C]0.9604[/C][C]0.6406[/C][/ROW]
[ROW][C]52[/C][C]8.97[/C][C]8.9066[/C][C]8.665[/C][C]9.1483[/C][C]0.3036[/C][C]0.3325[/C][C]0.935[/C][C]0.6474[/C][/ROW]
[ROW][C]53[/C][C]8.99[/C][C]8.9119[/C][C]8.6213[/C][C]9.2026[/C][C]0.2993[/C][C]0.3477[/C][C]0.9022[/C][C]0.6369[/C][/ROW]
[ROW][C]54[/C][C]8.98[/C][C]8.9172[/C][C]8.5758[/C][C]9.2586[/C][C]0.3593[/C][C]0.338[/C][C]0.8455[/C][C]0.6287[/C][/ROW]
[ROW][C]55[/C][C]8.98[/C][C]8.9238[/C][C]8.5332[/C][C]9.3144[/C][C]0.3889[/C][C]0.3889[/C][C]0.8218[/C][C]0.6255[/C][/ROW]
[ROW][C]56[/C][C]9.01[/C][C]8.9289[/C][C]8.492[/C][C]9.3659[/C][C]0.3581[/C][C]0.4094[/C][C]0.8016[/C][C]0.6214[/C][/ROW]
[ROW][C]57[/C][C]9.01[/C][C]8.9324[/C][C]8.4504[/C][C]9.4144[/C][C]0.3761[/C][C]0.3761[/C][C]0.783[/C][C]0.6157[/C][/ROW]
[ROW][C]58[/C][C]9.03[/C][C]8.935[/C][C]8.4091[/C][C]9.461[/C][C]0.3617[/C][C]0.39[/C][C]0.7055[/C][C]0.6101[/C][/ROW]
[ROW][C]59[/C][C]9.05[/C][C]8.9376[/C][C]8.3691[/C][C]9.5062[/C][C]0.3492[/C][C]0.3751[/C][C]0.6187[/C][C]0.6055[/C][/ROW]
[ROW][C]60[/C][C]9.05[/C][C]8.9399[/C][C]8.3304[/C][C]9.5494[/C][C]0.3617[/C][C]0.3617[/C][C]0.6014[/C][C]0.6014[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64789&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64789&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])
368.67-------
378.67-------
388.71-------
398.72-------
408.72-------
418.72-------
428.74-------
438.74-------
448.74-------
458.74-------
468.79-------
478.85-------
488.86-------
498.878.86398.78178.94610.44210.53710.537
508.928.87718.73279.02150.28010.53820.98830.5916
518.968.89618.69949.09280.26230.4060.96040.6406
528.978.90668.6659.14830.30360.33250.9350.6474
538.998.91198.62139.20260.29930.34770.90220.6369
548.988.91728.57589.25860.35930.3380.84550.6287
558.988.92388.53329.31440.38890.38890.82180.6255
569.018.92898.4929.36590.35810.40940.80160.6214
579.018.93248.45049.41440.37610.37610.7830.6157
589.038.9358.40919.4610.36170.390.70550.6101
599.058.93768.36919.50620.34920.37510.61870.6055
609.058.93998.33049.54940.36170.36170.60140.6014







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.00477e-040000
500.00830.00480.00280.00189e-040.0307
510.01130.00720.00420.00410.0020.0446
520.01380.00710.0050.0040.00250.0499
530.01660.00880.00570.00610.00320.0567
540.01950.0070.00590.00390.00330.0577
550.02230.00630.0060.00320.00330.0575
560.0250.00910.00640.00660.00370.061
570.02750.00870.00660.0060.0040.063
580.030.01060.0070.0090.00450.0669
590.03250.01260.00750.01260.00520.0722
600.03480.01230.00790.01210.00580.0761

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0047 & 7e-04 & 0 & 0 & 0 & 0 \tabularnewline
50 & 0.0083 & 0.0048 & 0.0028 & 0.0018 & 9e-04 & 0.0307 \tabularnewline
51 & 0.0113 & 0.0072 & 0.0042 & 0.0041 & 0.002 & 0.0446 \tabularnewline
52 & 0.0138 & 0.0071 & 0.005 & 0.004 & 0.0025 & 0.0499 \tabularnewline
53 & 0.0166 & 0.0088 & 0.0057 & 0.0061 & 0.0032 & 0.0567 \tabularnewline
54 & 0.0195 & 0.007 & 0.0059 & 0.0039 & 0.0033 & 0.0577 \tabularnewline
55 & 0.0223 & 0.0063 & 0.006 & 0.0032 & 0.0033 & 0.0575 \tabularnewline
56 & 0.025 & 0.0091 & 0.0064 & 0.0066 & 0.0037 & 0.061 \tabularnewline
57 & 0.0275 & 0.0087 & 0.0066 & 0.006 & 0.004 & 0.063 \tabularnewline
58 & 0.03 & 0.0106 & 0.007 & 0.009 & 0.0045 & 0.0669 \tabularnewline
59 & 0.0325 & 0.0126 & 0.0075 & 0.0126 & 0.0052 & 0.0722 \tabularnewline
60 & 0.0348 & 0.0123 & 0.0079 & 0.0121 & 0.0058 & 0.0761 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64789&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.0047[/C][C]7e-04[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0083[/C][C]0.0048[/C][C]0.0028[/C][C]0.0018[/C][C]9e-04[/C][C]0.0307[/C][/ROW]
[ROW][C]51[/C][C]0.0113[/C][C]0.0072[/C][C]0.0042[/C][C]0.0041[/C][C]0.002[/C][C]0.0446[/C][/ROW]
[ROW][C]52[/C][C]0.0138[/C][C]0.0071[/C][C]0.005[/C][C]0.004[/C][C]0.0025[/C][C]0.0499[/C][/ROW]
[ROW][C]53[/C][C]0.0166[/C][C]0.0088[/C][C]0.0057[/C][C]0.0061[/C][C]0.0032[/C][C]0.0567[/C][/ROW]
[ROW][C]54[/C][C]0.0195[/C][C]0.007[/C][C]0.0059[/C][C]0.0039[/C][C]0.0033[/C][C]0.0577[/C][/ROW]
[ROW][C]55[/C][C]0.0223[/C][C]0.0063[/C][C]0.006[/C][C]0.0032[/C][C]0.0033[/C][C]0.0575[/C][/ROW]
[ROW][C]56[/C][C]0.025[/C][C]0.0091[/C][C]0.0064[/C][C]0.0066[/C][C]0.0037[/C][C]0.061[/C][/ROW]
[ROW][C]57[/C][C]0.0275[/C][C]0.0087[/C][C]0.0066[/C][C]0.006[/C][C]0.004[/C][C]0.063[/C][/ROW]
[ROW][C]58[/C][C]0.03[/C][C]0.0106[/C][C]0.007[/C][C]0.009[/C][C]0.0045[/C][C]0.0669[/C][/ROW]
[ROW][C]59[/C][C]0.0325[/C][C]0.0126[/C][C]0.0075[/C][C]0.0126[/C][C]0.0052[/C][C]0.0722[/C][/ROW]
[ROW][C]60[/C][C]0.0348[/C][C]0.0123[/C][C]0.0079[/C][C]0.0121[/C][C]0.0058[/C][C]0.0761[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64789&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64789&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.00477e-040000
500.00830.00480.00280.00189e-040.0307
510.01130.00720.00420.00410.0020.0446
520.01380.00710.0050.0040.00250.0499
530.01660.00880.00570.00610.00320.0567
540.01950.0070.00590.00390.00330.0577
550.02230.00630.0060.00320.00330.0575
560.0250.00910.00640.00660.00370.061
570.02750.00870.00660.0060.0040.063
580.030.01060.0070.0090.00450.0669
590.03250.01260.00750.01260.00520.0722
600.03480.01230.00790.01210.00580.0761



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