作者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/m.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