[R] Survival dummy variables and some questions

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jul 18 16:46:44 CEST 2005


This is almost unreadable.

On Mon, 18 Jul 2005, Stephen wrote:

> Hi 1. To clarify: There is a posting saying that dummy regression using
> the coxph function is not possible... That posting may be outdated....

Clarification needs

1) an explanation of what you mean by `dummy regression' and

2) a link to the URL of that posting in the archives.

I would normally use RSiteSearch for the latter, but it is temporarily 
unavailable.

> 2. Q. You say 'Make sure that eventbefore is a "pre time zero"
> measurement' please explain: Do you mean that if someone who is not left
> censored and has no eventbefore then their value is zero? So John is in
> my study from 1978 to 1992 and has no events prior to 1980 then John's
> eventbefore is 0 prior to 1980. 3. .... just kidding... Thanks S -----
> Original Message ----- From: "Frank E Harrell Jr" To: "Stephen" Cc:
> Sent: Monday, July 18, 2005 2:46 PM Subject: Re: [R] Survival dummy
> variables and some questions > Stephen wrote: >> Hi All, >> >> I am
> currently conducting some survival analyses. I would like to >> extract
> coefficients at each level of the IVs. I read on a previous >> posting
> that dummy regression using coxph was not >> possible. > > I'm not sure
> what that means. > >> >> Therefore I though, hey why not categorize the
> variables (I realize some >> folks object to categorization but the
> paper I am >> replicating appears to have done so ...) > > The fact that
> some people murder doesn't mean we should copy them. And > murdering
> data, though not as serious, should also be avoided. > > Make sure that
> eventbefore is a "pre time zero" measurement. > > Frank > >> >> and turn
> the variables into factors and then try the analysis. >> >> E.g.,
> Dataset <- read.table("categ.dat", header=TRUE) >> >>
> Dataset$eventbefore2c <- factor(Dataset$eventbefore) >> >> .. other IVs
> here >> >> ... >> >> surv.mod1 <- coxph(Surv(start, stop, event) ~ sex2
> + ageonset2c + >> eventbefore2c + daysbefore2c, data=Dataset) >> >>
> Strangely enough, I receive a warning message when the variables are >>
> treated in this way: X matrix deemed to be singular; variable 11 in: >>
> coxph(Surv(start, stop, event) ~ sex2 + ageonset2c + eventbefore2c + I
>>> don't receive any warnings just treating the variables in their >>
> initial continuous format. >> >> I am currently using version >> >>
> platform i386-pc-mingw32 >> >> arch i386 os mingw32 system i386, mingw32
>>> status major 2 minor 1.1 >> year 2005 month 06 day 20 >> language R
> Is this approach to dummy variable using coxph erroneous? >> >> Is there
> another way to conduct dummy variable regression with coxph? >> >> Also,
> if I include frailty (id) does anyone know of a useful way to >>
> investigate frailty? >> >> If one were to plot recurrent events does
> anyone know of a way of >> interpreting them? >> >> References & code
> appreciated. >> >> BTW. not too familiar with R, less so with survival
> analysis .... but >> well worth the effort. >> >> Many thanks in
> advance... >> >> Regards >> >> Stephen >> >> >> ???? ?"? ???? ???? >>
> http://mail.nana.co.il >> >> [[alternative HTML version deleted]] >> >>
>>>>>
> ------------------------------------------------------------------------
>>>>> ______________________________________________ >>
> 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 > > > -- >
> Frank E Harrell Jr Professor and Chair School of Medicine > Department
> of Biostatistics Vanderbilt University >
>
> ???? ?"? ???? ????
> http://mail.nana.co.il
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> 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
>

-- 
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




More information about the R-help mailing list