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 computationMon, 15 Dec 2008 13:07:50 -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/2008/Dec/15/t1229371740m2x3ufk1ynypywr.htm/, Retrieved Wed, 15 May 2024 11:33:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33802, Retrieved Wed, 15 May 2024 11:33:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords1
Estimated Impact184
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2008-12-15 19:56:43] [fe7291e888d31b8c4db0b24d6c0f75c6]
F    D    [ARIMA Forecasting] [1] [2008-12-15 20:07:50] [458fee276d63daa9deadf4e7db401a64] [Current]
Feedback Forum
2008-12-18 15:09:24 [Peter Melgers] [reply
Bij observatie 52 t/m 63 staan de werkelijke en voorspelde waarden van de weggevallen 12 observaties.

Y(t) = werkelijke waarden
F(t) = forecast / voorspelde waarden

Ook het 95%-betrouwbaarheidsinterval is weergegeven in de tabel:

95% LB = ondergrens (lower bound)
95% UB = bovengrens (upper bound)

Met een waarschijnlijkheid van 95% zal de voorspelling tussen deze waarden liggen. Indien alle omstandigheden blijven zoals ze waren (Ceteris Paribus).

Zoals te zien is in de tabel liggen alle werkelijke waarden in dit interval.

De p-value is ook weergegeven. Deze gaat uit van de nullhypothese dat de voorspelde waarden en de werkelijke waarden niet significant verschillend zijn (en het verschil dus aan toeval te wijten is).

Als de p-waarde kleiner is als 5% gaat het om een significant verschil tussen de werkelijke waarde en de voorspelde waarde. Deze waarde zal bijgevolg ook buiten het betrouwbaarheidsinterval liggen.

Dit is in deze tabel niet het geval.


Post a new message
Dataseries X:
577992
565464
547344
554788
562325
560854
555332
543599
536662
542722
593530
610763
612613
611324
594167
595454
590865
589379
584428
573100
567456
569028
620735
628884
628232
612117
595404
597141
593408
590072
579799
574205
572775
572942
619567
625809
619916
587625
565742
557274
560576
548854
531673
525919
511038
498662
555362
564591
541657
527070
509846
514258
516922
507561
492622
490243
469357
477580
528379
533590
517945
506174
501866




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33802&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[51])
50527070-------
51509846-------
52514258491389.5244450276.4316532502.61710.13780.18950.18950.1895
53516922473874.0488391616.29556131.80760.15250.1680.1680.1957
54507561456393.2336330901.3615581885.10560.21210.17220.17220.2019
55492622438684.8255263237.691614131.96010.27340.22080.22080.2133
56490243421029.1569189660.0547652398.25910.27880.27210.27210.2259
57469357403412.211111526.4952695297.92680.32890.27990.27990.2374
58477580385772.686828934.1715742611.20210.3070.32310.32310.2478
59528379368130.2077-57930.3511794190.76660.23050.30730.30730.2572
60533590350493.7565-148746.9314849734.44450.23610.24250.24250.2658
61517945332856.3811-243309.8349909022.59720.26450.24730.24730.2736
62506174315217.8539-341460.3854971896.09330.28440.27260.27260.2807
63501866297579.8488-443041.87391038201.57140.29440.29050.29050.2871

