[程式] STATA關於local的使用

看板Statistics作者 (我要吃好料)時間8年前 (2016/05/27 12:53), 編輯推噓1(104)
留言5則, 3人參與, 最新討論串1/1
想請問一下,關於萬用字元,?和*在STATA的用法。 現在我有一堆變數,x1, x2,...,x50 如果要將它們全部設定在local裡面,code要如何寫? 我試過 local myvarlist x? 和 local myvarlist x* 兩者都不行,請問版上高手有人知道code要怎麼寫嗎? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 108.183.89.115 ※ 文章網址: https://www.ptt.cc/bbs/Statistics/M.1464324800.A.75B.html

05/27 23:03, , 1F
local x myvarlist; regress y 'x'
05/27 23:03, 1F

05/30 11:55, , 2F
lookfor x
05/30 11:55, 2F

05/30 11:55, , 3F
local myvarlist `r(varlist)'
05/30 11:55, 3F

05/30 11:57, , 4F
也可按裝findname的指令。輸入findit findname
05/30 11:57, 4F

06/03 11:52, , 5F
謝樓上二位解答,我來試試~~
06/03 11:52, 5F
文章代碼(AID): #1NHzB0TR (Statistics)