[R] glht (multicomparisons) with a binomial response variable
Frank Harrell
f.harrell at vanderbilt.edu
Mon Feb 6 13:55:25 CET 2012
Making sure you have the most recent version of rms, try
require(rms)
dd <- datadist(catroj, month); options(datadist='dd')
f <- lrm(catroj ~ month)
contrast(f, list(month=2:12), list(month=1), conf.type='simultaneous')
The actual coding will depend on how month is defined. The contrast above
contrasts January with all other months, with simultaneous confidence
intervals provided by glht.
Frank
gaiarrido wrote
>
> Hi,
> I,ve a run a model like this
> mcrm<-glm(catroj~month,binomial)
> being catroj a binary response variable with two levels (infected
> and non infected)
>
>> anova(mcrm3,test="Chisq")
> Df Deviance Resid. Df Resid. Dev P(>|Chi|)
> NULL 520 149.81
> mes 3 16.86 517 132.94 0.0007551 ***
>
> When I´m trying to do a post comparisons between factors i tried with glht
> of multcomp package by Torsten Hothorn I use "Tukey" contrast, but dídn't
> get diferencies
> > summary(glht(mcrm3,linfct=mcp(month="Tukey")))
> Estimate Std. Error z value Pr(>|z|)
> may - april == 0 -18.2470 1555.0564 -0.012 1.0000
> june - april == 0 -1.9436 0.8307 -2.340 0.0671 .
> july - april == 0 -0.6253 0.5477 -1.142 0.6133
> june - may == 0 16.3034 1555.0565 0.010 1.0000
> july - may == 0 17.6216 1555.0563 0.011 1.0000
> july - june == 0 1.3182 0.7899 1.669 0.2870
>
> I'm afraid "Tukey" it is not the correct contrast, but, What should i use
> for a binary response variable?
> Any advice, please?
>
-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/glht-multicomparisons-with-a-binomial-response-variable-tp4360898p4361171.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list