Hello,
I really hope someone can help.
I get the following error when I try running the margins command after an HLM model:
"could not calculate numerical derivatives -- discontinuous region with missing values
encountered
r(459);"
My syntax looks something like this:
set more off
melogit income eduyrs female poc discrimination family_income family_edu town_discrim town_stereotypes femalediscrim female_famedu female_towndiscrim || family: || town:, or
margins
The last three variables in the HLM model are interactions, and the last two are cross-level interactions. I get no errors running the actual HLM. It's just the margins command that doesn't work.
I've also tried simplifying the model, but even if I just have income and eduyrs, I still get that error for margins. I also get the error if I drop all observations that are missing on any of the variables in the model.
So I really have no idea what to do.
Thanks in advance for the help.
I really hope someone can help.
I get the following error when I try running the margins command after an HLM model:
"could not calculate numerical derivatives -- discontinuous region with missing values
encountered
r(459);"
My syntax looks something like this:
set more off
melogit income eduyrs female poc discrimination family_income family_edu town_discrim town_stereotypes femalediscrim female_famedu female_towndiscrim || family: || town:, or
margins
The last three variables in the HLM model are interactions, and the last two are cross-level interactions. I get no errors running the actual HLM. It's just the margins command that doesn't work.
I've also tried simplifying the model, but even if I just have income and eduyrs, I still get that error for margins. I also get the error if I drop all observations that are missing on any of the variables in the model.
So I really have no idea what to do.
Thanks in advance for the help.
Comment