gretl version 2019a Copyright Ramu Ramanathan, Allin Cottrell and Riccardo "Jack" Lucchetti This is free software with ABSOLUTELY NO WARRANTY Current session: 2019-03-26 09:28 ? run test-3.inp /Volumes/FredMacHD/Users/fred/Documents/UIBE/Resource-Econometric/Dataset/gretl/test-3.inp ? open \ "/Volumes/FredMacHD/Users/fred/Documents/UIBE/Resource-Econometric/Dataset/gretl/test.gdt" Read datafile /Volumes/FredMacHD/Users/fred/Documents/UIBE/Resource-Econometric/Dataset/gretl/test.gdt periodicity: 4, maxobs: 288 observations range: 1947:1 to 2018:4 Listing 6 variables: 0) const 1) d_LaborShareBusinessSector 2) d_ConsumptionShare 3) IncomeBusinessNoAdj_PCH 4) ld_CorporateProfitsBeforeTax 5) ld__M16072__USALOLITON_m1 # options: ? scalar p = 4 Generated scalar p = 4 ? scalar sig = .1 Generated scalar sig = 0.1 ? scalar lagsel = 0 Generated scalar lagsel = 0 ? scalar select =2 Generated scalar select = 2 ? scalar bequiet =0 Generated scalar bequiet = 0 ? list col_LST = d_LaborShareBusinessSector Generated list col_LST ? list row_LST = d_ConsumptionShare Generated list row_LST ? list zlist = IncomeBusinessNoAdj_PCH ld_CorporateProfitsBeforeTax \ ld__M16072__USALOLITON_m1 Generated list zlist # for initializaiton only, do not change here #scalar zflag = 0 # this is for initialization only, =1 makes row and column variables to be zlist ? strings selecttype = defarray("AIC", "BIC", "HQC", "CVC") ? string mystring ="" Generated string mystring # copied and modified from addlist ? function list addvarlist (list y "dependent variable", list list0 \ "initial regressors", list list1 "candidates for addition", int \ nlags "number of lags", int criterion[1:4:1] {"AIC", "BIC", "HQC", \ "CVC"}, bool quiet[0]) ? function string myreg(list y1 "dependent variable", list t1 \ "tested variables will be lagged", list ly1 \ "might be dependent variable, group 2 will be lagged", list \ zlistin "conditional variables will be lagged", int maxlag \ "number of lags", int select \ "addvarlist criterion: {AIC, BIC, HQC, CVC}", scalar sig[0.05] \ "significant level", scalar aicbic[0] \ "lag selection criteria, 1=aic, 2=bic, 3=hqc", bool quiet[0]) # real work starts here. real work starts ? loop j = 1..nelem(row_LST) -q > list r1 = row_LST[j] > mystring ~= varname(r1) ~ sprintf("\t") > loop i = 1..nelem(col_LST) -q > list c1 = col_LST[i] > mystring ~= myreg(c1,r1,c1,zlist,p,select,sig,lagsel,bequiet) > mystring ~= myreg(r1,c1,r1,zlist,p,select,sig,lagsel,bequiet) > endloop > mystring ~= sprintf("\n") > endloop On d_LaborShareBusinessSector vs. d_ConsumptionShare, effective zlist used are (is) ld__M16072__USALOLITON_m1, OLS, using observations 1949:2-2017:4 (T = 275) Dependent variable: d_LaborShareBusinessSector HAC standard errors, bandwidth 4 (Bartlett kernel) coefficient std. error t-ratio p-value -------------------------------------------------------------- const -0.0546812 0.0563938 -0.9696 0.3331 d_ConsumptionS~_1 0.0220732 0.150154 0.1470 0.8832 d_ConsumptionS~_2 -0.158528 0.137190 -1.156 0.2489 d_ConsumptionS~_3 -0.247953 0.144763 -1.713 0.0879 * d_ConsumptionS~_4 -0.351830 0.111725 -3.149 0.0018 *** d_LaborShareBu~_1 -0.310244 0.0780804 -3.973 9.17e-05 *** d_LaborShareBu~_2 0.0232602 0.0555445 0.4188 0.6757 d_LaborShareBu~_3 0.0278736 0.0731082 0.3813 0.7033 d_LaborShareBu~_4 0.0360599 0.0763419 0.4723 0.6371 ld__M16072__US~_1 -0.646754 0.486133 -1.330 0.1845 ld__M16072__US~_2 -0.173614 0.652626 -0.2660 0.7904 ld__M16072__US~_3 0.655099 0.642402 1.020 0.3088 ld__M16072__US~_4 0.341743 0.485613 0.7037 0.4822 Mean dependent var -0.054251 S.D. dependent var 1.001726 Sum squared resid 227.7293 S.E. of regression 0.932307 R-squared 0.171734 Adjusted R-squared 0.133798 F(12, 262) 4.003440 P-value(F) 0.000011 Log-likelihood -364.2737 Akaike criterion 754.5475 Schwarz criterion 801.5655 Hannan-Quinn 773.4171 rho -0.021206 Durbin-Watson 2.040215 Excluding the constant, p-value was highest for variable 18 (d_ConsumptionShare_1) before coeffsum, the variabel names are: Array of strings, length 4 [1] "d_ConsumptionShare_1" [2] "d_ConsumptionShare_2" [3] "d_ConsumptionShare_3" [4] "d_ConsumptionShare_4" Variables: d_ConsumptionShare_1 d_ConsumptionShare_2 d_ConsumptionShare_3 d_ConsumptionShare_4 Sum of coefficients = -0.736238 Standard error = 0.357461 t(262) = -2.05963 with p-value = 0.0404216 coeffsum worked, and the text string is: p-value= 0.040422, t-test= -2.059633 On d_ConsumptionShare vs. d_LaborShareBusinessSector, effective zlist used are (is) ld__M16072__USALOLITON_m1, OLS, using observations 1949:2-2018:1 (T = 276) Dependent variable: d_ConsumptionShare HAC standard errors, bandwidth 4 (Bartlett kernel) coefficient std. error t-ratio p-value -------------------------------------------------------------- const 0.0203000 0.0283394 0.7163 0.4744 d_LaborShareBu~_1 -0.0262368 0.0311408 -0.8425 0.4003 d_LaborShareBu~_2 0.00769263 0.0274087 0.2807 0.7792 d_LaborShareBu~_3 0.0531050 0.0283809 1.871 0.0624 * d_LaborShareBu~_4 0.0288773 0.0291275 0.9914 0.3224 d_ConsumptionS~_1 -0.206023 0.0697818 -2.952 0.0034 *** d_ConsumptionS~_2 0.155379 0.128538 1.209 0.2278 d_ConsumptionS~_3 0.0104192 0.111676 0.09330 0.9257 d_ConsumptionS~_4 -0.209309 0.0735239 -2.847 0.0048 *** ld__M16072__US~_1 -0.645438 0.309458 -2.086 0.0380 ** ld__M16072__US~_2 0.0455608 0.455629 0.1000 0.9204 ld__M16072__US~_3 0.0617992 0.384556 0.1607 0.8725 ld__M16072__US~_4 -0.109832 0.232117 -0.4732 0.6365 Mean dependent var 0.014493 S.D. dependent var 0.498076 Sum squared resid 55.00629 S.E. of regression 0.457329 R-squared 0.193717 Adjusted R-squared 0.156928 F(12, 263) 4.827591 P-value(F) 3.60e-07 Log-likelihood -169.0395 Akaike criterion 364.0789 Schwarz criterion 411.1442 Hannan-Quinn 382.9654 rho -0.012876 Durbin-Watson 1.990830 Excluding the constant, p-value was highest for variable 24 (d_ConsumptionShare_3) before coeffsum, the variabel names are: Array of strings, length 4 [1] "d_LaborShareBusinessSector_1" [2] "d_LaborShareBusinessSector_2" [3] "d_LaborShareBusinessSector_3" [4] "d_LaborShareBusinessSector_4" Abort trap: 6 Freds-MacBook-Pro:gretl fred$