如何在SAS中对逻辑回归进行似然比检验?
我想使用 SAS 在逻辑回归中执行标准似然比检验。我将有一个完整的逻辑模型,包含所有变量,名为 A 和嵌套逻辑模型 B,该模型是通过从 A 中删除一个变量而派生的。
如果我想测试该删除变量是否显着,我将执行模型 A 和 B 的似然比检验。是否有一种简单的方法可以使用 PROC 在 SAS 中执行此检验(本质上是卡方检验)?非常感谢您的帮助。
I want to perform the standard likelihood ratio test in logsitic regression using SAS. I will have a full logistic model, containing all variables, named A and a nested logistic model B, which is derived by dropping out one variable from A.
If I want to test whether that drop out variable is significant or not, I shall perform a likelihood ratio test of model A and B. Is there an easy way to perform this test (essentially a chi-square test) in SAS using a PROC? Thank you very much for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果要执行完整模型与单变量丢弃模型的似然比检验,可以使用带有 type3 选项的 GENMOD 过程。
脚本:
输出:
If you want to perform likelihood ratio tests that are full model v.s. one variable dropped model, you can use the GENMOD procedure with the type3 option.
Script:
Output:
我不确定是否有专门执行 LRT 的 PROC 语句,但您可以计算嵌套模型的测试。
脚本
I'm not sure about a PROC statement that can specifically perform LRT but you can compute the test for nested models.
Script
我不是逻辑回归方面的专家,但我认为您想要完成的事情可以通过 PROC LOGISTIC 来完成,使用 MODEL 语句上的“SELECTION=SCORE”选项。还有其他可用的选择选项,例如 STEPWISE,但我认为 SCORE 与您要查找的内容最匹配。不过,我建议您仔细阅读它,因为有一些相关的选项(BEST=、START= STOP=)您也可能会从中受益。
I'm no expert on logistic regression, but I think what you are trying to accomplish can be done with PROC LOGISTIC, using the "SELECTION=SCORE" option on the MODEL statement. There are other SELECTION options available, such as STEPWISE, but I think SCORE matches closest to what you are looking for. I would suggest reading up on it though, because there are some associated options (BEST=, START= STOP=) that you might benefit from too.