[問題] Stata函數的問題

看板Statistics作者 (= ="frailty..gggg XD)時間17年前 (2008/11/10 21:40), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
我想寫個指令可以自動產生的residual,reg 像是reg y x,res(newvar) capture program drop autores program define autores syntax varlist,res(newvar) tokenize "`var1ist'" tempvar yhat local y `1' local x:list varlist-y local res :list newvar qui{ reg `y' `x' predict `yhat' gen `res'=`y'-`yhat' } end webuse auto autores price mpg weight,res(k1) 加入白色語法後就無法執行 請問若程式要設定res(newvar)的話,需要額外使用什麼語法呢? 謝謝^^" -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.86.139
文章代碼(AID): #1963ct5x (Statistics)