全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学
6179 13
2010-02-21
有这样一个案例:调查一个公司雇佣员工是否存在性别歧视,收集了28个求职者的数据,其中包含雇佣(y=1)或未雇佣(y=0);受高等教育的时间,工作经验时间,和性别(male=1,female=0)。数据在附件
discrim.xls
大小:(15 KB)

 马上下载

我用SAS9.0中的分析家(analyst),逻辑回归,得出的结果如下:    其中,性别的系数为-2.8526,意味着当性别为1,受雇佣机会更小,明显与数据中反映出的情况不符(男性明显受雇的几率大),我反复运算都是如此,请教各位高手这是为什么!!感激不尽!!
1                                                           

                                      The LOGISTIC Procedure

                                        Model Information

                     Data Set                      _PROJ_.DISCRIM            
                     Response Variable             hired                hired
                     Number of Response Levels     2                        
                     Number of Observations        28                        
                     Model                         binary logit              
                     Optimization Technique        Fisher's scoring         


                                         Response Profile

                                Ordered                      Total
                                  Value        hired     Frequency

                                      1            1             9
                                      2            0            19

                                 Probability modeled is hired=1.


                                     Class Level Information

                                                        Design
                                  Class     Value     Variables

                                  sex       0                 1
                                            1                -1


                                     Model Convergence Status

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


                                       Model Fit Statistics

                                                           Intercept
                                            Intercept            and
                              Criterion          Only     Covariates

                              AIC              37.165         21.915
                              SC               38.497         27.244
                              -2 Log L         35.165         13.915


                             Testing Global Null Hypothesis: BETA=0

                     Test                 Chi-Square       DF     Pr > ChiSq

                     Likelihood Ratio        21.2493        3         <.0001
                     Score                   15.6824        3         0.0013
                     Wald                     5.5996        3         0.1328
1                                                           17:47 Saturday, February 15, 2003   2

                                      The LOGISTIC Procedure

                                    Type 3 Analysis of Effects

                                                      Wald
                          Effect          DF    Chi-Square    Pr > ChiSq

                          education        1        3.8720        0.0491
                          experience       1        4.5207        0.0335
                          sex              1        4.9405        0.0262


                             Analysis of Maximum Likelihood Estimates

                                                Standard          Wald
              Parameter       DF    Estimate       Error    Chi-Square    Pr > ChiSq

              Intercept        1    -11.1897      4.8002        5.4339        0.0197
              education        1      1.1540      0.5865        3.8720        0.0491
              experience       1      0.8777      0.4128        4.5207        0.0335
              sex        0     1     -2.8526      1.2834        4.9405        0.0262


                                      Odds Ratio Estimates

                                              Point          95% Wald
                      Effect               Estimate      Confidence Limits

                      education               3.171       1.005      10.008
                      experience              2.405       1.071       5.402
                      sex        0 vs 1       0.003      <0.001       0.509


                  Association of Predicted Probabilities and Observed Responses

                        Percent Concordant     94.2    Somers' D    0.883
                        Percent Discordant      5.8    Gamma        0.883
                        Percent Tied            0.0    Tau-a        0.399
                        Pairs                   171    c            0.942

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-2-22 02:49:21
frankling 发表于 2010-2-21 21:21
有这样一个案例:调查一个公司雇佣员工是否存在性别歧视,收集了28个求职者的数据,其中包含雇佣(y=1)或未雇佣(y=0);受高等教育的时间,工作经验时间,和性别(male=1,female=0)。数据在附件。我用SAS9.0中的分析家(analyst),逻辑回归,得出的结果如下:    其中,性别的系数为-2.8526,意味着当性别为1,受雇佣机会更小,明显与数据中反映出的情况不符(男性明显受雇的几率大),我反复运算都是如此,请教各位高手这是为什么!!感激不尽!!
1                                                           

                                      The LOGISTIC Procedure

                                        Model Information

                     Data Set                      _PROJ_.DISCRIM            
                     Response Variable             hired                hired
                     Number of Response Levels     2                        
                     Number of Observations        28                        
                     Model                         binary logit              
                     Optimization Technique        Fisher's scoring         


                                         Response Profile

                                Ordered                      Total
                                  Value        hired     Frequency

                                      1            1             9
                                      2            0            19

                                 Probability modeled is hired=1.


                                     Class Level Information

                                                        Design
                                  Class     Value     Variables

                                  sex       0                 1
                                            1                -1


                                     Model Convergence Status

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


                                       Model Fit Statistics

                                                           Intercept
                                            Intercept            and
                              Criterion          Only     Covariates

                              AIC              37.165         21.915
                              SC               38.497         27.244
                              -2 Log L         35.165         13.915


                             Testing Global Null Hypothesis: BETA=0

                     Test                 Chi-Square       DF     Pr > ChiSq

                     Likelihood Ratio        21.2493        3          ChiSq

                          education        1        3.8720        0.0491
                          experience       1        4.5207        0.0335
                          sex              1        4.9405        0.0262


                             Analysis of Maximum Likelihood Estimates

                                                Standard          Wald
              Parameter       DF    Estimate       Error    Chi-Square    Pr > ChiSq

              Intercept        1    -11.1897      4.8002        5.4339        0.0197
              education        1      1.1540      0.5865        3.8720        0.0491
              experience       1      0.8777      0.4128        4.5207        0.0335
              sex        0     1     -2.8526      1.2834        4.9405        0.0262


                                      Odds Ratio Estimates

                                              Point          95% Wald
                      Effect               Estimate      Confidence Limits

                      education               3.171       1.005      10.008
                      experience              2.405       1.071       5.402
                      sex        0 vs 1       0.003
