Re: [問題] logistic regression model
※ 引述《forever0322 (水藍色)》之銘言:
想請問SAS logistic regression model
跑出來的beta0和beaa1值和我用minitab和SPSS差正負號
檢查蠻久也是找不出來
PROC IMPORT OUT= book1 /*this is the name of the data set*/
DATAFILE= "I:\123\book1.xls" /*this is where you saved your excel data file*/
DBMS=EXCEL REPLACE;
SHEET="sheet1"; /*sheet1 is the excel files sheet name*/
GETNAMES=yes; /*yes means the first row of the data is the variables names*/
RUN;
proc LOGISTIC ;
MODEL Y = X ;
run;
這是SAS的程式碼
我這樣KEY有錯嘛?
麻煩是否可以給我指正
拜託大家了
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.135.139.143
推
05/28 21:47,
05/28 21:47
推
05/28 21:48,
05/28 21:48
→
05/28 21:48,
05/28 21:48
→
05/28 21:52,
05/28 21:52
→
05/28 21:55,
05/28 21:55
→
05/28 21:56,
05/28 21:56
→
05/28 21:56,
05/28 21:56
→
05/28 21:57,
05/28 21:57
推
05/28 21:59,
05/28 21:59
→
05/28 21:59,
05/28 21:59
→
05/28 22:06,
05/28 22:06
推
05/28 22:07,
05/28 22:07
→
05/28 22:08,
05/28 22:08
→
05/28 22:10,
05/28 22:10
→
05/28 22:16,
05/28 22:16
用回的好了
你用同樣的資料跑兩種code
1. proc logistic;
order=internal;
model Y=X;
run;
2. proc logistic;
order=internal desc;
model Y=X;
run;
這兩個應該會跑出剛好相反的beta值
第一個是fit P(Y=0|X)
第二個是fit P(Y=1|X)
看看那個是你要的吧
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.230.72.191
討論串 (同標題文章)