🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.stats.s
Article #279

Re: [S] Categorical covariate (for Cox's model)

#279
From: Prof Brian Ripley
Date: Tue, 07 Aug 2001 12:43
48 lines
3191 bytes
On Tue, 7 Aug 2001, Tristan Lorino wrote:

> Hy,
>
> I would like to fit a Cox model with a categorical covariate, which takes
> 12 values (from 1 to 12). This covariate indicates the month.
> When I code this covariate from 0 to 11, the value 0 is the reference.
> When I code this covariate from 1 to 12, the value 12 is the reference.
> Is it normal ?

Depends how you `code'.  The covariate should be a factor, and factor
levels are done in numerical order.  So (S-PLUS 6)

> x <- factor(as.character(1:12))
> x
 [1] 1  2  3  4  5  6  7  8  9  10 11 12
> levels(x)
 [1] "1"  "10" "11" "12" "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"
> x
 [1] 0  1  2  3  4  5  6  7  8  9  10 11
> levels(x)
 [1] "0"  "1"  "10" "11" "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"

is what I would expect.

> In this example, it is undesirable to take a reference value. Could I have
> 12 fitting coefficients (i.e. without reference) instead of only 11 ?

The model is only determined up to an additive constant.  The `reference
value' is the coefficient that is taken to be zero.  There has to be some
constraint.  You may find the use of dummy.coef illuminating.

There is an indeterminacy between the proportionality factor and the
scale of the baseline hazard.


-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

---------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news
---
Technical Details
Message-ID: <Pine.LNX.4.31.0108071323200.9092-100000@gannet.stats>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!news1.optus.net.au!optus!news.usyd.edu.au!news.nsw.CSIRO.AU!cmis.csiro.au!owner-s-news
References: <5.1.0.14.2.20010807135703.00ad9838@picasso.vet-alfort.fr>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fa931,6cbe7564656cc6d2
X-Google-Attributes: gidfa931,public
X-Google-ArrivalTime: 2001-08-07 05:51:14 PST
Newsgroups: aus.stats.s
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!news1.optus.net.au!optus!news.usyd.edu.au!news.nsw.CSIRO.AU!cmis.csiro.au!owner-s-news
From: ripley@stats.ox.ac.uk (Prof Brian Ripley)
Subject: Re: [S] Categorical covariate (for Cox's model)
X-Nntp-Posting-Host: snowy.nsw.cmis.csiro.au
Content-Type: TEXT/PLAIN; charset=US-ASCII
Message-ID: <Pine.LNX.4.31.0108071323200.9092-100000@gannet.stats>
X-Cc: <s-news@lists.biostat.wustl.edu>
Sender: majordomo@mailhost.nsw.cmis.CSIRO.AU
Organization: CSIRO Australia
X-In-Reply-To: <5.1.0.14.2.20010807135703.00ad9838@picasso.vet-alfort.fr>
X-X-Sender:  <ripley@gannet.stats>
X-Authentication-Warning: gannet.stats: ripley owned process doing -bs
References: <5.1.0.14.2.20010807135703.00ad9838@picasso.vet-alfort.fr>
X-To: Tristan Lorino <lorino@vet-alfort.fr>
Mime-Version: 1.0
Date: Tue, 7 Aug 2001 12:43:14 GMT
Content-Length: 1807
X-Precedence: bulk
X-Received: from localhost (ripley@localhost)
 by gannet.stats (8.11.3/8.11.3) with ESMTP id f77CSd009142;
 Tue, 7 Aug 2001 13:28:39 +0100
Lines: 48