SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 689|回复: 4
打印 上一主题 下一主题

一个简单的逻辑回归问题请求高手指点

[复制链接]

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
楼主
 楼主| 发表于 2010-2-23 09:58:50 | 只看该作者

一个简单的逻辑回归问题请求高手指点

问题是这样的:A retailer of hand-held organizers wants to relate the ownership of the devices with annual income of the purchaser. Data is collected on 20 people and can be found in the file Palmorg.xls . The data includes ownership of a handheld is indicated by y=1 and purchaser annual income x.一个手持设备零售商想分析顾客收入和是否持有设备之间的关系,采集了20个顾客样本,数据中包括两个变量:持有设备用y=1表示,没有则是y=0;还有顾客的年收入income

如果我不将收入分类,直接run出来的结果是income的相关性不高的,但是我又不知该如何分类。我试过按收入区间20000-30000,30000-40000这样分类,但结果还是不行。的确样本量太小了,但如果非要计算,该如何做呢?在此求助了!!谢谢!!


数据:         
   
purchaser Ownership income
1 0 36300
2 0 31200
3 0 56500
4 1 4170
5 1 60200
6 0 32400
7 0 35000
8 0 29200
9 1 56700
10 0 82000
11 1 42400
12 0 30600
13 0 41400
14 0 28300
15 1 47500
16 0 35700
17 0 32100
18 1 79600
19 1 40200
20 0 53100

我直接run出来结果如下:
The LOGISTIC Procedure

                                        Model Information

                   Data Set                      _PROJ_.PALMORG               
                   Response Variable             Ownership            Ownership
                   Number of Response Levels     2                             
                   Number of Observations        20                           
                   Model                         binary logit                  
                   Optimization Technique        Fisher's scoring              


                                         Response Profile
  
                                Ordered                       Total
                                  Value     Ownership     Frequency

                                      1            1              7
                                      2            0             13

                               Probability modeled is Ownership=1.


                                     Model Convergence Status

                          Convergence criterion (GCONV=1E-8) satisfied.         


                                       Model Fit Statistics
  
                                                           Intercept
                                            Intercept            and
                              Criterion          Only     Covariates

                              AIC              27.898         29.193
                              SC               28.894         31.184
                              -2 Log L         25.898         25.193


                             Testing Global Null Hypothesis: BETA=0
  
                     Test                 Chi-Square       DF     Pr > ChiSq

                     Likelihood Ratio         0.7051        1         0.4011
                     Score                    0.7045        1         0.4013
                     Wald                     0.6778        1         0.4104


                            Analysis of Maximum Likelihood Estimates
  
                                              Standard          Wald
               Parameter    DF    Estimate       Error    Chi-Square    Pr > ChiSq

               Intercept     1     -1.6008      1.3041        1.5068        0.2196
               income        1    0.000022    0.000027        0.6778        0.4104
1                                                           17:47 Saturday, February 15, 2003   2

                                      The LOGISTIC Procedure

                                       Odds Ratio Estimates
                                                
                                         Point          95% Wald
                            Effect    Estimate      Confidence Limits

                            income       1.000       1.000       1.000


                  Association of Predicted Probabilities and Observed Responses

                        Percent Concordant     70.3    Somers' D    0.418
                        Percent Discordant     28.6    Gamma        0.422
                        Percent Tied            1.1    Tau-a        0.200
                        Pairs                    91    c            0.709
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
沙发
 楼主| 发表于 2010-2-23 11:01:53 | 只看该作者

Re: 一个简单的逻辑回归问题请求高手指点

4和10
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
板凳
 楼主| 发表于 2010-2-23 11:50:25 | 只看该作者

Re: 一个简单的逻辑回归问题请求高手指点

正点。 这两有点出格了
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
地板
 楼主| 发表于 2010-2-23 12:09:38 | 只看该作者

Re: 一个简单的逻辑回归问题请求高手指点

呵呵,样本量太小了,不具有典型性。我把收入分两类:高和低,以40000为界划分。高 y=1,低 y=0.这样run出来结果就很明显了
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
5#
 楼主| 发表于 2010-2-23 22:10:07 | 只看该作者

Re: 一个简单的逻辑回归问题请求高手指点

结果明显不见得是合理的。其实用这样的方法来寻找分类的点,就是典型的p-value导向的‘欺骗’方法,许多人这么干,或许手段比你更隐蔽,但是不科学。按你的方法,小于40000的或者大于40000的必须要斜率无变化,即两个不同高度的水平线。不知你的是否满足这个条件?
鉴于你的问题属于genderalized linear model, 你可以尝试用proc genmod 来检测的这个连续变量的functional form以决定简单的线性是否充分。另外许多人在提gam, 我没有实践,你不妨试一试。

纯粹个人想法。
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|小黑屋|手机版|Archiver|SAS中文论坛  

GMT+8, 2026-2-6 09:53 , Processed in 0.090931 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表