Stata:如何将数值视为CEM中的分类值?
在我的数据中,我有一个收入水平的变量,分别是1,2,3,4,5,6,7,8,9。我想知道是否直接将这个变量放入imb
或 cem
而不按照手册中所示重新编码,算法会将 is 视为数值还是分类值?
或者我应该像这样重新编码吗?
recode income (1 = 1 "1") (2 = 2 "2") (3 = 3 "3") (4 = 4 "4") (5 = 5 "5") (6 = 6 "6") (7 = 7 "7") (8 = 8 "8") (9 = 9 "9"), gen(income_recode)
我想对数据集的分类变量应用精确匹配。
In my data, I have a variable of income level, which is 1,2,3,4,5,6,7, 8, and 9. I am wondering if I directly put this variable in imb
or cem
without recoding as illustrated in the manual, will the algorithm treat is as numerical value or categorical value?
Or shall I do recoding like this
recode income (1 = 1 "1") (2 = 2 "2") (3 = 3 "3") (4 = 4 "4") (5 = 5 "5") (6 = 6 "6") (7 = 7 "7") (8 = 8 "8") (9 = 9 "9"), gen(income_recode)
I would like to apply exact match on categorical variable for my dataset.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论