看板 Statistics 關於我們 聯絡資訊
大家好 我今天用stata跑 probit 和 logit 的統計結果 居然跟用 reg 跑的樣本數是不一致的!! reg 有9千多的樣本數(與原樣本數一致) 而 probit 和 logit 都一樣跑出來只有8千多 想請問這是甚麼問題嗎? 也已經檢查過沒有missing value的問題 謝謝指教~~ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 218.173.61.240 ※ 文章網址: https://www.ptt.cc/bbs/Statistics/M.1429101661.A.6B3.html
KirinGuess: 用e(sample)標誌各個模型的樣本 再看是哪些被排除. 04/16 07:11
porfu: probit跟logit限制依變項必須是0或1。其他會被丟掉。 04/16 07:46
boboss: 請問e(sample)的sample是放甚麼特定變數嗎? 04/16 16:17
boboss: 因為我分別試了好多個變數結果STATA竟然都自動關閉了 04/16 16:18
boboss: profu:我剛檢查了,確定Y只有0和1 04/16 16:19
KirinGuess: reg DEP.V INDEP.Vs 04/17 00:38
KirinGuess: gen regsample=e(sample) 04/17 00:38
KirinGuess: logit DEP.V INDEP.V 04/17 00:39
KirinGuess: gen logitsample=e(sample) 04/17 00:39
KirinGuess: tab regsample logitsample, m 04/17 00:39
KirinGuess: 以上DEP.V和INDEP.Vs代入你的變數即可 04/17 00:40
boboss: 謝謝!我找出被排出的變數了 04/17 11:48