悬赏 10 个论坛币 未解决
各位高手,我需要做一个条件logit分析,比如,因变量是一个多分类选项(10个类别),自变量是edu,age,gender,原始的数据格式是:
caseid selection age edu gender
1 3 23 3 0
2 4 43 3 1
3 1 37 4 1
如何转化成
caseid selection selection1 selection2 selection3 selection4 ~~~selection10 choice age gender edu
1 1 1 0 0 0 0 0 23 3 0
1 2 0 1 0 0 0 0 23 3 0
1 3 0 0 1 0 0 1 23 3 0
1 4 0 0 0 1 0 0 23 3 0
#
#
1 10 0 0 0 0 1 0 23 3 0
实在感激不尽,请各位高手指点!!!!!