Hello Everyone,
I have a small issue. I am trying to generate a variable from a regression output. Here, I am presenting my regression command.
clear all
use https://stats.idre.ucla.edu/stat/stata/faq/hsb2
local dv read
local iv write math
keep `dv' `iv'
reg `dv' `iv'
I realize that the model is non-sensical, but the substance of the regression is irrelevant to me at this point. I am trying to figure out how to automate the construction of the following variable:
gen y = 7.541 + .3283*math + .5196*write
I, manually, did this from the regression output. For accuracy and better workflow management, how do I get Stata to get the information from the regression and generate this variable? I have been stuck on this for some time. Any help will be greatly appreciated.
Thank you in advance,
George
I have a small issue. I am trying to generate a variable from a regression output. Here, I am presenting my regression command.
clear all
use https://stats.idre.ucla.edu/stat/stata/faq/hsb2
local dv read
local iv write math
keep `dv' `iv'
reg `dv' `iv'
I realize that the model is non-sensical, but the substance of the regression is irrelevant to me at this point. I am trying to figure out how to automate the construction of the following variable:
gen y = 7.541 + .3283*math + .5196*write
I, manually, did this from the regression output. For accuracy and better workflow management, how do I get Stata to get the information from the regression and generate this variable? I have been stuck on this for some time. Any help will be greatly appreciated.
Thank you in advance,
George
Comment