The design matrix is

                                    Class Level Information

                                                        Design
                                  Class     Value     Variables

                                  sex       0                 1
                                            1                -1


The result  "
sex        0     1     -2.8526      1.2834        4.9405        0.0262" should refer to an "average sex level".

Here (sex=0 / female) coef does have negative scores.

What I like to use,

First about syntax, please

class sex/ param=glm;

Before model statement, these will give you the contrast level between sex=0 and sex=1.

Note All slope coefs will be the same in both
design matrix also the regression statistics. But the constant term will be different, the explaination will be slight different.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-2-22 02:55:26
frankling 发表于 2010-2-21 21:21
有这样一个案例:调查一个公司雇佣员工是否存在性别歧视,收集了28个求职者的数据,其中包含雇佣(y=1)或未雇佣(y=0);受高等教育的时间,工作经验时间,和性别(male=1,female=0)。数据在附件。我用SAS9.0中的分析家(analyst),逻辑回归,得出的结果如下:    其中,性别的系数为-2.8526,意味着当性别为1,受雇佣机会更小,明显与数据中反映出的情况不符(男性明显受雇的几率大),我反复运算都是如此,请教各位高手这是为什么!!感激不尽!!
1                                                           

                                      The LOGISTIC Procedure

                                        Model Information

                     Data Set                      _PROJ_.DISCRIM            
                     Response Variable             hired                hired
                     Number of Response Levels     2                        
                     Number of Observations        28                        
                     Model                         binary logit              
                     Optimization Technique        Fisher's scoring         


                                         Response Profile

                                Ordered                      Total
                                  Value        hired     Frequency

                                      1            1             9
                                      2            0            19

                                 Probability modeled is hired=1.


                                     Class Level Information

                                                        Design
                                  Class     Value     Variables

                                  sex       0                 1
                                            1                -1


                                     Model Convergence Status

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


                                       Model Fit Statistics

                                                           Intercept
                                            Intercept            and
                              Criterion          Only     Covariates

                              AIC              37.165         21.915
                              SC               38.497         27.244
                              -2 Log L         35.165         13.915


                             Testing Global Null Hypothesis: BETA=0

                     Test                 Chi-Square       DF     Pr > ChiSq

                     Likelihood Ratio        21.2493        3          ChiSq

                          education        1        3.8720        0.0491
                          experience       1        4.5207        0.0335
                          sex              1        4.9405        0.0262


                             Analysis of Maximum Likelihood Estimates

                                                Standard          Wald
              Parameter       DF    Estimate       Error    Chi-Square    Pr > ChiSq

              Intercept        1    -11.1897      4.8002        5.4339        0.0197
              education        1      1.1540      0.5865        3.8720        0.0491
              experience       1      0.8777      0.4128        4.5207        0.0335
              sex        0     1     -2.8526      1.2834        4.9405        0.0262


                                      Odds Ratio Estimates

                                              Point          95% Wald
                      Effect               Estimate      Confidence Limits

                      education               3.171       1.005      10.008
                      experience              2.405       1.071       5.402
                      sex        0 vs 1       0.003
Your sample size(28) is really small in the logistics regression sense. If you can provide a much larger sample result and more detail analysis in the sense of more control variables. That will be a insteresting topic.

That is an separated issue.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-2-22 09:03:35
确实 样本数量实在太小了 很难做出好的结果
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-2-22 10:47:18
Thank you, Bobguy!!
I' m new learner of SAS. I don't quite understand about  "average sex level" in your reply.
What should I do to get the right result of  "sex" ?   Would you please tell me the right way using Analyst or the complete command syntax?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-2-22 11:24:26
frankling 发表于 2010-2-22 10:47
Thank you, Bobguy!!
I' m new learner of SAS. I don't quite understand about  "average sex level" in your reply.
What should I do to get the right result of  "sex" ?   Would you please tell me the right way using Analyst or the complete command syntax?
I believe it will be ,

proc logistic data=_PROJ_.DISCRIM;
class  sex /param=glm;
model hired (event='1') =  education experience sex ;
run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群