EVOLUTION-MANAGER
Edit File: plot.cox.zph.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Graphical Test of Proportional Hazards</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for plot.cox.zph {survival}"><tr><td>plot.cox.zph {survival}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Graphical Test of Proportional Hazards </h2> <h3>Description</h3> <p>Displays a graph of the scaled Schoenfeld residuals, along with a smooth curve. </p> <h3>Usage</h3> <pre> ## S3 method for class 'cox.zph' plot(x, resid=TRUE, se=TRUE, df=4, nsmo=40, var, xlab="Time", ylab, lty=1:2, col=1, lwd=1, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>result of the <code>cox.zph</code> function. </p> </td></tr> <tr valign="top"><td><code>resid</code></td> <td> <p>a logical value, if <code>TRUE</code> the residuals are included on the plot, as well as the smooth fit. </p> </td></tr> <tr valign="top"><td><code>se</code></td> <td> <p>a logical value, if <code>TRUE</code>, confidence bands at two standard errors will be added. </p> </td></tr> <tr valign="top"><td><code>df</code></td> <td> <p>the degrees of freedom for the fitted natural spline, <code>df=2</code> leads to a linear fit. </p> </td></tr> <tr valign="top"><td><code>nsmo</code></td> <td> <p>number of points to use for the lines</p> </td></tr> <tr valign="top"><td><code>var</code></td> <td> <p>the set of variables for which plots are desired. By default, plots are produced in turn for each variable of a model. Selection of a single variable allows other features to be added to the plot, e.g., a horizontal line at zero or a main title. </p> <p>This has been superseded by a subscripting method; see the example below. </p> </td></tr> <tr valign="top"><td><code>xlab</code></td> <td> <p>label for the x-axis of the plot</p> </td></tr> <tr valign="top"><td><code>ylab</code></td> <td> <p>optional label for the y-axis of the plot. If missing a default label is provided. This can be a vector of labels.</p> </td></tr> <tr valign="top"><td><code>lty, col, lwd</code></td> <td> <p>line type, color, and line width for the overlaid curve. Each of these can be vector of length 2, in which case the second element is used for the confidence interval.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional graphical arguments passed to the <code>plot</code> function. </p> </td></tr> </table> <h3>Side Effects</h3> <p>a plot is produced on the current graphics device. </p> <h3>See Also</h3> <p><code><a href="coxph.html">coxph</a></code>, <code><a href="cox.zph.html">cox.zph</a></code>. </p> <h3>Examples</h3> <pre> vfit <- coxph(Surv(time,status) ~ trt + factor(celltype) + karno + age, data=veteran, x=TRUE) temp <- cox.zph(vfit) plot(temp, var=5) # Look at Karnofsy score, old way of doing plot plot(temp[5]) # New way with subscripting abline(0, 0, lty=3) # Add the linear fit as well abline(lm(temp$y[,5] ~ temp$x)$coefficients, lty=4, col=3) title(main="VA Lung Study") </pre> <hr /><div style="text-align: center;">[Package <em>survival</em> version 2.44-1.1 <a href="00Index.html">Index</a>]</div> </body></html>