ImageVerifierCode 换一换
格式:DOCX , 页数:8 ,大小:24.99KB ,
资源ID:3285706      下载积分:12 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/3285706.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(利用逻辑斯回归分析.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

利用逻辑斯回归分析.docx

1、利用逻辑斯回归分析利用逻辑斯回归分析第12週講義 (12- 1 ) 利用邏輯斯迴歸分析 (Logistic Regression Analysis)作分類分析 Binary Response with one explanatory variable: :Response of the th sampling unit iYi= Y0or1i:predictor (explanatory variable) for the th sampling unit iXi,,xeP=P(Y =1| x) = x,,,x1,ePx,,,xloglogit P = = x1,Px,x若令P= P(Y =0

2、| x) ,則 logit P =。 xx,,xeP(y =1| x) =之圖形 ,,,x1,e,0,1,0,1 估計法:最大概似估計量或加權最小平方法。 對X=x有n個中c個反應變數為1。 iii:A:最大概似估計法 kn,n,ciciii,,概似函數 p1,p ,xx,iic1i,i,c,nci,,xiikin,e1,i, = ,,L,,,xx,iic1e1e,,1i,i, 找出使得以上之機率為最大。 :B:Weighted LSE (least square estimator) cciin,(1)np(1,p) c之Var(c)= 用 來估計 iiiixxiinnii1 給予權數:加權

3、數,加重數:。 Var ci第12週講義 (12- 2 ) Binary Response with several explanatory variables: 1,: the response of th individual, binary response i,YY,ii0,: p dim vector of covariate XX,(X,X,.,X)ii1i2ipiP,P(Y,1|X)iiiLogistic Regression model ,logitP,,X,.,X011iippiPlogitP,log1,P,,.,XX011ippie i.e.P,i,,,,.,,XX011i

4、ppi1,e,logitP(Y,1|X,r,1),logitP(Y,1|X,r)iiiiiP(Y,1|X,r,1)/P(Y,0|X,r,1)iiii,lnP(Y,1|X,r)/P(Y,0|X,r)iiii: log odds ratio corresponding to a unit change in predictor when all other are X,Xjiihold constants. ,2,G:H:,.,0(model0)p012,H:logitP,,X,.,Xiippi1011maxLikelihoodLH00LR,2logLR,2(logL,logL),,2logL,2

5、logLmm00maxLikelihoodLm,22G,2ln(LR)p故其值其值,以表示所選擇變數之相關重要性,2,D:(deviance)H:logitP,,X,.,Xpp0011H:saturatedmodel(models)1,2logLR,,2logL,2logLsm22,D,2ln(LR),np1故其值其值,表示fit好22G,D,2logL,2logLs0,H:logitP,0022,G,D,constant,之,2ln(LR) ,H:saturated1,第12週講義 (12- 3 ) Logistic Regression with One Continuous Covari

6、ate The SAS System 程式: The LOGISTIC Procedure options nodate nonotes; Data Set: WORK.P261 data p261; Response Variable (Events): C Response Profile input load n c;r=c/n; Response Variable (Trials): N Ordered Binary cards; Number of Observations: 10 Value Outcome Count 2500 50 10 Link Function: Logit

7、 1 EVENT 337 2700 70 17 2 NO EVENT 353 2900 100 30 Model Fitting Information and Testing 3100 60 21 Global Null Hypothesis BETA=0 3300 40 18 Intercept 3500 85 43 Intercept and 3700 90 54 Criterion Only Covariates Chi-Square for Covariates 3900 50 33 AIC 958.172 847.712 . 4100 80 60 SC 962.709 856.78

8、5 . 4300 65 51 -2 LOG L 956.172 843.712 112.460 with 1 DF (p=0.0001) ; Score . . 107.066 with 1 DF (p=0.0001) proc logistic; model c/n=load; Analysis of Maximum Likelihood Estimates output out=a Parameter Standard Wald Pr pred=pred; Variable DF Estimate Error Chi-Square Chi-Square run; INTERCPT 1 -5

9、.3397 0.5457 95.7500 0.0001 . . proc print; LOAD 1 0.00155 0.000158 96.6085 0.0001 run; Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits load 1.002 1.001 1.002 Association of Predicted Probabilities and Observed Responses Percent Concordant 68.0 Somers D 0.452 Percent Discordant

10、 22.9 Gamma 0.497 Percent Tied 9.1 Tau-a 0.226 Pairs 118961 c 0.726 Association of Predicted Probabilities and Observed Responses Concordant = 68.0% Somers D = 0.452 Discordant = 22.9% Gamma = 0.497 Tied = 9.1% Tau-a = 0.226 (118961 pairs) c = 0.726 OBS LOAD N C R PRED 1 2500 50 10 0.20000 0.18715 2

11、 2700 70 17 0.24286 0.23886 3 2900 100 30 0.30000 0.29959 4 3100 60 21 0.35000 0.36829 5 3300 40 18 0.45000 0.44278 6 3500 85 43 0.50588 0.51994 7 3700 90 54 0.60000 0.59616 8 3900 50 33 0.66000 0.66801 9 4100 80 60 0.75000 0.73280 10 4300 65 51 0.78462 0.78894 第12週講義 (12- 4 ) Logistic Regression wi

12、th Mixed Covariate Data crab; input color spine width satell weight; if satell0 then y=1; if satell=0 then y=0; n=1; weight = weight/1000; color=color-1; cards; 3 3 28.3 8 3050 4 3 22.5 0 1550 2 1 26.0 9 2300 . . 5 3 27.0 0 2625 3 2 24.5 0 2000 ; proc genmod; class color; model y/n = color width / d

13、ist=bin link=logit; proc logistic; model y = color weight width / selection=backward; run; PART OF OUTPUT: The GENMOD Procedure Model Information Data Set WORK.CRAB Distribution Binomial Link Function Logit Response Variable (Events) y Response Variable (Trials) n Observations Used 173 Number Of Eve

14、nts 111 Number Of Trials 173 Class Level Information Class Levels Values color 4 1 2 3 4 Criteria For Assessing Goodness Of Fit Criterion DF Value Value/DF Deviance 168 187.4570 1.1158 Scaled Deviance 168 187.4570 1.1158 Pearson Chi-Square 168 168.6590 1.0039 Scaled Pearson X2 168 168.6590 1.0039 Lo

15、g Likelihood -93.7285 Algorithm converged. Analysis Of Parameter Estimates Standard Wald 95% Confidence Chi- Parameter DF Estimate Error Limits Square Pr ChiSq Intercept 1 -12.7151 2.7618 -18.1281 -7.3021 21.20 .0001 color 1 1 1.3299 0.8525 -0.3410 3.0008 2.43 0.1188 color 2 1 1.4023 0.5484 0.3274 2

16、.4773 6.54 0.0106 color 3 1 1.1061 0.5921 -0.0543 2.2666 3.49 0.0617 color 4 0 0.0000 0.0000 0.0000 0.0000 . . width 1 0.4680 0.1055 0.2611 0.6748 19.66 ChiSq Likelihood Ratio 37.8336 3 .0001 Score 33.3887 3 .0001 Wald 27.8855 3 ChiSq Likelihood Ratio 36.6373 2 .0001 Score 32.7358 2 .0001 Wald 27.06

17、09 2 ChiSq 1.2031 1 0.2727 NOTE: No (additional) effects met the 0.05 significance level for removal from the model. Summary of Backward Elimination Effect Number Wald Step Removed DF In Chi-Square Pr ChiSq 1 weight 1 2 1.1778 0.2778 The LOGISTIC Procedure Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr ChiSq Intercept 1 10.0708 2.8069 12.8733 0.0003 color 1 0.5090 0.2237 5.1791 0.0229 width 1 -0.4583 0.1040 19.4129 .0001 Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits color 1.664 1.073 2.579 width 0.632 0.516 0.775

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1