[問題] SAS問題

看板Statistics作者 (sammiya)時間17年前 (2008/12/24 11:24), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串2/2 (看更多)
想要請問:) 程式:SAS 假設我現在有 7個變數(X1-X7) 我用了backward、forward、stepwise三個方法, 最終選出來的變數只有X1跟X2 但因為X4的相關係數也很大, 但沒有被選出來, 所以必須做log轉換, 那請問一下,程式該如何改過? 原本程式: data price; input y x1-x7; label y="price" x1="c.c" x2="year" x3="type" x4="miles" x5="number of door" x6= "the place of production" x7="sky window"; cards; (數據資料); proc corr plots=scatter; var y x1 x2 x3 x4 x5 x6 x7; proc reg data=price; model y=x1 x2 {x3} x4 x5 {x6} {x7}/selection=backward slstay=0.15; model y=x1 x2 {x3} x4 x5 {x6} {x7}/selection=forward slentry=0.15; model y=x1 x2 {x3} x4 x5 {x6} {x7}/selection=stepwise; run; quit; 謝謝厲害的人跟幫忙回答的人!!!:) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.170.93.2

12/24 12:43, , 1F
x4=log(x4);
12/24 12:43, 1F

12/24 13:42, , 2F
謝謝你!!!但是還是跑不出來><
12/24 13:42, 2F
文章代碼(AID): #19KQjwRe (Statistics)
討論串 (同標題文章)
文章代碼(AID): #19KQjwRe (Statistics)