------------------------------------------------------------------------------------------------------------- . tsset quarter Time variable: quarter, 1985q1 to 2021q3 Delta: 1 quarter . twoway (tsline FW) . gen l_FW = ln(FW) . gen dl_FW = D.l_FW (1 missing value generated) . twoway (tsline dl_FW) . gen sddl_FW= S4.dl_FW (5 missing values generated) . ac sddl_FW, lags(15) . pac sddl_FW, lags(15) . * Sobivate mittesesoonsete järkude otsimine . arimasoc sddl_FW, maxar(1) maxma(1) arimaopts(sarima(0,0,1,4)) Fitting models (4): .... done Lag-order selection criteria Sample: 1986q2 thru 2021q3 Number of obs = 142 -------------------------------------------------------------------- Model | LL df AIC BIC HQIC -------------+------------------------------------------------------ ARMA(0,0) | 206.0638 3 -406.1275 -397.26 -402.5241 ARMA(0,1) | 214.4783 4 -420.9565 -409.1332 -416.152 ARMA(1,0) | 213.5557 4 -419.1114 -407.2881 -414.3069 ARMA(1,1) | 216.4283 5 -422.8567 -408.0775 -416.851 -------------------------------------------------------------------- Selected (max) LL: ARMA(1,1) Selected (min) AIC: ARMA(1,1) Selected (min) BIC: ARMA(0,1) Selected (min) HQIC: ARMA(1,1) . * logaritmitud aegrea ARIMA modelleerimine . arima l_FW, arima(1,1,1) sarima(0,1,1,4) (setting optimization to BHHH) Iteration 0: Log likelihood = 174.29602 Iteration 1: Log likelihood = 186.89409 Iteration 2: Log likelihood = 204.10319 Iteration 3: Log likelihood = 208.15023 Iteration 4: Log likelihood = 211.43492 (switching optimization to BFGS) Iteration 5: Log likelihood = 213.19875 Iteration 6: Log likelihood = 213.65112 Iteration 7: Log likelihood = 214.74817 Iteration 8: Log likelihood = 215.61158 Iteration 9: Log likelihood = 216.18337 Iteration 10: Log likelihood = 216.32715 Iteration 11: Log likelihood = 216.37131 Iteration 12: Log likelihood = 216.40418 Iteration 13: Log likelihood = 216.42057 Iteration 14: Log likelihood = 216.42808 (switching optimization to BHHH) Iteration 15: Log likelihood = 216.42833 Iteration 16: Log likelihood = 216.42833 ARIMA regression Sample: 1986q2 thru 2021q3 Number of obs = 142 Wald chi2(3) = 1019.38 Log likelihood = 216.4283 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG DS4.l_FW | Coefficient std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- l_FW | _cons | .0000218 .0006058 0.04 0.971 -.0011655 .0012091 -------------+---------------------------------------------------------------- ARMA | ar | L1. | .4449927 .1147219 3.88 0.000 .2201419 .6698435 | ma | L1. | -.8058027 .1019968 -7.90 0.000 -1.005713 -.6058927 -------------+---------------------------------------------------------------- ARMA4 | ma | L1. | -.7210204 .0617801 -11.67 0.000 -.8421073 -.5999335 -------------+---------------------------------------------------------------- /sigma | .0519685 .0018417 28.22 0.000 .0483589 .055578 ------------------------------------------------------------------------------ Note: The test of the variance against zero is one sided, and the two-sided confidence interval is truncated at zero. . arima l_FW, noconstant arima(1,1,1) sarima(0,1,1,4) (setting optimization to BHHH) Iteration 0: Log likelihood = 174.26844 Iteration 1: Log likelihood = 209.68974 Iteration 2: Log likelihood = 212.4607 Iteration 3: Log likelihood = 215.49793 Iteration 4: Log likelihood = 216.00705 (switching optimization to BFGS) Iteration 5: Log likelihood = 216.24462 Iteration 6: Log likelihood = 216.36986 Iteration 7: Log likelihood = 216.4192 Iteration 8: Log likelihood = 216.42239 Iteration 9: Log likelihood = 216.42549 Iteration 10: Log likelihood = 216.42721 Iteration 11: Log likelihood = 216.42728 Iteration 12: Log likelihood = 216.42728 ARIMA regression Sample: 1986q2 thru 2021q3 Number of obs = 142 Wald chi2(3) = 1622.42 Log likelihood = 216.4273 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG DS4.l_FW | Coefficient std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- ARMA | ar | L1. | .4449382 .1136626 3.91 0.000 .2221636 .6677127 | ma | L1. | -.8057599 .0985083 -8.18 0.000 -.9988326 -.6126872 -------------+---------------------------------------------------------------- ARMA4 | ma | L1. | -.7209487 .0615593 -11.71 0.000 -.8416027 -.6002948 -------------+---------------------------------------------------------------- /sigma | .0519697 .0017683 29.39 0.000 .048504 .0554355 ------------------------------------------------------------------------------ Note: The test of the variance against zero is one sided, and the two-sided confidence interval is truncated at zero. . estat ic Akaike's information criterion and Bayesian information criterion ----------------------------------------------------------------------------- Model | N ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- . | 142 . 216.4273 4 -424.8546 -413.0313 ----------------------------------------------------------------------------- Note: BIC uses N = number of observations. See [R] IC note. . predict res, residuals (5 missing values generated) . corrgram res -1 0 1 -1 0 1 LAG AC PAC Q Prob>Q [Autocorrelation] [Partial autocor] ------------------------------------------------------------------------------- 1 -0.0402 -0.0412 .23464 0.6281 | | 2 0.0888 0.1088 1.3874 0.4997 | | 3 0.0445 0.0514 1.6781 0.6418 | | 4 -0.1449 -0.1892 4.7901 0.3095 -| -| 5 -0.1482 -0.1918 8.0672 0.1526 -| -| 6 0.0745 0.2408 8.9022 0.1792 | |- 7 -0.0187 0.0364 8.955 0.2559 | | 8 0.0623 0.1463 9.5465 0.2983 | |- 9 0.0136 0.0114 9.575 0.3860 | | 10 0.0215 -0.0508 9.6469 0.4720 | | 11 0.0197 0.1056 9.7073 0.5569 | | 12 0.0418 0.0975 9.9822 0.6175 | | 13 -0.0201 0.0080 10.046 0.6902 | | 14 0.0538 0.0856 10.508 0.7242 | | 15 0.0213 0.0888 10.581 0.7817 | | 16 0.0528 0.0966 11.033 0.8074 | | 17 0.0211 0.0925 11.106 0.8510 | | 18 -0.0508 -0.2316 11.531 0.8705 | -| 19 -0.0110 -0.0418 11.551 0.9039 | | 20 0.0081 0.0888 11.563 0.9303 | | 21 -0.0463 -0.0053 11.925 0.9416 | | 22 0.0230 0.0307 12.015 0.9571 | | 23 0.0202 0.0284 12.085 0.9691 | | 24 0.0680 0.1740 12.887 0.9679 | |- 25 -0.0170 -0.0104 12.937 0.9773 | | 26 -0.0198 -0.1951 13.007 0.9839 | -| 27 -0.0135 -0.0578 13.039 0.9890 | | 28 0.0933 0.4102 14.601 0.9823 | |--- 29 0.0077 0.2662 14.612 0.9878 | |-- 30 -0.0586 -0.3103 15.238 0.9883 | --| 31 0.0396 -0.0489 15.527 0.9907 | | 32 0.0045 0.1197 15.53 0.9937 | | 33 -0.1218 -0.1328 18.314 0.9818 | -| 34 0.0284 -0.0923 18.467 0.9861 | | 35 0.0411 0.1298 18.79 0.9885 | |- 36 -0.0013 0.2027 18.79 0.9920 | |- 37 0.0461 0.1752 19.205 0.9931 | |- 38 0.0335 -0.0801 19.426 0.9946 | | 39 0.0826 0.1964 20.779 0.9926 | |- 40 0.0949 0.3826 22.584 0.9880 | |--- . tsappend, add(5) . predict l_FW_hat, y dynamic(tq(2021q4)) (5 missing values generated) . gen FW_hat = exp(l_FW_hat) (5 missing values generated) . twoway (tsline FW) (tsline FW_hat) . ssc install fcstats . fcstats FW FW_hat Forecast accuracy statistics for FW, N = 142 FW_hat RMSE 98.636885 MAE 48.534634 MAPE .03474621 QLIKE .00134446 Theil's U .28818666 -------------------------------------------------------------------------------------------------------------