看板 R_Language 關於我們 聯絡資訊
問題: 我想計算Z檢定的power值,查指令發現: 可以使用power.z.test,但是我去R的help看 範例程式碼如下: power.z.test(sigma=6,effect=5,power=.9,test="one.tail") 既然都要輸入power了 需要算什麼呢? 重點想問的是: 我想計算的power是: 例如平均數mu = 20,sigma平方已知 = 5,顯著水準=0.05之下 (單尾檢定: H0:mu=20 H1: mu>20 ) 能夠計算power的函數,在R上怎麼輸入 有人可以幫忙嗎? 拜託一下 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.194.172.28 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1630035728.A.327.html
locka: 既然都有查help了 說明裡不是有說…… [If n is provided, 08/27 12:45
locka: then power is calculated. Conversely, if one provides p 08/27 12:45
locka: ower, but not n, then the required n is calculated.] 08/27 12:45
locka: btw 如果是非原生R的函式,請於內文中補充該函式使用套件的 08/27 12:46
locka: 資訊 08/27 12:46
askpeople: 不好意思 我敘述沒看懂,想問說effect是什麼呢? 08/27 13:37
askpeople: effect: The effect size? 指的是什麼呢? 08/27 13:38
locka: 直接翻譯的話:效果量,詳細定義請查 Cohen's d 08/27 14:45
askpeople: 剛剛跑了一下有了解: 我給n可算power 給power 可算n 08/27 15:11
askpeople: 差不多是這個意思嗎? 08/27 15:12
Gjerry: 這個 function 可以用來做兩件事情。一、做完實驗算z tes 08/28 13:28
Gjerry: t 的power,二、計算如果z test要得到預計power,會需要 08/28 13:28
Gjerry: 多少樣本。其實後者是比較有用。 08/28 13:28