Hello statalist.
I am trying to estimate Cook's D and DFBETAs after an xtmixed estimation. In order to do so I am using the mltcooksd command, which is a part of the ADO-package mlt. I have tried with different models with and without random slopes and I always get the same error message:
" Cook's D and DFBETAs cannot be estimated for the level-two unit cntrynum==1
because the model is not identified without unit. "
For my xtmixed models I have 44000 observations and 29 groups, with a minimum of 586 observations in the smallest group and a maximum of 2513 observations in the largest group. The variable identifying the level-two units (countries) is cntrynum. The syntax I am using to estimate the models and the Cook's D and DFBETAS is the following:
Model 1:
xtmixed vote_rec leg_libdem_no_eu leg_social_justice leg_direct_democracy ib1.chpldm ///
st_eduyrs st_polintr st_agea gndr wkvlorg leftist unionized1 wrkorg || cntrynum:
mltcooksd, counter
Model 2:
xtmixed protest c.leg_libdem_no_eu c.leg_social_justice##c.union_es c.leg_direct_democracy ib1.chpldm ///
st_eduyrs st_polintr st_agea gndr unionized1 wkvlorg leftist wrkorg if complete3 == 1 || cntrynum: leg_libdem_no_eu leg_social_justice leg_direct_democracy
mltcooksd , counter
The first model does not include any predictor at the country level while the second one does and it also includes a cross-level interaction. In both cases I am getting the same error, which I pasted above.
Does anyone know how to solve this problem, or any other way to estimate Cook's D and DFBETAs after xtmixed? By the way, I have also tried with the new mixed command but the command mltcooksd does not work with this command.
Thank you very much for your help.
Enrique Hernández
I am trying to estimate Cook's D and DFBETAs after an xtmixed estimation. In order to do so I am using the mltcooksd command, which is a part of the ADO-package mlt. I have tried with different models with and without random slopes and I always get the same error message:
" Cook's D and DFBETAs cannot be estimated for the level-two unit cntrynum==1
because the model is not identified without unit. "
For my xtmixed models I have 44000 observations and 29 groups, with a minimum of 586 observations in the smallest group and a maximum of 2513 observations in the largest group. The variable identifying the level-two units (countries) is cntrynum. The syntax I am using to estimate the models and the Cook's D and DFBETAS is the following:
Model 1:
xtmixed vote_rec leg_libdem_no_eu leg_social_justice leg_direct_democracy ib1.chpldm ///
st_eduyrs st_polintr st_agea gndr wkvlorg leftist unionized1 wrkorg || cntrynum:
mltcooksd, counter
Model 2:
xtmixed protest c.leg_libdem_no_eu c.leg_social_justice##c.union_es c.leg_direct_democracy ib1.chpldm ///
st_eduyrs st_polintr st_agea gndr unionized1 wkvlorg leftist wrkorg if complete3 == 1 || cntrynum: leg_libdem_no_eu leg_social_justice leg_direct_democracy
mltcooksd , counter
The first model does not include any predictor at the country level while the second one does and it also includes a cross-level interaction. In both cases I am getting the same error, which I pasted above.
Does anyone know how to solve this problem, or any other way to estimate Cook's D and DFBETAs after xtmixed? By the way, I have also tried with the new mixed command but the command mltcooksd does not work with this command.
Thank you very much for your help.
Enrique Hernández
Comment