[R] How to extract z value from coxph

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Aug 4 19:55:03 CEST 2004


Thomas Lumley <tlumley at u.washington.edu> writes:

> > to build a linear classification model. Although the function outputs
> > the z value, but I can't access to it, so that I can write code to
> > extract them automatically and pass them to the next function. Can
> > someone help?
> >
> 
> Use the accessor functions:
> 
> z <- coef(model)/sqrt(diag(vcov(model)))
> 
> as for most regression models.

However (and sorry if I sound like a broken record) it would be nice
if summary.coxph, instead of just using cat(), returned an object ...
as most other regression models do.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list