Hi all,
I run a set of regressions, where the independent variable as well as the lag of the independent variable vary, so that I obtain 10x4 regressions. For matters of overview I put the obtained coefficients into a matrix. I also put the standard errors into a second matrix.
However, I would much prefer to have significance asterisks next to the coefficients, for obvious oversight reasons.
Unfortunately I have not yet figured out how to do this.
my command so far is:
I only include the part of the code that I think is crucial for my question. below is the extended code:
In this version of my code, I included my actual regression code, even though I don't think the regression matters. But mybe it helps:
Kind regards
Christian
I run a set of regressions, where the independent variable as well as the lag of the independent variable vary, so that I obtain 10x4 regressions. For matters of overview I put the obtained coefficients into a matrix. I also put the standard errors into a second matrix.
However, I would much prefer to have significance asterisks next to the coefficients, for obvious oversight reasons.
Unfortunately I have not yet figured out how to do this.
my command so far is:
I only include the part of the code that I think is crucial for my question. below is the extended code:
Code:
matrix beta_01 = J(4,10,.) matrix se_01 = J(4,10,.) matrix beta_01[`i'+1,k] = _b[myindep`var'_lag`i'] matrix se_01[`i'+1,k] = _se[myindep`var'_lag`i']
Code:
local myvarlist 10 vars matrix beta_01 = J(4,10,.) matrix se_01 = J(4,10,.) foreach var of varlist `myvarlist' { scalar m =m+1 qui regress mydepvar myindep`var' matrix beta_01[1,m] = _b[myindep`var'] matrix se_01[1,m] = _se[myindep`var'] scalar k = k+1 forval i=1/3 { qui regress mydepvar myindep`var'_lag`i' matrix beta_01[`i'+1,k] = _b[myindep`var'_lag`i'] matrix se_01[`i'+1,k] = _se[myindep`var'_lag`i'] } }
Christian
Comment