s-news
[Top] [All Lists]

Re: [S] summary: logistic regression with two dummy coded factors and th

To: SPLUS-Diskussionsliste <s-news@wubios.wustl.edu>
Subject: Re: [S] summary: logistic regression with two dummy coded factors and their interaction (fwd)
From: Matthias Richard <richard@Psyres-Stuttgart.DE>
Date: Thu, 21 Oct 1999 09:20:21 +0100 (MET)
Sender: owner-s-news@wubios.wustl.edu

Frank Harrell's response was the only one I got (see below).

Thanks!!!

yours, Matthias

----------------------------------------
Matthias Richard (doctoral candidate)

Center for Research on Psychotherapy
Christian-Belser-Str. 79a
70593 Suttgart
Germany
email: richard@psyres-stuttgart.de
telephone: ++49-711-6781-408
http://www.psyres-stuttgart.de

COST Action B6:
'Efficient Psychotherapy of Eating Disorders'
(COoperation of Science and Technology in the European Union)
-----------------------------------------

Matthias Richard wrote:

> Hello folkes,
>
> I have a question concerning a 'simple' logistic regression model
> with two dummy coded effects (one with 4 categories in 3 dummies and
> the other with 2 categories in 1 dummy) and the interaction of these
> two variables. The full model is comprised of several other variables
> but of interest are these two effects and their interaction.
>
> e.g.  gender  (male, female)   vs.  group (A,B,C,D)
>
> ==> gender=0 for male and gender=1 for female
> ==> group is split up in 3 variables GRP.B, GRP.C, GRP.D indicating
>     the group a person belongs to: GRP.B=1 if so and GRP.B=0 otherwise.
>     (This coding sets group A as a reference group)
> ==> interactions are IAGRP.B=GENDER*GRP.B
>                      IAGRP.C=GENDER*GRP.C
>                      IAGRP.D=GENDER*GRP.D
>
> the code to do the logistic regression is (using the DESIGN library
> but the problem is the same for glm() [pentiumII, PC, WIN95, S+ 3.3])
>
> lrm(DEP ~ GENDER + GRP.B + GRP.C + GRP.C +
>           IAGRP.B + IAGRP.C + IAGRP.D, data=data)

Dear Mattias,

You are doing a lot of the work that S+ should be doing.  First of all a very
minor point.
If you make GENDER (shouldn't it be SEX?) a factor variable with descriptive
levels,
the output will be easier to read.  But more importantly, let S+ create all
dummy variables
and interaction effects.  That has many advantages including the fact that
Design can
then give you most meaningful Wald tests.  So the formula would be something
like

DEP ~ GENDER*GROUP

>
>
> questions 1)
> Am I right, that in such a model there is no main effect of
> 'group'?

Mainly.  You can define a variety of "main effects" but if there is
interaction with
GENDER the GROUP effect should usually be estimated GENDER-specific.
The best-defined tests are pooled ones, i.e. the effect of GROUP at any
GENDER.
This is the combined GROUP+GROUP:GENDER effect that Design's anova()
command prints.

>
>
> How do I interpret the coefficient of GENDER in the presence
> of the interactions? From my point of view this is the diffence of females
> compared to males in GROUP A (reference group), because all other
> variables
> are zero - that is: this cannot be interpreted as a usual main effect.
>
> Is there a way to get an estimate of the 'main effect' of GENDER or is
> it not possible because of the dummy coding and the interactions with
> another dummy-coded effect?

The best way to think about effects is to make predictions for any setting
of the covariables, and to compute differences in predicted log odds.
This is coding-invariant.

>
>
> What about an interaction between a dummy and a interval scaled variable?

No problem

>
>
>
> questions 2)
> The data do not necessarily suggest that group A should be the reference
> any other could do so as well. But of course the coefficients of the
> effects do change depending on which category of GRP.x is coded as the
> reference
> group.
> Now I do have concerns about the arbitrariness of the results depending
> on the reference group. That is: the statistical significance changes
> depending on the reference group but the actual estimates (which you get)
> from the regression equation) don't.

The interaction test is invariant to coding.  So are the pooled main
effect+interaction
tests.

-Frank Harrell


>
>
> Do I see anything wrong here? Is this problem discussed somewhere to
> get more information about it? How can I report such an analysis properly?
>
> thanks for any comments - I will put a summary on the list.
>
> yours, Matthias
>
> ----------------------------------------
> Matthias Richard (doctoral candidate)
>
> Center for Research on Psychotherapy
> Christian-Belser-Str. 79a
> 70593 Suttgart
> Germany
> email: richard@psyres-stuttgart.de
> telephone: ++49-711-6781-408
> http://www.psyres-stuttgart.de
>
> COST Action B6:
> 'Efficient Psychotherapy of Eating Disorders'
> (COoperation of Science and Technology in the European Union)
> -----------------------------------------
>
> -----------------------------------------------------------------------
> This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
> send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
> message:  unsubscribe s-news

--
Frank E Harrell Jr
Professor of Biostatistics and Statistics
Division of Biostatistics and Epidemiology
Department of Health Evaluation Sciences
University of Virginia School of Medicine
http://hesweb1.med.virginia.edu/biostat



-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [S] summary: logistic regression with two dummy coded factors and their interaction (fwd), Matthias Richard <=