[R] Marginal Effect larger than 1 for a binary variable (summary.Design after lrm)
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Fri Oct 27 19:07:38 CEST 2006
Minyu Chen wrote:
> Dear All:
>
> I run a logistic regression (using lrm in the Design package), and
> after that, I use the command "summary" to get the marginal effects
> of each variable. But one strange thing happens on my binary
> dependent variable: The marginal effect of it jumping from 0 to 1 is
> 1.77. I believe the marginal effect of binary variable x1 has
> interpretation should be P(Y=1|x1=1, x2...)-P(Y=1|x1=0,x2...). As
> both terms lies in [0,1], their difference shouldn't be larger than 1.
No, please read more of the documentation. Effects are on the log odds
scale; that's why you also get the anti-log of that, the odds ratio.
Frank
>
> Besides this, I also get some boundary number for the marginal effect
> of the same binary variable (in datasets of other years)like .98, .
> 97, with which I am not comfortable either. I suspect I did something
> wrong.
>
> This is part of my model:
>
> > resultt1
>
> Logistic Regression Model
>
> lrm(formula = typemort ~ adv_binc_ratio + agem1 + regEA + regEM +
> regGL + regN + regNI + regNW + regS + regSW + regW + regWM +
> regY + repmethIO + repmethSR + no_dis_no_def + prevLO + prevOO +
> prevRP + owning + adv_binc_ratio * (repmethIO + repmethSR +
> no_dis_no_def + prevLO + prevOO + prevRP + owning) + agem1 *
> (repmethIO + repmethSR + no_dis_no_def + prevLO + prevOO +
> prevRP + owning), data = a)
>
>
> This is part of my result:
>
> > summary(resultt1,adv_binc_ratio=mean(a$adv_binc_ratio),agem1=mean(a
> $agem1),repmethIO=c(0,mean(a$repmethIO),1),repmethSR=c(0,mean(a
> $repmethSR),1),no_dis_no_def=c(0,mean(a$no_dis_no_def),1),prevLO=c
> (0,mean(a$prevLO),1),prevOO=c(0,mean(a$prevOO),1),prevRP=c(0,mean(a
> $prevRP),1),regEA=c(0,mean(a$regEA),1),regEM=mean(a$regEM),regGL=mean
> (a$regGL),regN=mean(a$regN),regNI=mean(a$regNI),regNW=mean(a
> $regNW),regS=mean(a$regS),regSW=mean(a$regSW),regW=mean(a
> $regW),regWM=mean(a$regWM),regY=mean(a$regY),owning=c(0,mean(a
> $owning),1))
> Effects Response : typemort
>
> Factor Low High Diff. Effect S.E. Lower 0.95 Upper 0.95
> no_dis_no_def 0.0000 1.0000 1.0000 1.76 0.03 1.69 1.82
> Odds Ratio 0.0000 1.0000 1.0000 5.79 NA 5.41 6.19
>
> Adjusted to: adv_binc_ratio=2.611027 agem1=40.47638
> repmethIO=0.1456293 repmethSR=0.6711471 no_dis_no_def=0.4463533
> prevLO=0.06590113 prevOO=0.7785591 prevRP=0.06738472 owning=0.4765593
>
> Thank you very much for your help.
>
> Thanks,
> Minyu Chen
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list