棄却域と標本サイズ
小さいデータセットと大きいデータセットのランダム化分布を使って、有意判定のための異なるカットオフを計算します。昇進率の差が大きく正であることに関心があるので、0.90、0.95、0.99 の上側分位点を計算します。
これらの分位点を計算する関数 calc_upper_quantiles() はスクリプトに用意されています。
この演習はコースの一部です
Rによる推測の基礎
演習の手順
- まず基準として、元の 1000 個の置換差からなるデータセット
disc_permに対して、calc_upper_quantiles()を呼び出して対象の分位点を計算します。 - 同様に小さいデータセット
disc_perm_smallに対しても行います… - そして大きいデータセット
disc_perm_bigに対しても行います。
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
calc_upper_quantiles <- function(dataset) {
dataset %>%
summarize(
q.90 = quantile(stat, p = 0.90),
q.95 = quantile(stat, p = 0.95),
q.99 = quantile(stat, p = 0.99)
)
}
# Recall the quantiles associated with the original dataset
calc_upper_quantiles(disc_perm)
# Calculate the quantiles associated with the small dataset
___
# Calculate the quantiles associated with the big dataset
___