全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
12520 2
2015-11-25
很多人可能会混淆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
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-11-25 18:32:16
楼主这个帖子好!最近刚好要用
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-1-31 10:36:35
哈哈,老黄,好帖,正好用上。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群