Dear Statalist,
I am trying to run a linear regression, estimate the standard error of the sum of two coefficients via xlincom, and save the standard error as a separate variable.
My code is as follows:
It produces the error
even though I can see from matrix list e(b) that name2 is, in fact, stored in e(b).
I'm really puzzled as to why I get the error.
Any lead about how to solve this problem, or a different approach would be appreciated.
Thank you,
Valentina
I am trying to run a linear regression, estimate the standard error of the sum of two coefficients via xlincom, and save the standard error as a separate variable.
My code is as follows:
Code:
sysuse auto2, clear ssc install xlincom reg price i.rep78##c.weight, coefl g var=0 foreach x of numlist 2(1)5{ xlincom name`x' = _b[`x'.rep78] + _b[`x'.rep78#c.weight], repost replace var=_se[name`x'] if rep78 == `x' }
Code:
[name2] not found
I'm really puzzled as to why I get the error.
Any lead about how to solve this problem, or a different approach would be appreciated.
Thank you,
Valentina
Comment