请选择 进入手机版 | 继续访问电脑版
楼主: moonstone
11169 2

[学习分享] SAS 中proc phreg 的by和strata的用法区别 [推广有奖]

讲师

74%

还不是VIP/贵宾

-

威望
0
论坛币
10435 个
通用积分
335.3455
学术水平
160 点
热心指数
169 点
信用等级
124 点
经验
262166 点
帖子
237
精华
1
在线时间
519 小时
注册时间
2007-4-27
最后登录
2024-2-1

moonstone 发表于 2015-11-25 08:28:15 |显示全部楼层 |坛友微信交流群

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
很多人可能会混淆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
二维码

扫码加我 拉你入群

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

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

关键词:phreg PHR REG ROC observations

已有 1 人评分经验 收起 理由
eijuhz + 40 精彩帖子

总评分: 经验 + 40   查看全部评分

弈剑风雨 学生认证  发表于 2015-11-25 18:32:16 |显示全部楼层 |坛友微信交流群
楼主这个帖子好!最近刚好要用

使用道具

gougou11 发表于 2018-1-31 10:36:35 |显示全部楼层 |坛友微信交流群
哈哈,老黄,好帖,正好用上。

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-3-29 14:34