看板 R_Language 關於我們 聯絡資訊
大大好 如果我今天要檢定多組間發生率是否有無差異,使用prop.test()是正確的嘛? 自變項是性別加國籍, 依變項是發生率(十萬分之一為單位) 另,如何判斷發生率是否為稀有事件呢,我覺得我發生率好像蠻低,prop.test()較正要 用什麼語法呢? 謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.200.216.214 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1571729428.A.289.html
andrew43: 發生率應可回推發生次數與總次數,則考慮存在offset項的10/22 17:28
andrew43: poisson regression。10/22 17:29
andrew43: 其中自變數為國籍。之後國籍間的多重比較也不難寫。10/22 17:29
andrew43: 至於prob.test就只是個卡方同質檢驗,也是要使用次數而10/22 17:32
andrew43: 非發生率,這細節可看 ?prob.test10/22 17:34
andrew43: 若你只有發生率但沒有各國內的總次數,那可能沒檢驗可做10/22 17:35
謝謝 ※ 編輯: sodboy (1.200.216.214 臺灣), 10/22/2019 17:57:14
andrew43: 差不多。可額外考慮納入年份和性別,以及因子內多重比較10/22 18:16
※ 編輯: sodboy (1.200.216.214 臺灣), 10/23/2019 00:40:05 大大好 https://i.imgur.com/r9w8SEN.jpg
https://i.imgur.com/oQVIaUW.jpg
https://i.imgur.com/tEV9zCh.jpg
https://i.imgur.com/oHPZzRg.jpg
變異數大過平均值很多 發生次數畫出來也不像poisson分佈 還能使用poisson regression來分析嘛 還是須要換別種檢定呢 謝謝 ※ 編輯: sodboy (110.50.156.241 臺灣), 10/28/2019 12:13:21 ※ 編輯: sodboy (110.50.156.241 臺灣), 10/28/2019 12:14:05
andrew43: sandwich修正標準誤,或是負二項式迴歸。 10/30 01:08
andrew43: poisson regression之後有goodness-of-fit可以看看 10/30 01:08
andrew43: 例如Residual deviance對應其df的右尾卡方檢驗 10/30 01:10