Hi everyone,
I'm having trouble understanding what an error code means when running the margins command for a logistic regression I have ran.
The logistic and margins code is:
The error says
I've looked at the Stata guide and looked online but I can't seem to make sense of this error. The size of the regression is 5, 700 observations. The alcohol category has 3 category's (no drinking, light drinking, moderate drinking and heavy drinking) and the qualifications variable has 6 categories (no qualifications, CSE, skilled qual, O-level, A-level or equivalent and degree).
Hope this is enough information,
Emily
I'm having trouble understanding what an error code means when running the margins command for a logistic regression I have ran.
The logistic and margins code is:
Code:
logistic r_ks4_level2_em_37 i.r_mo_ligmodheavyalc_9 i.r_mo_highestedqual_4 i.r_mo_drugsyn_9 i.r_mo_nosmokedlast2wk_3 i.r_mo_alccon1stmove_3 i.r_mo_prenataldrugyn_3 i.r_mo_familyincomeweek_9 i.r_mo_anxietydr_9 i.r_mo_depressiondr_9 c.r_mz028b i.cr_mo_ethnicgrp_4 i.r_mo_ligmodheavyalc_9#i.r_mo_highestedqual_4 margins r_mo_ligmodheavyalc_9, at(r_mo_highestedqual_4=(1(1)6)) marginsplot, noci ytitle(KS4 outcomes) name(alcoholqual6gcse5ACengmath)
Code:
at level for factor r_mo_highestedqual_4 not present in estimation
Hope this is enough information,
Emily
Comment