benjann / estout

Stata module to make regression tables
http://repec.sowi.unibe.ch/stata/estout/index.html
MIT License
70 stars 17 forks source link

Keep keeps too many variables #23

Closed matthieugomez closed 4 years ago

matthieugomez commented 4 years ago

I think there is a bug in estout for Stata 16: keep(x) keeps all variables with the prefix x

set obs 100
gen y = _n
gen x = _n
gen x_1 = _n
gen z = _n
reg y x x_1 z
estimates store m
estout m, keep(x)
-------------------------
                        m
                        b
-------------------------
x                       1
x_1                     0
-------------------------
benjann commented 4 years ago

This is an issue that was introduced in Stata 16. Meanwhile, Stata 16 has been fixed. That is, if you update Stata (type -update all- and follow the instructions), the problem should go away.

For background information see here.

matthieugomez commented 4 years ago

Awesome! Thanks for the speedy answer.