Hi R users I have two bianry variables (X and Y) and one continuous variable (Z). I like to know, after controlling for the continuous variable, where one of the binary is significantly related to the other binary variable using logistic regression model <- glm(Y ~ X + Z, family=binomial) Is checking the significance of the coefficient of X a proper way for doing that ? Any suggestion for this problem ? Thanks _________________________________________________________________ Don’t just search. Find. Check out the new MSN Search!
On 2/15/06, Taka Matzmoto <sell_mirage_ne at hotmail.com> wrote:> I have two bianry variables (X and Y) and one continuous variable (Z). > > I like to know, after controlling for the continuous variable, where one of > the binary is significantly related to the other binary variable using > logistic regression > > model <- glm(Y ~ X + Z, family=binomial) > > Is checking the significance of the coefficient of X a proper way for doing > that ?Yes, that will do it. Chris
On Thu, 16 Feb 2006, Chris Lawrence wrote:> On 2/15/06, Taka Matzmoto <sell_mirage_ne at hotmail.com> wrote: >> I have two bianry variables (X and Y) and one continuous variable (Z). >> >> I like to know, after controlling for the continuous variable, where one of >> the binary is significantly related to the other binary variable using >> logistic regression >> >> model <- glm(Y ~ X + Z, family=binomial) >> >> Is checking the significance of the coefficient of X a proper way for doing >> that ? > > Yes, that will do it.Sorry, not so. That is a Wald test, and its power goes to zero as the true effect increases. You need to do a likelihood ratio test via anova() to get a reasonable test. Details in MASS (see the FAQ). -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Taka Matzmoto wrote:> Hi R users > > I have two bianry variables (X and Y) and one continuous variable (Z). > > I like to know, after controlling for the continuous variable, where one > of the binary is significantly related to the other binary variable > using logistic regression > > > model <- glm(Y ~ X + Z, family=binomial) > > Is checking the significance of the coefficient of X a proper way for > doing that ? > > Any suggestion for this problem ?You could try a bivariate logistic regression. That is implemented in package VGAM (not on CRAN,but google will find it!). Kjetil> > Thanks > > _________________________________________________________________ > Don?t just search. Find. Check out the new MSN Search! > > > ------------------------------------------------------------------------ > > ______________________________________________ > 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