Re: [R] help with probabilites in cph

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Fri, 13 May 2011 12:07:58 -0400

On May 13, 2011, at 10:49 AM, viostorm wrote:

> I would like to get the probabilities

.... of what?

> from cph into a vector so I can put
> them programatically on a graph.
>
> Does anyone know how to get a list of the probabilities?

require(rms)
?rms

Perhaps:

?Predict

Or

?survest

(You do need to read more about the rms/Hmisc system. It is an interdependent set of functions. For instance, you probably also need to set up a datadist and assign it to the datadist option. There are both plot and bplot methds for Predict objects. All this _is_ in the help pages.)

> All I can seem to
> do is $coef which only contains coefficients.
>
> ----------------------------
> cph(formula = srv.comb ~ collaterals + age)
>
> Model Tests Discrimination
> Indexes
>
> Obs 555 LR chi2 7.46 R2 0.014
> Events 136 d.f. 2 g 0.263
> Center -0.2202 Pr(> chi2) 0.0240 gr 1.301
> Score chi2 7.56
> Pr(> chi2) 0.0229
>
>
> Coef S.E. Wald Z Pr(>|Z|)
> collaterals 0.4531 0.1721 2.63 0.0085
> age -0.0067 0.0082 -0.82 0.4123
> ------------------------------

David Winsemius, MD
West Hartford, CT



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 13 May 2011 - 16:10:19 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 13 May 2011 - 16:40:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive