Description Usage Arguments Value Author(s) See Also Examples
km
calculates the Kaplan-Meier estimates for survival.
To plot the survivor curve, use plot()
; for the empirical
intensity curve, use plot.intensity()
; for diagnostic curves to
choose a distribution to which the data might belong, use plot.dist()
.
1 2 3 4 5 6 7 8 | km(times, censor, group=1, freq=1, cdf=FALSE)
## S3 method for class 'km'
plot(x, add=FALSE, xlim=NULL, ylim=c(0,1),
main=NULL, xlab="Time", ylab=NULL, lty=NULL, ...)
## S3 method for class 'km'
plot.intensity(x, add=FALSE, xlab="Time", ylab="Hazard", type="l", lty=NULL, ...)
## S3 method for class 'km'
plot.dist(x, ...)
|
times |
Vector of times to events or a list of vectors of such times for different individuals. |
censor |
Vector of censoring indicators corresponding to the vector of times or to the last time in each vector of a list. |
group |
Vector indicating to which group each individual belongs. |
freq |
Vector of frequencies for grouped data. |
cdf |
If TRUE, calculate the cdf instead of the survivor curve. |
x |
An object produced by |
add |
Plotting control options. |
main |
Plotting control options. |
type |
Plotting control options. |
ylab |
Plotting control options. |
xlab |
Plotting control options. |
xlim |
Plotting control options. |
ylim |
Plotting control options. |
lty |
Plotting control options. |
... |
Plotting control options. |
A matrix with class, km
, containing the Kaplan-Meier estimates
is returned.
J.K. Lindsey
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.