Dear fellow members
I wish to have some clarification regarding estimation and interpretations of predictive margin after logit
example:
I my query is, shall we adjust for controls used in regression specifications while estimating predictive margins using margins?
The reason I am asking is because in my multivariable logit regression equation I have a categorical variable for 100 districts. The data is district level representative with total observation around 250000.
My purpose is to estimate probability of outcome (y) at each wealthdecile
which type (adjusted or unadjusted) of margins one should report? Do we need to use sampling weight as well?
case 1.A
case 2.A
Below are the results from case 1.A and 2.A
*Magnitude of difference is small but time cost of computation large
Thank you!
Stata 18.0
I wish to have some clarification regarding estimation and interpretations of predictive margin after logit
example:
Code:
webuse margex *case 1 logit outcome i.sex margins i.sex // gives adjusted predictions as we have only one regressor *case 2 logit outcome i.sex age margins i.sex // gives predictive margins but does not say anything about adjustment. Does it takes into account the age, I think no. I am asking because we have used age as control in initial logit estimation. margins i.sex, at(age) // gives predictive margins which are different in magnitude and shown as adjusted predictions.
The reason I am asking is because in my multivariable logit regression equation I have a categorical variable for 100 districts. The data is district level representative with total observation around 250000.
My purpose is to estimate probability of outcome (y) at each wealthdecile
which type (adjusted or unadjusted) of margins one should report? Do we need to use sampling weight as well?
Code:
logit y i.sex i.urban i.wealthdecile i.district[pw=wt] // y is a binary (0 or 1) outcome variable
Code:
margins i.wealthdecile // or
Code:
margins i.wealthdecile at (sex urban district )
Code:
*Case 1.A margins i.wealthdecile Predictive margins Number of obs = XXXXX Model VCE: Robust Expression: Pr(y), predict() ------------------------------------------------------------------------------ | Delta-method | Margin std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- wealthdecile | 1 | .5457612 .0038229 142.76 0.000 .5382684 .553254 2 | .5752248 .0035628 161.45 0.000 .5682419 .5822077 3 | .5786737 .0035924 161.08 0.000 .5716327 .5857148 4 | .5867294 .0035887 163.49 0.000 .5796956 .5937632 5 | .5775975 .0037508 153.99 0.000 .570246 .5849489 6 | .5815214 .0038654 150.44 0.000 .5739452 .5890975 7 | .5560213 .0040913 135.90 0.000 .5480025 .56404 8 | .5411535 .0048161 112.36 0.000 .5317141 .5505929 9 | .4778415 .0047144 101.36 0.000 .4686013 .4870816 10 | .3870589 .0046531 83.18 0.000 .377939 .3961789 ------------------------------------------------------------------------------ *Case 2.A . margins i.wealthdecile, at(sex urban district) Adjusted predictions Number of obs = XXXXXX Model VCE: Robust Expression: Pr(y), predict() At: 1.sex = .5216951 (mean) 2.sex = .4783049 (mean) 1.urban = .2847464 (mean) 2.urban = .7152536 (mean) 1.district = .0005732 (mean) 2.district = .0003696 (mean) 3.district = .0000688 (mean) 4.district = .0000826 (mean) . . . 100.district = .0000826 (mean) Delta-method Margin std. err. z P>z [95% conf. interval] wealthdecile 1 .5519841 .0044273 124.68 0.000 .5433068 .5606615 2 .5859534 .0040909 143.23 0.000 .5779353 .5939714 3 .5899154 .0041158 143.33 0.000 .5818487 .5979822 4 .5991553 .0041073 145.88 0.000 .5911052 .6072055 5 .5886794 .0043027 136.82 0.000 .5802463 .5971125 6 .593184 .0044396 133.61 0.000 .5844826 .6018854 7 .5638349 .0047301 119.20 0.000 .5545641 .5731057 8 .5466562 .0055888 97.81 0.000 .5357024 .5576099 9 .4733113 .0054759 86.44 0.000 .4625788 .4840438 10 .3692428 .0052384 70.49 0.000 .3589758 .3795099
*Magnitude of difference is small but time cost of computation large
Thank you!
Stata 18.0
Comment