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

- 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:
-
None treat 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.
Examples
Basic Examples (2)Summary of the most common use cases

https://wolfram.com/xid/0gfokrwzwpme-i1novh
Fit the data, treating the second variable as a strata variable:

https://wolfram.com/xid/0gfokrwzwpme-eo2qfz

One stratum is created for each level in the data:

https://wolfram.com/xid/0gfokrwzwpme-c8m6vr


https://wolfram.com/xid/0gfokrwzwpme-jn6rqi

Fit a model with more than one strata variable:

https://wolfram.com/xid/0gfokrwzwpme-lv57yc

https://wolfram.com/xid/0gfokrwzwpme-gv2o34

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

https://wolfram.com/xid/0gfokrwzwpme-bnoe1n

Baseline survival rates for the strata:

https://wolfram.com/xid/0gfokrwzwpme-owrmz

Wolfram Research (2012), StrataVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/StrataVariables.html.
Text
Wolfram Research (2012), StrataVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/StrataVariables.html.
Wolfram Research (2012), StrataVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/StrataVariables.html.
CMS
Wolfram Language. 2012. "StrataVariables." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/StrataVariables.html.
Wolfram Language. 2012. "StrataVariables." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/StrataVariables.html.
APA
Wolfram Language. (2012). StrataVariables. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StrataVariables.html
Wolfram Language. (2012). StrataVariables. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StrataVariables.html
BibTeX
@misc{reference.wolfram_2025_stratavariables, author="Wolfram Research", title="{StrataVariables}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/StrataVariables.html}", note=[Accessed: 29-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_stratavariables, organization={Wolfram Research}, title={StrataVariables}, year={2012}, url={https://reference.wolfram.com/language/ref/StrataVariables.html}, note=[Accessed: 29-March-2025
]}