文档详情

LOGISTIC回归及SAS程序(很全哦).doc

发布:2016-05-23约字共13页下载文档
文本预览下载声明
使用条件: 应变量Y是一个二值变量,取值为0和1 自变量X1,X2,……,Xm。 P表示在m个自变量作用下事件发生的概率。 图像: 程序: data ceshi; input x1-x18 y; cards; 厖 t; proc logistic des; model y=x1-x18/selection=stepwise; run; 例: 三种药物drug取值0-2, 病情程度degree 分重-轻两类(0-1);因变量response为治疗效果的效与无效(1-0) Data ex12_1; Input drug degree response count; Datalines; 0 1 1 38 0 1 0 64 0 0 1 10 0 0 0 82 1 1 1 95 1 1 0 18 1 0 1 50 1 0 0 35 2 1 1 88 2 1 0 26 2 0 1 34 2 0 0 37 ; Proc logistic data=ex12_1 descending; Freq count; Class drug/param=ref descending; Model response=drug degree/rsq scale=n aggregate; Run; Rsq显示R2 Scale SCALE= speci?es method to correct overdispersion,指定参数,=n表示不需要修正。 Aggregate计算卡方检验统计量 Class 语句将分类变量化成虚拟变量,三种药用两
显示全部
相似文档