EVOLUTION-MANAGER
Edit File: 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: Test the Proportional Hazards Assumption of a Cox Regression</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 cox.zph {survival}"><tr><td>cox.zph {survival}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Test the Proportional Hazards Assumption of a Cox Regression </h2> <h3>Description</h3> <p>Test the proportional hazards assumption for a Cox regression model fit (<code>coxph</code>). </p> <h3>Usage</h3> <pre> cox.zph(fit, transform="km", global=TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>fit</code></td> <td> <p>the result of fitting a Cox regression model, using the <code>coxph</code> function. </p> </td></tr> <tr valign="top"><td><code>transform</code></td> <td> <p>a character string specifying how the survival times should be transformed before the test is performed. Possible values are <code>"km"</code>, <code>"rank"</code>, <code>"identity"</code> or a function of one argument. </p> </td></tr> <tr valign="top"><td><code>global</code></td> <td> <p>should a global chi-square test be done, in addition to the per-variable tests. </p> </td></tr> </table> <h3>Value</h3> <p>an object of class <code>"cox.zph"</code>, with components: </p> <table summary="R valueblock"> <tr valign="top"><td><code>table</code></td> <td> <p>a matrix with one row for each variable, and optionally a last row for the global test. Columns of the matrix contain the correlation coefficient between transformed survival time and the scaled Schoenfeld residuals, a chi-square, and the two-sided p-value. For the global test there is no appropriate correlation, so an NA is entered into the matrix as a placeholder. </p> </td></tr> <tr valign="top"><td><code>x</code></td> <td> <p>the transformed time axis. </p> </td></tr> <tr valign="top"><td><code>y</code></td> <td> <p>the matrix of scaled Schoenfeld residuals. There will be one column per variable and one row per event. The row labels contain the original event times (for the identity transform, these will be the same as <code>x</code>). </p> </td></tr> <tr valign="top"><td><code>call</code></td> <td> <p>the calling sequence for the routine. </p> <p>The computations require the original <code>x</code> matrix of the Cox model fit. Thus it saves time if the <code>x=TRUE</code> option is used in <code>coxph</code>. This function would usually be followed by both a plot and a print of the result. The plot gives an estimate of the time-dependent coefficient <code>beta(t)</code>. If the proportional hazards assumption is true, <code>beta(t)</code> will be a horizontal line. The printout gives a test for <code>slope=0</code>. </p> </td></tr> </table> <h3>References</h3> <p>P. Grambsch and T. Therneau (1994), Proportional hazards tests and diagnostics based on weighted residuals. <em>Biometrika,</em> <b>81</b>, 515-26. </p> <h3>See Also</h3> <p><code><a href="coxph.html">coxph</a></code>, <code><a href="Surv.html">Surv</a></code>. </p> <h3>Examples</h3> <pre> fit <- coxph(Surv(futime, fustat) ~ age + ecog.ps, data=ovarian) temp <- cox.zph(fit) print(temp) # display the results plot(temp) # plot curves </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>