作者askpeople (就是要問!!!)
看板R_Language
標題[問題] 請問Z檢定的power計算方式?
時間Fri Aug 27 11:42:06 2021
問題: 我想計算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://webptt.com/m.aspx?n=bbs/R_Language/M.1630035728.A.327.html
1F:→ locka: 既然都有查help了 說明裡不是有說…… [If n is provided, 08/27 12:45
2F:→ locka: then power is calculated. Conversely, if one provides p 08/27 12:45
3F:→ locka: ower, but not n, then the required n is calculated.] 08/27 12:45
4F:→ locka: btw 如果是非原生R的函式,請於內文中補充該函式使用套件的 08/27 12:46
5F:→ locka: 資訊 08/27 12:46
6F:→ askpeople: 不好意思 我敘述沒看懂,想問說effect是什麼呢? 08/27 13:37
7F:→ askpeople: effect: The effect size? 指的是什麼呢? 08/27 13:38
8F:→ locka: 直接翻譯的話:效果量,詳細定義請查 Cohen's d 08/27 14:45
9F:→ askpeople: 剛剛跑了一下有了解: 我給n可算power 給power 可算n 08/27 15:11
10F:→ askpeople: 差不多是這個意思嗎? 08/27 15:12
11F:→ Gjerry: 這個 function 可以用來做兩件事情。一、做完實驗算z tes 08/28 13:28
12F:→ Gjerry: t 的power,二、計算如果z test要得到預計power,會需要 08/28 13:28
13F:→ Gjerry: 多少樣本。其實後者是比較有用。 08/28 13:28