[程式] STATA 資料處理指令

看板Statistics作者 (satanist)時間8年前 (2016/04/23 08:40), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串1/1
[軟體程式類別]: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://www.ptt.cc/bbs/Statistics/M.1461372015.A.656.html

04/23 12:51, , 1F
recode role (1/3=1 resident) (4=2 provider)
04/23 12:51, 1F

04/23 12:51, , 2F
(5/9=3 staff), generate(role2)
04/23 12:51, 2F
文章代碼(AID): #1N6iHlPM (Statistics)