# strata

From survival v2.9-6
by Thomas Lumley

##### Identify Strata Variables

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.

- Keywords
- survival

##### Usage

`strata(..., na.group=F, shortlabel=F)`

##### Arguments

- ...
- any number of variables. All must be the same length.
- na.group
- a logical variable, if
`TRUE`

, then missing values are treated as a distinct level of each variable. - shortlabel
- if
`TRUE`

omit variable names from resulting factor labels

##### Details

The result is identical to the `interaction`

function,
but for the labeling of the factors (`strata`

is more verbose).

##### Value

- a new factor, whose levels are all possible combinations of the factors supplied as arguments.

##### See Also

##### Examples

```
a<-factor(rep(1:3,4))
b<-factor(rep(1:4,3))
levels(strata(a))
levels(strata(a,b,shortlabel=TRUE))
data(ovarian)
coxph(Surv(futime, fustat) ~ age + strata(rx), data=ovarian)
```

*Documentation reproduced from package survival, version 2.9-6, License: GPL2*

### Community examples

Looks like there are no examples yet.