Skip to content
Back to formatted view

Raw Message

Message-ID: <426EB369.9040900@well.ox.ac.uk>
Date: 2005-04-26T21:32:25Z
From: Richard Mott
Subject: survreg with numerical covariates

Does anyone know if the survreg function in the survival package can fit 
numerical covariates ?

When I fit a survival model of the form

survreg( Surv(time,censored) ~ x )

then x is always treated as a factor even if it is numeric (and even if 
I try to force it to be numeric using as.numeric(x). Thus, in the 
particular example I am analysing, a simple numerical covariate becomes 
a factor with 190 levels. Is this the expected behaviour ? Am I doing 
something wrong ?

I am running R 2.0.1 on a 64bit Debian Linux system, and version 2.17 of 
the survival package


Thanks

Richard Mott

-- 
----------------------------------------------------
Richard Mott       | Wellcome Trust Centre
tel 01865 287588   | for Human Genetics
fax 01865 287697   | Roosevelt Drive, Oxford OX3 7BN