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, 14 Dec 2010 11:09:02 +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/14/t1292325000kmomw05my2aolf5.htm/, Retrieved Thu, 02 May 2024 22:36:03 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=109407, Retrieved Thu, 02 May 2024 22:36:03 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact109
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 Backward Selection] [Unemployment] [2010-11-29 17:10:28] [b98453cac15ba1066b407e146608df68]
-   PD      [ARIMA Backward Selection] [WS9 - ARIMA Backw...] [2010-12-04 13:54:26] [8ef49741e164ec6343c90c7935194465]
- RMPD          [ARIMA Forecasting] [ARIMA Backward Se...] [2010-12-14 11:09:02] [934c3727858e074bf543f25f5906ed72] [Current]
Feedback Forum

Post a new message
Dataseries X:
104.37
104.89
105.15
105.72
106.38
106.40
106.47
106.59
106.76
107.35
107.81
108.03
109.08
109.86
110.29
110.34
110.59
110.64
110.83
111.51
113.32
115.89
116.51
117.44
118.25
118.65
118.52
119.07
119.12
119.28
119.30
119.44
119.57
119.93
120.03
119.66
119.46
119.48
119.56
119.43
119.57
119.59
119.50
119.54
119.56
119.61
119.64
119.60
119.71
119.72
119.66
119.76
119.80
119.88
119.78
120.08
120.22




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109407&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109407&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109407&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[45])
33119.57-------
34119.93-------
35120.03-------
36119.66-------
37119.46-------
38119.48-------
39119.56-------
40119.43-------
41119.57-------
42119.59-------
43119.5-------
44119.54-------
45119.56-------
46119.61119.58118.6459120.51410.47490.51670.23140.5167
47119.64119.6117.5113121.68870.4850.49630.34330.515
48119.6119.62116.125123.1150.49550.49550.49110.5134
49119.71119.64114.5238124.75620.48930.50610.52750.5122
50119.72119.66112.7326126.58740.49320.49440.52030.5113
51119.66119.68110.7693128.59070.49820.49650.51050.5105
52119.76119.7108.6477130.75230.49580.50280.51910.5099
53119.8119.72106.3785133.06150.49530.49770.50880.5094
54119.88119.74103.9707135.50930.49310.4970.50740.5089
55119.78119.76101.4318138.08820.49910.49490.51110.5085
56120.08119.7898.7681140.79190.48880.50.50890.5082
57120.22119.895.9853143.61470.48620.49080.50790.5079

