event_plot after saving and loading in estimates
sthau opened this issue · 3 comments
Hi! I'm estimating an event study via the did_imputation
command, and then save the model output to a file with estimates save path/to/model, replace
. I then load in the model with estimates use path/to/model
, and then I store the results. I'd like to store results as re-estimating the model each time will be relatively slow on my full dataset.
I can make tables with the results via esttab
, but event_plot
doesn't seem to work. I get the following error message:
event_plot est_dynamic, default_look
Not enough observations to store 11 coefficient estimates for model 1
invalid syntax
r(198);
In the did_imputation
call, I run the following:
did_imputation share name_loc year groupn, fe(name_loc name_time) horizon(0/5) pretrends(5) cluster(location)
And then save the estimates. I looked around online, and found that some other people have had a similar problem, but there wasn't a response that figured out how to get event_plot
to work with loaded estimates.
Any idea what might be going on?
Hi,
The helpfile for event_plot shows how to use it with "estimates store". If that doesn't help, please post the entire code, or better email me with a minimal example showing the problem.
I'll email you with a minimal example. Thanks for the fast reply!
Just add "set obs 100" before calling event_plot. You are running it on an empty dataset, while event_plot tries save the coefficients in a temporary variable.