is an option for fitting functions such as CoxModelFit that specify the variables on which the model should be stratified.


  • Strata variables are used to divide a non-homogeneous population into homogeneous subgroups. Stratification is often useful in proportional hazards modeling where the assumption of proportional hazards between subgroups may be suspect.
  • Possible settings for StrataVariables include:
  • Nonetreat no variables as strata
    {v1,v2,}treat the variables vi as strata
  • Models with a strata variable v with p levels {s1,,sp} effectively group the input data into p groups corresponding to the si.
  • With multiple strata variables v1, , vk with pvi levels, the input data is grouped into at most pvi groups, dropping empty subgroups.


Basic Examples  (2)

Define some data:

Fit the data, treating the second variable as a strata variable:

One stratum is created for each level in the data:

A parameter summary table:

Fit a model with more than one strata variable:

All non-empty combinations of the strata variables are used:

Baseline survival rates for the strata:

Introduced in 2012