Closed asmithbravo closed 4 years ago
This looks like a standard out-of-memory problem. Stata tried to allocate a huge vector with 400m rows and failed.
Dear Sergio,
Thanks for your reply, but I meant my case, not the 400 million rows. This is why I don't understand why does it happened to me. I have a panel from 1960 to 2019, and I am using around 6 gmm style variables (including the lagged dependent variable) and 1 ivstyle (year fixed effects), and still see the same error message.
I'm not fully sure of how xtabond2 uses ftools or reghdfe though. I went through the source (viewsource xtabond2.mata) and found no mention of either.
Thanks. Are you aware of how to fix this memory problem with xtabond2?
xtabond2 does not use reghdfe and Sergio did not write xtabond2, so this question would seem not to be for him.
That said, xtabond2 does not call round() or factor(), so I don't think that error message is coming from xtabond2.
You need to document more precisely and fully what you are doing and what problems result and determine whether the discussion even belongs here.
If you are running out of memory in xtabond2, it's probably because you are generating a lot of instruments, which is usually a problem. See my paper, "A Note on the Theme of Too Many Instruments."
Dear David,
Thanks for your reply and for the very good paper suggested. Here is the link where I posted my question.
https://github.com/bashtage/linearmodels/issues/95#issuecomment-727165190
Dear Sergio,
After running xtabond2 for a dynamic panel data model I get the same message:
round(): 3900 unable to allocate real[403200000,1]
factor(): - function returned error