\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[45]) \tabularnewline
33 & 119.57 & - & - & - & - & - & - & - \tabularnewline
34 & 119.93 & - & - & - & - & - & - & - \tabularnewline
35 & 120.03 & - & - & - & - & - & - & - \tabularnewline
36 & 119.66 & - & - & - & - & - & - & - \tabularnewline
37 & 119.46 & - & - & - & - & - & - & - \tabularnewline
38 & 119.48 & - & - & - & - & - & - & - \tabularnewline
39 & 119.56 & - & - & - & - & - & - & - \tabularnewline
40 & 119.43 & - & - & - & - & - & - & - \tabularnewline
41 & 119.57 & - & - & - & - & - & - & - \tabularnewline
42 & 119.59 & - & - & - & - & - & - & - \tabularnewline
43 & 119.5 & - & - & - & - & - & - & - \tabularnewline
44 & 119.54 & - & - & - & - & - & - & - \tabularnewline
45 & 119.56 & - & - & - & - & - & - & - \tabularnewline
46 & 119.61 & 119.58 & 118.6459 & 120.5141 & 0.4749 & 0.5167 & 0.2314 & 0.5167 \tabularnewline
47 & 119.64 & 119.6 & 117.5113 & 121.6887 & 0.485 & 0.4963 & 0.3433 & 0.515 \tabularnewline
48 & 119.6 & 119.62 & 116.125 & 123.115 & 0.4955 & 0.4955 & 0.4911 & 0.5134 \tabularnewline
49 & 119.71 & 119.64 & 114.5238 & 124.7562 & 0.4893 & 0.5061 & 0.5275 & 0.5122 \tabularnewline
50 & 119.72 & 119.66 & 112.7326 & 126.5874 & 0.4932 & 0.4944 & 0.5203 & 0.5113 \tabularnewline
51 & 119.66 & 119.68 & 110.7693 & 128.5907 & 0.4982 & 0.4965 & 0.5105 & 0.5105 \tabularnewline
52 & 119.76 & 119.7 & 108.6477 & 130.7523 & 0.4958 & 0.5028 & 0.5191 & 0.5099 \tabularnewline
53 & 119.8 & 119.72 & 106.3785 & 133.0615 & 0.4953 & 0.4977 & 0.5088 & 0.5094 \tabularnewline
54 & 119.88 & 119.74 & 103.9707 & 135.5093 & 0.4931 & 0.497 & 0.5074 & 0.5089 \tabularnewline
55 & 119.78 & 119.76 & 101.4318 & 138.0882 & 0.4991 & 0.4949 & 0.5111 & 0.5085 \tabularnewline
56 & 120.08 & 119.78 & 98.7681 & 140.7919 & 0.4888 & 0.5 & 0.5089 & 0.5082 \tabularnewline
57 & 120.22 & 119.8 & 95.9853 & 143.6147 & 0.4862 & 0.4908 & 0.5079 & 0.5079 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109407&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[45])[/C][/ROW]
[ROW][C]33[/C][C]119.57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]119.93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]120.03[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]119.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]119.46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]119.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]119.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]119.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]119.57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]119.59[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]119.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]119.54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]119.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]119.61[/C][C]119.58[/C][C]118.6459[/C][C]120.5141[/C][C]0.4749[/C][C]0.5167[/C][C]0.2314[/C][C]0.5167[/C][/ROW]
[ROW][C]47[/C][C]119.64[/C][C]119.6[/C][C]117.5113[/C][C]121.6887[/C][C]0.485[/C][C]0.4963[/C][C]0.3433[/C][C]0.515[/C][/ROW]
[ROW][C]48[/C][C]119.6[/C][C]119.62[/C][C]116.125[/C][C]123.115[/C][C]0.4955[/C][C]0.4955[/C][C]0.4911[/C][C]0.5134[/C][/ROW]
[ROW][C]49[/C][C]119.71[/C][C]119.64[/C][C]114.5238[/C][C]124.7562[/C][C]0.4893[/C][C]0.5061[/C][C]0.5275[/C][C]0.5122[/C][/ROW]
[ROW][C]50[/C][C]119.72[/C][C]119.66[/C][C]112.7326[/C][C]126.5874[/C][C]0.4932[/C][C]0.4944[/C][C]0.5203[/C][C]0.5113[/C][/ROW]
[ROW][C]51[/C][C]119.66[/C][C]119.68[/C][C]110.7693[/C][C]128.5907[/C][C]0.4982[/C][C]0.4965[/C][C]0.5105[/C][C]0.5105[/C][/ROW]
[ROW][C]52[/C][C]119.76[/C][C]119.7[/C][C]108.6477[/C][C]130.7523[/C][C]0.4958[/C][C]0.5028[/C][C]0.5191[/C][C]0.5099[/C][/ROW]
[ROW][C]53[/C][C]119.8[/C][C]119.72[/C][C]106.3785[/C][C]133.0615[/C][C]0.4953[/C][C]0.4977[/C][C]0.5088[/C][C]0.5094[/C][/ROW]
[ROW][C]54[/C][C]119.88[/C][C]119.74[/C][C]103.9707[/C][C]135.5093[/C][C]0.4931[/C][C]0.497[/C][C]0.5074[/C][C]0.5089[/C][/ROW]
[ROW][C]55[/C][C]119.78[/C][C]119.76[/C][C]101.4318[/C][C]138.0882[/C][C]0.4991[/C][C]0.4949[/C][C]0.5111[/C][C]0.5085[/C][/ROW]
[ROW][C]56[/C][C]120.08[/C][C]119.78[/C][C]98.7681[/C][C]140.7919[/C][C]0.4888[/C][C]0.5[/C][C]0.5089[/C][C]0.5082[/C][/ROW]
[ROW][C]57[/C][C]120.22[/C][C]119.8[/C][C]95.9853[/C][C]143.6147[/C][C]0.4862[/C][C]0.4908[/C][C]0.5079[/C][C]0.5079[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109407&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109407&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[45])
33119.57-------
34119.93-------
35120.03-------
36119.66-------
37119.46-------
38119.48-------
39119.56-------
40119.43-------
41119.57-------
42119.59-------
43119.5-------
44119.54-------
45119.56-------
46119.61119.58118.6459120.51410.47490.51670.23140.5167
47119.64119.6117.5113121.68870.4850.49630.34330.515
48119.6119.62116.125123.1150.49550.49550.49110.5134
49119.71119.64114.5238124.75620.48930.50610.52750.5122
50119.72119.66112.7326126.58740.49320.49440.52030.5113
51119.66119.68110.7693128.59070.49820.49650.51050.5105
52119.76119.7108.6477130.75230.49580.50280.51910.5099
53119.8119.72106.3785133.06150.49530.49770.50880.5094
54119.88119.74103.9707135.50930.49310.4970.50740.5089
55119.78119.76101.4318138.08820.49910.49490.51110.5085
56120.08119.7898.7681140.79190.48880.50.50890.5082
57120.22119.895.9853143.61470.48620.49080.50790.5079







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
460.0043e-0409e-0400
470.00893e-043e-040.00160.00130.0354
480.0149-2e-043e-044e-040.0010.0311
490.02186e-043e-040.00490.0020.0442
500.02955e-044e-040.00360.00230.0477
510.038-2e-043e-044e-040.0020.0443
520.04715e-044e-040.00360.00220.0469
530.05697e-044e-040.00640.00270.0522
540.06720.00125e-040.01960.00460.0678
550.07812e-045e-044e-040.00420.0647
560.08950.00256e-040.090.0120.1095
570.10140.00359e-040.17640.02570.1603

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
46 & 0.004 & 3e-04 & 0 & 9e-04 & 0 & 0 \tabularnewline
47 & 0.0089 & 3e-04 & 3e-04 & 0.0016 & 0.0013 & 0.0354 \tabularnewline
48 & 0.0149 & -2e-04 & 3e-04 & 4e-04 & 0.001 & 0.0311 \tabularnewline
49 & 0.0218 & 6e-04 & 3e-04 & 0.0049 & 0.002 & 0.0442 \tabularnewline
50 & 0.0295 & 5e-04 & 4e-04 & 0.0036 & 0.0023 & 0.0477 \tabularnewline
51 & 0.038 & -2e-04 & 3e-04 & 4e-04 & 0.002 & 0.0443 \tabularnewline
52 & 0.0471 & 5e-04 & 4e-04 & 0.0036 & 0.0022 & 0.0469 \tabularnewline
53 & 0.0569 & 7e-04 & 4e-04 & 0.0064 & 0.0027 & 0.0522 \tabularnewline
54 & 0.0672 & 0.0012 & 5e-04 & 0.0196 & 0.0046 & 0.0678 \tabularnewline
55 & 0.0781 & 2e-04 & 5e-04 & 4e-04 & 0.0042 & 0.0647 \tabularnewline
56 & 0.0895 & 0.0025 & 6e-04 & 0.09 & 0.012 & 0.1095 \tabularnewline
57 & 0.1014 & 0.0035 & 9e-04 & 0.1764 & 0.0257 & 0.1603 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=109407&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]46[/C][C]0.004[/C][C]3e-04[/C][C]0[/C][C]9e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]47[/C][C]0.0089[/C][C]3e-04[/C][C]3e-04[/C][C]0.0016[/C][C]0.0013[/C][C]0.0354[/C][/ROW]
[ROW][C]48[/C][C]0.0149[/C][C]-2e-04[/C][C]3e-04[/C][C]4e-04[/C][C]0.001[/C][C]0.0311[/C][/ROW]
[ROW][C]49[/C][C]0.0218[/C][C]6e-04[/C][C]3e-04[/C][C]0.0049[/C][C]0.002[/C][C]0.0442[/C][/ROW]
[ROW][C]50[/C][C]0.0295[/C][C]5e-04[/C][C]4e-04[/C][C]0.0036[/C][C]0.0023[/C][C]0.0477[/C][/ROW]
[ROW][C]51[/C][C]0.038[/C][C]-2e-04[/C][C]3e-04[/C][C]4e-04[/C][C]0.002[/C][C]0.0443[/C][/ROW]
[ROW][C]52[/C][C]0.0471[/C][C]5e-04[/C][C]4e-04[/C][C]0.0036[/C][C]0.0022[/C][C]0.0469[/C][/ROW]
[ROW][C]53[/C][C]0.0569[/C][C]7e-04[/C][C]4e-04[/C][C]0.0064[/C][C]0.0027[/C][C]0.0522[/C][/ROW]
[ROW][C]54[/C][C]0.0672[/C][C]0.0012[/C][C]5e-04[/C][C]0.0196[/C][C]0.0046[/C][C]0.0678[/C][/ROW]
[ROW][C]55[/C][C]0.0781[/C][C]2e-04[/C][C]5e-04[/C][C]4e-04[/C][C]0.0042[/C][C]0.0647[/C][/ROW]
[ROW][C]56[/C][C]0.0895[/C][C]0.0025[/C][C]6e-04[/C][C]0.09[/C][C]0.012[/C][C]0.1095[/C][/ROW]
[ROW][C]57[/C][C]0.1014[/C][C]0.0035[/C][C]9e-04[/C][C]0.1764[/C][C]0.0257[/C][C]0.1603[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=109407&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=109407&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
460.0043e-0409e-0400
470.00893e-043e-040.00160.00130.0354
480.0149-2e-043e-044e-040.0010.0311
490.02186e-043e-040.00490.0020.0442
500.02955e-044e-040.00360.00230.0477
510.038-2e-043e-044e-040.0020.0443
520.04715e-044e-040.00360.00220.0469
530.05697e-044e-040.00640.00270.0522
540.06720.00125e-040.01960.00460.0678
550.07812e-045e-044e-040.00420.0647
560.08950.00256e-040.090.0120.1095
570.10140.00359e-040.17640.02570.1603



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