学stata不看手册,很难掌握
这是stata的user guidel里面的
13.5 Accessing coefficients and standard errors
After fitting a model, you can access the coefficients and standard errors and use them in subsequent
expressions. Also see [R] predict (and [U] 20 Estimation and postestimation commands) for an
easier way to obtain predictions, residuals, and the like.
13.5.1 Singleequation
models
First, let’s consider estimation methods that yield one estimated equation with a one-to-one
correspondence between coefficients and variables such as logit, ologit, oprobit, probit,
regress, and tobit. b[varname] (synonym coef[varname]) contains the coefficient on varname
and se[varname] contains its standard error, and both are recorded to machine precision. Thus
b[age] refers to the calculated coefficient on the age variable after typing, say, regress response
age sex, and se[age] refers to the standard error on the coefficient. b[ cons] refers to the
constant and se[ cons] to its standard error. Thus you might type
. regress response age sex
. generate asif = _b[_cons] + _b[age]*age
你看了自己就可以模仿和学习了啊
gen z = _b[x2]*x2 + _b[x3]*x3