Hello All,
I am working on an event study using panel data where multiple firms (identified by firm_id) appear in multiple events (identified by eventdate), and each event can involve multiple firms. Therefore, the data structure is cross-classified, not hierarchical — i.e., firms are not nested in events, and events are not nested in firms.
So the data structure is not hierarchical (i.e., nested) but crossed: both firm and events are separate, non-nested grouping factors that influence cumulative abnormal returns (CAR). Instead of assuming that firms are nested within events (or vice versa), I should allow both to have independent random intercepts (hence, cross-classified model), and I should account for the fact that a given firm may respond to many events, and a given event may affect many firms. I need to model these effects separately, rather than treating one as nested within the other.
My goal is to estimate how certain covariates (e.g., X1, X2, X3 ) affect CAR.
Based on my understanding, I should specify a crossed random effects model with random intercepts for both firm_id and eventdate, like this:
I tried to run this command, but Stata displayed the following result:
I would be grateful if you could advise what the correct Stata command is to specify a cross-classified random intercept model in this context using mixed command; and whether there are any important considerations (e.g., data structure or convergence issues) when using mixed for crossed random effects in large panels?
Thank you in advance,
Nick
I am working on an event study using panel data where multiple firms (identified by firm_id) appear in multiple events (identified by eventdate), and each event can involve multiple firms. Therefore, the data structure is cross-classified, not hierarchical — i.e., firms are not nested in events, and events are not nested in firms.
So the data structure is not hierarchical (i.e., nested) but crossed: both firm and events are separate, non-nested grouping factors that influence cumulative abnormal returns (CAR). Instead of assuming that firms are nested within events (or vice versa), I should allow both to have independent random intercepts (hence, cross-classified model), and I should account for the fact that a given firm may respond to many events, and a given event may affect many firms. I need to model these effects separately, rather than treating one as nested within the other.
My goal is to estimate how certain covariates (e.g., X1, X2, X3 ) affect CAR.
Based on my understanding, I should specify a crossed random effects model with random intercepts for both firm_id and eventdate, like this:
Code:
mixed CAR X1 X2 X3 || _all: R.eventdate || firm_id:
Code:
Performing EM optimization ...
_mixed_decomp_hier(): 3900 unable to allocate real <tmp>[868515,6796]
_xtm_mixed_ll_bi(): - function returned error
failed to allocate a 868515 x 6796 real matrix
_mixed_decomp_hier(): 3900 out of memory
_xtm_mixed_ll_bi(): - function returned error
_xtm_em_iter_u(): - function returned error
_xtm_em_iter(): - function returned error
<istmt>: - function returned error
Thank you in advance,
Nick
Comment