\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[51]) \tabularnewline
50 & 527070 & - & - & - & - & - & - & - \tabularnewline
51 & 509846 & - & - & - & - & - & - & - \tabularnewline
52 & 514258 & 491389.5244 & 450276.4316 & 532502.6171 & 0.1378 & 0.1895 & 0.1895 & 0.1895 \tabularnewline
53 & 516922 & 473874.0488 & 391616.29 & 556131.8076 & 0.1525 & 0.168 & 0.168 & 0.1957 \tabularnewline
54 & 507561 & 456393.2336 & 330901.3615 & 581885.1056 & 0.2121 & 0.1722 & 0.1722 & 0.2019 \tabularnewline
55 & 492622 & 438684.8255 & 263237.691 & 614131.9601 & 0.2734 & 0.2208 & 0.2208 & 0.2133 \tabularnewline
56 & 490243 & 421029.1569 & 189660.0547 & 652398.2591 & 0.2788 & 0.2721 & 0.2721 & 0.2259 \tabularnewline
57 & 469357 & 403412.211 & 111526.4952 & 695297.9268 & 0.3289 & 0.2799 & 0.2799 & 0.2374 \tabularnewline
58 & 477580 & 385772.6868 & 28934.1715 & 742611.2021 & 0.307 & 0.3231 & 0.3231 & 0.2478 \tabularnewline
59 & 528379 & 368130.2077 & -57930.3511 & 794190.7666 & 0.2305 & 0.3073 & 0.3073 & 0.2572 \tabularnewline
60 & 533590 & 350493.7565 & -148746.9314 & 849734.4445 & 0.2361 & 0.2425 & 0.2425 & 0.2658 \tabularnewline
61 & 517945 & 332856.3811 & -243309.8349 & 909022.5972 & 0.2645 & 0.2473 & 0.2473 & 0.2736 \tabularnewline
62 & 506174 & 315217.8539 & -341460.3854 & 971896.0933 & 0.2844 & 0.2726 & 0.2726 & 0.2807 \tabularnewline
63 & 501866 & 297579.8488 & -443041.8739 & 1038201.5714 & 0.2944 & 0.2905 & 0.2905 & 0.2871 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33802&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[51])[/C][/ROW]
[ROW][C]50[/C][C]527070[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]509846[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]514258[/C][C]491389.5244[/C][C]450276.4316[/C][C]532502.6171[/C][C]0.1378[/C][C]0.1895[/C][C]0.1895[/C][C]0.1895[/C][/ROW]
[ROW][C]53[/C][C]516922[/C][C]473874.0488[/C][C]391616.29[/C][C]556131.8076[/C][C]0.1525[/C][C]0.168[/C][C]0.168[/C][C]0.1957[/C][/ROW]
[ROW][C]54[/C][C]507561[/C][C]456393.2336[/C][C]330901.3615[/C][C]581885.1056[/C][C]0.2121[/C][C]0.1722[/C][C]0.1722[/C][C]0.2019[/C][/ROW]
[ROW][C]55[/C][C]492622[/C][C]438684.8255[/C][C]263237.691[/C][C]614131.9601[/C][C]0.2734[/C][C]0.2208[/C][C]0.2208[/C][C]0.2133[/C][/ROW]
[ROW][C]56[/C][C]490243[/C][C]421029.1569[/C][C]189660.0547[/C][C]652398.2591[/C][C]0.2788[/C][C]0.2721[/C][C]0.2721[/C][C]0.2259[/C][/ROW]
[ROW][C]57[/C][C]469357[/C][C]403412.211[/C][C]111526.4952[/C][C]695297.9268[/C][C]0.3289[/C][C]0.2799[/C][C]0.2799[/C][C]0.2374[/C][/ROW]
[ROW][C]58[/C][C]477580[/C][C]385772.6868[/C][C]28934.1715[/C][C]742611.2021[/C][C]0.307[/C][C]0.3231[/C][C]0.3231[/C][C]0.2478[/C][/ROW]
[ROW][C]59[/C][C]528379[/C][C]368130.2077[/C][C]-57930.3511[/C][C]794190.7666[/C][C]0.2305[/C][C]0.3073[/C][C]0.3073[/C][C]0.2572[/C][/ROW]
[ROW][C]60[/C][C]533590[/C][C]350493.7565[/C][C]-148746.9314[/C][C]849734.4445[/C][C]0.2361[/C][C]0.2425[/C][C]0.2425[/C][C]0.2658[/C][/ROW]
[ROW][C]61[/C][C]517945[/C][C]332856.3811[/C][C]-243309.8349[/C][C]909022.5972[/C][C]0.2645[/C][C]0.2473[/C][C]0.2473[/C][C]0.2736[/C][/ROW]
[ROW][C]62[/C][C]506174[/C][C]315217.8539[/C][C]-341460.3854[/C][C]971896.0933[/C][C]0.2844[/C][C]0.2726[/C][C]0.2726[/C][C]0.2807[/C][/ROW]
[ROW][C]63[/C][C]501866[/C][C]297579.8488[/C][C]-443041.8739[/C][C]1038201.5714[/C][C]0.2944[/C][C]0.2905[/C][C]0.2905[/C][C]0.2871[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33802&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33802&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[51])
50527070-------
51509846-------
52514258491389.5244450276.4316532502.61710.13780.18950.18950.1895
53516922473874.0488391616.29556131.80760.15250.1680.1680.1957
54507561456393.2336330901.3615581885.10560.21210.17220.17220.2019
55492622438684.8255263237.691614131.96010.27340.22080.22080.2133
56490243421029.1569189660.0547652398.25910.27880.27210.27210.2259
57469357403412.211111526.4952695297.92680.32890.27990.27990.2374
58477580385772.686828934.1715742611.20210.3070.32310.32310.2478
59528379368130.2077-57930.3511794190.76660.23050.30730.30730.2572
60533590350493.7565-148746.9314849734.44450.23610.24250.24250.2658
61517945332856.3811-243309.8349909022.59720.26450.24730.24730.2736
62506174315217.8539-341460.3854971896.09330.28440.27260.27260.2807
63501866297579.8488-443041.87391038201.57140.29440.29050.29050.2871







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
520.04270.04650.0039522967177.533743580598.12786601.5603
530.08860.09080.00761853126103.2482154427175.270712426.8731
540.14030.11210.00932618140323.2582218178360.271514770.8619
550.20410.1230.01022909218788.4133242434899.034415570.3211
560.28040.16440.01374790556072.5186399213006.043219980.3155
570.36920.16350.01364348715196.4393362392933.036619036.6208
580.47190.2380.01988428582758.6747702381896.556226502.4885
590.59050.43530.036325679675423.23952139972951.936646259.8417
600.72670.52240.043533524234366.84292793686197.236952855.3327
610.88320.55610.046334257796830.25542854816402.521353430.482
621.06290.60580.050536464249717.28633038687476.440555124.2912
631.26980.68650.057241732831578.18683477735964.848958972.3322

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
52 & 0.0427 & 0.0465 & 0.0039 & 522967177.5337 & 43580598.1278 & 6601.5603 \tabularnewline
53 & 0.0886 & 0.0908 & 0.0076 & 1853126103.2482 & 154427175.2707 & 12426.8731 \tabularnewline
54 & 0.1403 & 0.1121 & 0.0093 & 2618140323.2582 & 218178360.2715 & 14770.8619 \tabularnewline
55 & 0.2041 & 0.123 & 0.0102 & 2909218788.4133 & 242434899.0344 & 15570.3211 \tabularnewline
56 & 0.2804 & 0.1644 & 0.0137 & 4790556072.5186 & 399213006.0432 & 19980.3155 \tabularnewline
57 & 0.3692 & 0.1635 & 0.0136 & 4348715196.4393 & 362392933.0366 & 19036.6208 \tabularnewline
58 & 0.4719 & 0.238 & 0.0198 & 8428582758.6747 & 702381896.5562 & 26502.4885 \tabularnewline
59 & 0.5905 & 0.4353 & 0.0363 & 25679675423.2395 & 2139972951.9366 & 46259.8417 \tabularnewline
60 & 0.7267 & 0.5224 & 0.0435 & 33524234366.8429 & 2793686197.2369 & 52855.3327 \tabularnewline
61 & 0.8832 & 0.5561 & 0.0463 & 34257796830.2554 & 2854816402.5213 & 53430.482 \tabularnewline
62 & 1.0629 & 0.6058 & 0.0505 & 36464249717.2863 & 3038687476.4405 & 55124.2912 \tabularnewline
63 & 1.2698 & 0.6865 & 0.0572 & 41732831578.1868 & 3477735964.8489 & 58972.3322 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33802&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]52[/C][C]0.0427[/C][C]0.0465[/C][C]0.0039[/C][C]522967177.5337[/C][C]43580598.1278[/C][C]6601.5603[/C][/ROW]
[ROW][C]53[/C][C]0.0886[/C][C]0.0908[/C][C]0.0076[/C][C]1853126103.2482[/C][C]154427175.2707[/C][C]12426.8731[/C][/ROW]
[ROW][C]54[/C][C]0.1403[/C][C]0.1121[/C][C]0.0093[/C][C]2618140323.2582[/C][C]218178360.2715[/C][C]14770.8619[/C][/ROW]
[ROW][C]55[/C][C]0.2041[/C][C]0.123[/C][C]0.0102[/C][C]2909218788.4133[/C][C]242434899.0344[/C][C]15570.3211[/C][/ROW]
[ROW][C]56[/C][C]0.2804[/C][C]0.1644[/C][C]0.0137[/C][C]4790556072.5186[/C][C]399213006.0432[/C][C]19980.3155[/C][/ROW]
[ROW][C]57[/C][C]0.3692[/C][C]0.1635[/C][C]0.0136[/C][C]4348715196.4393[/C][C]362392933.0366[/C][C]19036.6208[/C][/ROW]
[ROW][C]58[/C][C]0.4719[/C][C]0.238[/C][C]0.0198[/C][C]8428582758.6747[/C][C]702381896.5562[/C][C]26502.4885[/C][/ROW]
[ROW][C]59[/C][C]0.5905[/C][C]0.4353[/C][C]0.0363[/C][C]25679675423.2395[/C][C]2139972951.9366[/C][C]46259.8417[/C][/ROW]
[ROW][C]60[/C][C]0.7267[/C][C]0.5224[/C][C]0.0435[/C][C]33524234366.8429[/C][C]2793686197.2369[/C][C]52855.3327[/C][/ROW]
[ROW][C]61[/C][C]0.8832[/C][C]0.5561[/C][C]0.0463[/C][C]34257796830.2554[/C][C]2854816402.5213[/C][C]53430.482[/C][/ROW]
[ROW][C]62[/C][C]1.0629[/C][C]0.6058[/C][C]0.0505[/C][C]36464249717.2863[/C][C]3038687476.4405[/C][C]55124.2912[/C][/ROW]
[ROW][C]63[/C][C]1.2698[/C][C]0.6865[/C][C]0.0572[/C][C]41732831578.1868[/C][C]3477735964.8489[/C][C]58972.3322[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33802&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33802&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
520.04270.04650.0039522967177.533743580598.12786601.5603
530.08860.09080.00761853126103.2482154427175.270712426.8731
540.14030.11210.00932618140323.2582218178360.271514770.8619
550.20410.1230.01022909218788.4133242434899.034415570.3211
560.28040.16440.01374790556072.5186399213006.043219980.3155
570.36920.16350.01364348715196.4393362392933.036619036.6208
580.47190.2380.01988428582758.6747702381896.556226502.4885
590.59050.43530.036325679675423.23952139972951.936646259.8417
600.72670.52240.043533524234366.84292793686197.236952855.3327
610.88320.55610.046334257796830.25542854816402.521353430.482
621.06290.60580.050536464249717.28633038687476.440555124.2912
631.26980.68650.057241732831578.18683477735964.848958972.3322



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