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



雷达卡




京公网安备 11010802022788号







