JMSLab / xtevent

Stata package -xtevent-
MIT License
43 stars 12 forks source link

drop of variable if it matches event-time dummy variable's name #191

Closed Constantino-Carreto-Romero closed 3 months ago

Constantino-Carreto-Romero commented 3 months ago

When running

use example31, clear 
xtevent y eta, panelvar(i) timevar(t) policyvar(z) impute(stag) window(11)  
gen _k_eq_p10 = runiform()
xtevent y eta _k_eq_p10, panelvar(i) timevar(t) policyvar(z) impute(stag) window(11)  

we get the expected error that it is not allowed to include variables with the _k prefix, but the original variable _k_eq_p10 is dropped as well.

jorpppp commented 3 months ago

Summary: In this issue we fixed a bug where variables with reserved names would be dropped by xtevent.

Thread continues in #196