作者Satanist (satanist)
看板Statistics
标题[程式] STATA 资料处理指令
时间Sat Apr 23 08:40:12 2016
[软体程式类别]:STATA
[程式问题]:资料处理
[软体熟悉度]:
新手
[问题叙述]:
我在做STATA的应用练习,然後卡在
Create a new variable called role2, that collapses the 3 resident
categories from the variable role into a single attribute (label this
attribute as resident), keep provider as an attribute (label this attribute
as provider), and collapse the remaining categories into a single attribute
(label this attribute as staff).
[程式范例]:
role
1 = 1st year resident
2 = 2nd year resident
3 = 3rd year resident
4 = provider (MD, DO, PA-C, NP)
5 = clinical pharmacist
6 = nurse
7 = MA
8 = staff
9 = other
我的理解是要把role里面的数值1,2,3变成role2里面的数值1 ,
然後label上 resident
但是我不知道comment 要怎麽写,或是操作功能
如果有需要补上的资料我再补充
谢谢大家的帮忙
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 155.97.233.215
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Statistics/M.1461372015.A.656.html
1F:推 riirene: recode role (1/3=1 resident) (4=2 provider) 04/23 12:51
2F:→ riirene: (5/9=3 staff), generate(role2) 04/23 12:51