help erepost
-------------------------------------------------------------------------------

Title

erepost -- Repost the estimation results

Syntax

erepost [b = b] [V = V] [, cmd(string) rename [no]esample[(varname)] ereturn_post_opts ]

where b is a 1 x p coefficient vector (matrix) and V is a p x p covariance matrix.

Description

erepost changes the b or V matrix of the current estimation results or changes the declared estimation sample. erepost is similar to ereturn repost. However, erepost is allowed after estimation commands that do not post their results using ereturn post (e.g. logit) and erepost can be used outside of eclass programs (see help program).

Technical note: After applying erepost the original command (or estimates replay) may not be able to replay the output.

Options

cmd(string) sets the e(cmd) macro.

rename causes the names from the coefficient vector to be used as the labels for both the coefficient vector and the covariance matrix in case of name conflicts.

esample(varname) gives the name of the 0/1 variable indicating the observations involved in the estimation. The variable is removed from the data but is available for use as e(sample). Specify noesample if you want to remove e(sample) from the estimation results.

ereturn_post_opts are any other options allowed with ereturn post (see help ereturn).

Examples

Say, you are estimating a regression model that contains all interactions between the regressors and a binary variable and you want to display the main effects and the interaction effects in two columns side by side. One approach is to modify the names in e(b) and e(V) so that there is a "main equation" and an "interaction equation" and then tabulate the model using estout or esttab with the unstack option. Example (you will need the estout package to run this example; type ssc describe estout):

. sysuse auto (1978 Automobile Data) . generate foreign_mpg = foreign*mpg . generate foreign_weight = foreign*weight . quietly regress price foreign_mpg foreign_weight foreign mpg weight . matrix b = e(b) . matrix coleq b = foreign foreign foreign main main main . matrix colname b = mpg weight _cons mpg weight _cons . erepost b=b, rename . esttab , unstack order(main: foreign:) -------------------------------------------- (1) price main foreign -------------------------------------------- mpg 237.7 -257.5 (1.90) (-1.66) weight 4.415*** 0.741 (5.18) (0.45) _cons -13285.4* 8219.6 (-2.58) (1.13) -------------------------------------------- N 74 -------------------------------------------- t statistics in parentheses * p<0.05, ** p<0.01, *** p<0.001

Author

Ben Jann, ETH Zurich, jann@soz.gess.ethz.ch

Also see

Online: ereturn, estcom, estimates