[R] Adding factor variable to a CoxPH

Göran Broström gb at stat.umu.se
Sat Oct 9 10:34:12 CEST 2004


On Sat, Oct 09, 2004 at 09:03:23AM +0800, Neil Leonard wrote:
> I think this is a pretty basic statistic question:
> 
> If I have a variable which has 4 factors how can I add it to a coxph 
> model? I have other variables added which have digits 1-4 instead of 
> four factors. If I recode the variable will that work?

?factor
?as.factor

> 
> 
> Thanks
> Neil
> 
> ______________________________________________
> 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

-- 
 Göran Broström                    tel: +46 90 786 5223
 Department of Statistics          fax: +46 90 786 6614
 Umeå University                   http://www.stat.umu.se/egna/gb/
 SE-90187 Umeå, Sweden             e-mail: gb at stat.umu.se




More information about the R-help mailing list