A quick guess at what is going wrong one variable perfectly predicts ... perhaps then 0 wrong predictions ... then wald statistic cannot be calculated because of division with 0
I am trying to run a logistic regression analysis using STATA and get the following output:
Why is no value generated for my Wald Chi2 and Prob > Chi2?
Am I missing something?
Background: I am trying to test the odds of using of a particularly innovative diarrhoea treatment kit vs. using the standard from a health center. My outcome is: ORS being prepared in the correct concentration. My predictors are 1) Kit (Kit or HC standard) 2) education of respondent and 3) age group of the respondent.
Any assistance/advice would be greatly appreciated.
Code:xi: logistic correct_concentration2 kitvsHC_2wks i.educ_resp i.agegrp_resp if Q7026!=2 & age_resp != > 3 & age_resp !=888 & age_resp !=999 & age_resp !=237 & age_resp !=533, vce (cluster site) i.educ_resp _Ieduc_resp_1888 (naturally coded; _Ieduc_resp_1 omitted) i.agegrp_resp _Iagegrp_re_18 (naturally coded; _Iagegrp_re_1 omitted) note: _Ieduc_resp_5 != 0 predicts success perfectly _Ieduc_resp_5 dropped and 3 obs not used note: _Ieduc_resp_888 != 0 predicts success perfectly _Ieduc_resp_888 dropped and 1 obs not used Logistic regression Number of obs = 397 Wald chi2(11) = . Prob > chi2 = . Log pseudolikelihood = 190.18305 Pseudo R2 = 0.1670 (Std. Err. adjusted for 13 clusters in site)   Robust correct_concentration2  Odds Ratio Std. Err. z P>z [95% Conf. Interval] + kitvsHC_2wks  11.24157 3.880782 7.01 0.000 5.714488 22.11445 _Ieduc_resp_2  1.157984 .4555998 0.37 0.709 .5355547 2.503809 _Ieduc_resp_3  1.170778 .2816866 0.66 0.512 .7305961 1.876168 _Ieduc_resp_4  2.180526 1.143241 1.49 0.137 .7803323 6.093166 _Ieduc_resp_5  1 (omitted) _Ieduc_resp_6  1.337406 .5192558 0.75 0.454 .6248549 2.862512 _Ieduc_resp_888  1 (omitted) _Iagegrp_re_2  1.718779 1.093071 0.85 0.394 .4941875 5.977895 _Iagegrp_re_3  1.337017 .6823091 0.57 0.569 .4917569 3.635162 _Iagegrp_re_4  1.46303 .7253979 0.77 0.443 .5536198 3.866296 _Iagegrp_re_5  .9990781 .5096386 0.00 0.999 .3676157 2.715219 _Iagegrp_re_6  1.076808 .6089375 0.13 0.896 .3554528 3.262081 _Iagegrp_re_7  1.127842 .4819446 0.28 0.778 .4881083 2.606034 _Iagegrp_re_8  .5456664 .4652697 0.71 0.477 .102598 2.902121 _cons  .895124 .5374177 0.18 0.854 .2759535 2.903558 
Last edited by Dason; 06102015 at 10:03 AM.
A quick guess at what is going wrong one variable perfectly predicts ... perhaps then 0 wrong predictions ... then wald statistic cannot be calculated because of division with 0
Thanks very much JesperHP. This is helpful.
Part of the reason I though that may not be the case was because when I ran the regression with just the Kit vs. Standard ("kitvsHC_2wks") and education of respondent ("educ_resp") predictors it gave me the Chi 2 values, even though the values for "5.educ_resp" and "888.educ_resp" were equal to 0 and predicted success perfectly (see output below). It was only once I added "age_resp" as a predictor that the values were not generated.
So, in that case, is there a way to just drop those particular levels of the categorial predictor? (i.e. can I drop the "5.educ_resp" and "888.educ_resp") somehow? Any idea of how I would add this to my STATA command?
I appreciate your help.
. logistic correct_concentration2 kitvsHC_2wks i.educ_resp if Q7026!=2, vce (cluster site)
note: 5.educ_resp != 0 predicts success perfectly
5.educ_resp dropped and 3 obs not used
note: 888.educ_resp != 0 predicts success perfectly
888.educ_resp dropped and 1 obs not used
Logistic regression Number of obs = 399
Wald chi2(5) = 132.64
Prob > chi2 = 0.0000
Log pseudolikelihood = 191.87728 Pseudo R2 = 0.1618
(Std. Err. adjusted for 13 clusters in site)

 Robust
correct_concentration2  Odds Ratio Std. Err. z P>z [95% Conf. Interval]
+
kitvsHC_2wks  11.4292 3.91619 7.11 0.000 5.839204 22.37063

educ_resp 
Grade 5 to 7  1.181916 .4321522 0.46 0.648 .5772393 2.420011
Grade 8 to 9  1.209429 .2684513 0.86 0.392 .7827857 1.868605
Grade 10 to 12  2.40131 1.198986 1.75 0.079 .9024831 6.389361
Higher learning  1 (empty)
None  1.268956 .4702983 0.64 0.520 .6137276 2.62372
Don't Know  1 (empty)

_cons  1.169003 .3305954 0.55 0.581 .6715755 2.034869

I see youre point ... however this question:
is about stata  I dont know stata  and in any case you have a better chance of getting help if you pose this question under the the STATA section.So, in that case, is there a way to just drop those particular levels of the categorial predictor? (i.e. can I drop the "5.educ_resp" and "888.educ_resp") somehow?
Tweet 