资源预览内容
第1页 / 共13页
第2页 / 共13页
第3页 / 共13页
第4页 / 共13页
第5页 / 共13页
第6页 / 共13页
第7页 / 共13页
第8页 / 共13页
第9页 / 共13页
第10页 / 共13页
亲,该文档总共13页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
使用条件:使用条件: 应变量应变量 Y 是一个二值变量,取值为是一个二值变量,取值为 0 和和 1 自变量自变量 X1,X2,Xm。 P 表示在表示在 m 个自变量作用下事件发生的概率。个自变量作用下事件发生的概率。图像:图像:程序:程序: data ceshi; input x1-x18 y; cards; ; 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 100 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 显示显示 R2Scale, SCALE= specifies method to correct overdispersion,指定参数,指定参数,=n 表示不表示不 需要修正。需要修正。 Aggregate 计算卡方检验统计量计算卡方检验统计量Class 语句将分类变量化成虚拟变量,三种药用两个虚拟变量表示。语句将分类变量化成虚拟变量,三种药用两个虚拟变量表示。The LOGISTIC Procedure Model Information Data Set WORK.EX12_1 Response Variable response Number of Response Levels 2 Frequency Variable count Model binary logit Optimization Technique Fishers scoringNumber of Observations Read 12 Number of Observations Used 12 Sum of Frequencies Read 577 Sum of Frequencies Used 577Response Profile Ordered Total Value response Frequency1 1 315 2 0 262Probability modeled is response=1.Class Level Information Design Class Value Variables drug 2 1 0 1 0 1 0 0 0Model Convergence Status Convergence criterion (GCONV=1E-8) satisfied.Deviance and Pearson Goodness-of-Fit Statistics Criterion Value DF Value/DF Pr ChiSq Deviance 0.3749 2 0.1874 0.8291 Pearson 0.3689 2 0.1844 0.8316 模型拟合集优度检验,模型拟合集优度检验,Number of unique profiles: 6 Model Fit StatisticsInterceptIntercept and Criterion Only Covariates AIC 797.017 641.326 SC 801.375 658.757 -2 Log L 795.017 633.326R-Square 0.2444 Max-rescaled R-Square 0.3268The LOGISTIC Procedure Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr ChiSq Likelihood Ratio 161.6907 3 ChiSq drug 2 95.0859 ChiSq Intercept 1 -1.9594 0.2229 77.2441 ChiSqLikelihood Ratio 11.6428 2 0.0030Score 15.1091 2 0.0005Wald 13.0315 2 0.0015 模型检验模型检验 似然比检验(似然比检验(likelihood ratiotest) 、计分检验、计分检验(score test)、Wald 检验检验(Wald test)三种三种Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr ChiSq Intercept 1 -5.5592 1.1197 24.6503 ChiSqLikelihood Ratio 12.7026 3 0.0053Score 10.4135 3 0.0154Wald 6.5331 3 0.0884Analysis of Maximum Likelihood EstimatesStandard Wald Parameter DF Estimate Error Chi-Square Pr ChiSqIntercept 1 3.6547 2.0911 3.0545 0.0805 X1 1 -0.0822 0.0521 2.4853 0.1149 X2 1 -0.00152 0.00187 0.6613 0.4161 X3 1 2.5016 1.1578 4.6689 0.0307The LOGISTIC ProcedureOdds Ratio EstimatesPoint 95% WaldEffect Estimate Confidence LimitsX1 0.921 0.832 1.020X2
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号