[R] Test for treatment effect in a logistic regression

bibek sharma mbhpathak at gmail.com
Tue Oct 16 19:06:42 CEST 2012


Dear R usuer,

I need to fit logistic regression with binomial response. The
objective is to compare treatment groups controlling other categorical
and continuous predictors. The GLM procedure with
family=binomial(Logit) gives me parameters estimates as well as odd
ratios. But objective is to compare if treatment groups are
significantly different. I have used wald test but got error message
(Plz see code used and the error message)  Any suggestion is much
appreciated!

wald.test(b=coef(fit),sigma=vcov(fit), Terms = 2:3) # 2 and 3 are the
estimates  for treatment group.
## Comparing GRoup B to Group C

l <- cbind(0, 1,-1, 0,0,0,0,0,0,0)
wald.test(b = coef(fit), Sigma = vcov(fit), L =1
Error Message

Error in wald.test(b = coef(), sigma = vcov(), Terms = 2:3) :
  unused argument(s) (sigma = vcov())

Thanks in advance for your suggestion,
Bibek



More information about the R-help mailing list