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:

Wolfram Research (2012), StrataVariables, Wolfram Language function,


Wolfram Research (2012), StrataVariables, Wolfram Language function,


Wolfram Language. 2012. "StrataVariables." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2012). StrataVariables. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_stratavariables, author="Wolfram Research", title="{StrataVariables}", year="2012", howpublished="\url{}", note=[Accessed: 16-July-2024 ]}


@online{reference.wolfram_2024_stratavariables, organization={Wolfram Research}, title={StrataVariables}, year={2012}, url={}, note=[Accessed: 16-July-2024 ]}