Hi guys
I am running a logistic regression that yields the output below.
logistic under5_death i.v190 i.v106 i.v155 i.v116 i.v113 i.child_headed i.elderly_headed i.v151
Logistic regression Number of obs = 68,053
LR chi2(36) = 491.69
Prob > chi2 = 0.0000
Log likelihood = -21013.582 Pseudo R2 = 0.0116
-------------------------------------------------------------------------------------
under5_death | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
--------------------+----------------------------------------------------------------
v190 |
poorer | .9912508 .0405383 -0.21 0.830 .9148981 1.073975
middle | 1.017736 .0421506 0.42 0.671 .9383866 1.103796
richer | 1.002348 .0428908 0.05 0.956 .9217117 1.090038
richest | .8934897 .0495944 -2.03 0.042 .8013873 .9961774
|
v106 |
primary | .910445 .0343843 -2.48 0.013 .8454868 .9803939
secondary | .6248727 .0391486 -7.51 0.000 .5526668 .7065123
higher | .4991749 .0896017 -3.87 0.000 .3511255 .7096481
|
v155 |
able to read onl.. | .681535 .0373102 -7.00 0.000 .612195 .7587289
able to read who.. | .825607 .0292253 -5.41 0.000 .7702684 .8849213
no card with req.. | 1.452772 .7889518 0.69 0.492 .5011159 4.211691
blind/visually i.. | 2.302456 .4732812 4.06 0.000 1.538944 3.444768
|
v116 |
flush to septic .. | .9790474 .2756195 -0.08 0.940 .563865 1.699935
flush to pit lat.. | 1.101606 .3958254 0.27 0.788 .544723 2.227806
flush to somewhe.. | 1 (empty)
flush, don't kno.. | 1 (empty)
ventilated impr..) | 1.040707 .3169324 0.13 0.896 .5729372 1.890382
pit latrine with.. | 1.508009 .3837965 1.61 0.107 .9157318 2.483358
pit latrine with.. | 1.571929 .4047602 1.76 0.079 .9489747 2.60382
no facility/bush.. | 1.661417 .4325301 1.95 0.051 .9974207 2.767444
composting toilet | 1.955899 .7115385 1.84 0.065 .9587094 3.990303
bucket toilet | 1.25118 .5871615 0.48 0.633 .4987267 3.138896
hanging toilet/l.. | .6696302 .7086455 -0.38 0.705 .0841471 5.32882
other | .7903177 .8456404 -0.22 0.826 .0970545 6.435582
not a dejure res.. | .9882704 .3284421 -0.04 0.972 .5152135 1.895677
|
v113 |
piped to yard/plot | .7102946 .0958706 -2.53 0.011 .5451917 .9253963
piped to neighbor | .621327 .0943687 -3.13 0.002 .4613575 .8367638
public tap/stand.. | .7442398 .1025789 -2.14 0.032 .5680563 .9750669
tube well or bor.. | .8290829 .1103782 -1.41 0.159 .6386678 1.076269
protected well | .7621526 .1152501 -1.80 0.072 .5666647 1.02508
unprotected well | .7839391 .1098031 -1.74 0.082 .5957417 1.031589
protected spring | .6947365 .2144197 -1.18 0.238 .379411 1.272127
unprotected spring | .9449994 .1651478 -0.32 0.746 .6709279 1.331028
river/dam/lake/p.. | .7624729 .11232 -1.84 0.066 .5712601 1.017689
rainwater | 1.244404 .7005856 0.39 0.698 .4128043 3.751271
cart with small .. | 1 (empty)
bottled water | 1 (empty)
other | 1.260356 .3936242 0.74 0.459 .6833651 2.324522
not a dejure res.. | 1 (omitted)
|
1.child_headed | .4497543 .4626321 -0.78 0.437 .0598965 3.377142
1.elderly_headed | 1.088379 .078315 1.18 0.239 .9452169 1.253225
|
v151 |
female | 1.160371 .0338537 5.10 0.000 1.09588 1.228656
_cons | .1069735 .0277268 -8.62 0.000 .0643651 .1777878
-------------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
However, when I use the margins command on v113 or v116 I get missing values. While there are some missing values in the output above, most categories in these variables have produced odds ratios.
I do not understand why this is the case and an hour of googling has not yielded much. Can anyone suggest why this is happening?
margins v113
margins v116
margins v113
Predictive margins Number of obs = 68,053
Model VCE : OIM
Expression : Pr(under5_death), predict()
-------------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. z P>|z| [95% Conf. Interval]
--------------------+----------------------------------------------------------------
v113 |
piped into dwell.. | . (not estimable)
piped to yard/plot | . (not estimable)
piped to neighbor | . (not estimable)
public tap/stand.. | . (not estimable)
tube well or bor.. | . (not estimable)
protected well | . (not estimable)
unprotected well | . (not estimable)
protected spring | . (not estimable)
unprotected spring | . (not estimable)
river/dam/lake/p.. | . (not estimable)
rainwater | . (not estimable)
other | . (not estimable)
not a dejure res.. | . (not estimable)
-------------------------------------------------------------------------------------
.
end of do-file
Related Posts with margins in logistic regression generating missing values
Need for a permutation test ?Hi, STATA people, I have 12000 observation. I want to randomly assign a fake treatment value of 1 t…
Simple by() and 'if' questionI'm working with some historical data on NFL players. I want to create a dummy variable indicating w…
Change of variable in one columnHi Stata users, I am trying to generate a variable to tell me when a change in values has occurred …
A loop to predict a log-modelFor the model, Y= Yt-1+X1t+X2t+X3t+e I want to create a loop to predict future values such that the …
cond() functionHi all! I have the following dilemma. I would like to create variables such that: if a local takes…
Subscribe to:
Post Comments (Atom)
0 Response to margins in logistic regression generating missing values
Post a Comment