EVOLUTION-MANAGER
Edit File: strata.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: Identify Stratification Variables</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 strata {survival}"><tr><td>strata {survival}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Identify Stratification Variables </h2> <h3>Description</h3> <p>This is a special function used in the context of the Cox survival model. It identifies stratification variables when they appear on the right hand side of a formula. </p> <h3>Usage</h3> <pre> strata(..., na.group=FALSE, shortlabel, sep=', ') </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>any number of variables. All must be the same length. </p> </td></tr> <tr valign="top"><td><code>na.group</code></td> <td> <p>a logical variable, if <code>TRUE</code>, then missing values are treated as a distinct level of each variable. </p> </td></tr> <tr valign="top"><td><code>shortlabel</code></td> <td> <p>if <code>TRUE</code> omit variable names from resulting factor labels. The default action is to omit the names if all of the arguments are factors, and none of them was named.</p> </td></tr> <tr valign="top"><td><code>sep</code></td> <td> <p>the character used to separate groups, in the created label </p> </td></tr> </table> <h3>Details</h3> <p>When used outside of a <code>coxph</code> formula the result of the function is essentially identical to the <code>interaction</code> function, though the labels from <code>strata</code> are often more verbose. </p> <h3>Value</h3> <p>a new factor, whose levels are all possible combinations of the factors supplied as arguments. </p> <h3>See Also</h3> <p><code><a href="coxph.html">coxph</a></code>, <code><a href="../../base/html/interaction.html">interaction</a></code> </p> <h3>Examples</h3> <pre> a <- factor(rep(1:3,4), labels=c("low", "medium", "high")) b <- factor(rep(1:4,3)) levels(strata(b)) levels(strata(a,b,shortlabel=TRUE)) coxph(Surv(futime, fustat) ~ age + strata(rx), data=ovarian) </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>