transtor
各位大虾:
我在做有关非集计模型的毕业设计论文,数据处理想通过SPSS来实现,但是遇到了一些问题。麻烦给与解答,不胜感激!
1.定量变量与定性变量的处理:我使用的SPSS13.0版本,我感觉binary logistic和multinomial logistic对定性变量的处理方法有些不同:
(1)对于binary logistic回归,是否只需要把所有的自变量放入covariates框中即可?(同时,是否需要在categorical选项中,把分类变量放入categorical covariates框中呢?我看到有的书中把“性别”“职业”等变量放入到categorical covariates中了,而有的参考书中又没有这步操作,两者有区别吗?)
(2)对于multinomial logistic回归,是把定性变量进入factors,定量变量进入covariates即可吗?
2. 有下面一个例子:
病人性别和严重程度对疗效的影响分析.
性别sex 严重程度deg 疗效effect 病例数
(女=0,男=1) (不严重=0,严重=1) (有疗效=1,无疗效=0)
0 0 1 21
0 0 0 6
0 1 1 9
0 1 0 9
1 0 1 8
1 0 0 10
1 1 1 4
1 1 0 11
解析:显然是一个binary logistic回归问题,其中疗效是因变量,性别和严重程度是自变量,那么病例数该如何处理呢?
正确的结果如下,该如何得到呢?:
variables in the equation:
系数:constant(1.157)
sex(-1.277)
deg(-1.054)
以上两个问题,请不吝赐教,谢谢!
我的联系方式:
QQ:166501028
恭候您的消息!
seagul
Method1 Binary log.
Variables in the Equation
B S.E. Wald df Sig. Exp(B)
Step 1(a) sex(1) 1.277 .498 6.575 1 .010 3.586
deg(1) 1.054 .498 4.484 1 .034 2.871
Constant -1.175 .485 5.857 1 .016 .309
a Variable(s) entered on step 1: sex, deg.
Method2 Multinominal log.
Variables in the Equation
B S.E. Wald df Sig. Exp(B)
Step 1(a) sex(1) 1.277 .498 6.575 1 .010 3.586
deg(1) 1.054 .498 4.484 1 .034 2.871
Constant -1.175 .485 5.857 1 .016 .309
a Variable(s) entered on step 1: sex, deg.
其结果似乎没有不同,只是因为参考点不一样,在第2法中,last为默认参照点,故是负的。
transtor
[quote]引用第1楼seagul于2006-10-24 20:57发表的“”:
Method1 Binary log.
Variables in the Equation
B S.E. Wald df Sig. Exp(B)
Step 1(a) sex(1) 1.277 .498 6.575 1 .010 3.586
deg(1) 1.054 .498 4.484 1 .034 2.871
.......[/quote]
呵呵,谢谢解答,可是好像还有些不明白,可能是我没说明白吧
thx all the same!
transtor
自己给出第二个问题的解答
在analyze之前,对数据weight即可。
data--weight cases
然后
analyze--regression
然后可以得到正解!
anita_jiu
[quote]引用第3楼transtor于2006-10-24 21:17发表的“自己回答自己的第二个问题!”:
自己给出第二个问题的解答
在analyze之前,对数据weight即可。
data--weight cases
然后
.......[/quote]
我在想,为什么你要给weight cases??
anita_jiu
Also, the three types of data you listed above (e.g. sex, seriousness, and effect) are categorical data (very similar to the scale of 'yes and no'). Why do you need to weight them in the regression analysis??
transtor
[quote]引用第5楼anita_jiu于2006-10-24 22:49发表的“”:
Also, the three types of data you listed above (e.g. sex, seriousness, and effect) are categorical data (very similar to the scale of 'yes and no'). Why do you need to weight them in the regression analysis??[/quote]
呵呵,这个很容易想到阿,如果不weight,两种同样的情形会导致同样的结果。
例如:
0 0 1 21
0 0 0 6
所以肯定要weight by n!
yanminyin
学习学习,呵呵
dagga
频数表资料一定要对频数进行加权!
linda8866
在analyze之前,对数据weight,是处理有关频数数据的有用的方法。在没有原始数据或者已经得到频数分布数据的时候,对数据weight之后,就可以进行许多进一步的统计分析了。个人观点,请提意见。
dagga
great
greenpine
(1)二分类变量和多分类变量处理方法有所不同,多分类要设哑变量,二分类的变量默认和设置哑变量的区别是结果选择的标准不同,楼主可以操作比较一下。
(2)回归之前应该要加权吧
以上是个人意见,希望大家多批评指正!
fly2121
是可以加权啊
laigeogu
今天又學會了一些些~謝謝!