很多人可能会混淆SAS 中proc phreg 过程的by和strata的用法,通常会认为strata是用于构建分层分析,但实际是by用于构建分层COX回归,而strata用于构建条件COX回归,或者更通俗一点是构建匹配的COX回归。也即是如果研究设计时并没有考虑年龄、性别等匹配,分析的时候想得到年龄、性别匹配后的COX回归结果,可以采用strata选项。产生这种误解与proc phreg过程的strata声明有一点关系。
proc phreg 中的by和strata的用法声明分别如下:
BY Statement
BY variables ;
You can specify a BY statement with PROC PHREG to obtain separate analyses on observations in groups defined by the BY variables. When a BY statement appears, the procedure expects the input data set to be sorted in order of the BY variables. The variables are one or more variables in the input data set.
STRATA Statement
STRATA variable <( list )> < ...variable <( list )>> < /option> ;
The proportional hazards assumption might not be realistic for all data. If so, it might still be reasonable to perform a stratified analysis. The STRATA statement names the variables that determine the stratification. Strata are formed according to the nonmissing values of the STRATA variables unless the MISSING option is specified. In the STRATA statement, variable is a variable with values that are used to determine the strata levels, and list is an optional list of values for a numeric variable. Multiple variables can appear in the STRATA statement.
strata的这个声明很容易让人理解strata选项就是用于做 stratified analysis的,具体SAS帮助提供的范例有很好的参考价值:
Example 64.5 Conditional Logistic Regression for m:n Matching
http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_phreg_sect036.htm