Re: [程式] stata資料按照大小排序後,分成三等分

看板Statistics作者 (阿罵)時間11年前 (2015/02/25 09:48), 11年前編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
xtile是STATA分等份數的語法 xtile 新等份變數 = 變數, nquantiles(n) 像如果你要把age分三等份 xtile turtile_age = age, nquantilse(3) 想看他們三組的平均數就用 mean age if turtile_age==1或 mean age if turtile_age==2或 mean age if turtile_age==3 hope this helps. ※ 引述《ryh5645 (香魚)》之銘言: : [軟體程式類別]:stata : [軟體熟悉度]:半年 : [問題敘述]:先將資料按照大小排序,在分成三等分,第一等分設變數1,第二等分設 : 變數2,第三等分設變數三 : ----------------------------------------------------------------------------- -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 128.196.43.84 ※ 文章網址: https://www.ptt.cc/bbs/Statistics/M.1424828907.A.801.html ※ 編輯: sacidoO (128.196.43.84), 02/25/2015 09:48:48
文章代碼(AID): #1KxIdhW1 (Statistics)
文章代碼(AID): #1KxIdhW1 (Statistics)