Last updated: 2019-08-28

Checks: 2 0

Knit directory: stats-topics/

This reproducible R Markdown analysis was created with workflowr (version 1.4.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    analysis/.RData
    Ignored:    analysis/.Rhistory

Untracked files:
    Untracked:  .gitlab-ci.yml

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the R Markdown and HTML files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view them.

File Version Author Date Message
html 2fbc26b Zhengyang Fang 2019-08-28 Build site.
Rmd 8472d87 Zhengyang Fang 2019-08-28 wflow_publish(c(dir()))
html 7e21654 Zhengyang Fang 2019-06-19 update
html f1a0d4e Zhengyang Fang 2019-06-16 update .docs
html dbb41cc Zhengyang Fang 2019-06-16 start
Rmd ffc3849 Zhengyang Fang 2019-06-16 start

Topic I. Hypothesis testings

General idea

Assuming:

  • Null hypothesis is fixed (not data dependent)
  • Can compute valid p-values for testing each null, and the function mapping to p-value is fixed in advance.

Formulation of Multiple testing problem:

  • There are a list of null hypothesis \(H_{o1},H_{o2},\dots,H_{on}\), and the p-values for each hypothesis are \(p_1,p_2,\dots,p_n\).

  • A Testing procedure is a function mapping \(\{p_1,\dots,p_n\}\) to a subset of \(\{1,2,\dots,n\}\) (discoveries/rejections).

Possible goals to control false positives:

  1. FamilyWise Error Rate (FWER): Bound Pr(Any false discoveries)

  2. Bound Pr(More than …% false discoveries)

  3. Bound Pr(Number of false discoveries)

  4. Bound Pr(Proportion of false discoveries(FDP) )

  5. Bound Pr (False discoveries rate (FDR) )

1, 4, 5 are more common (they have abbreviation!)


Question 1. Global null hypothesis

  • Goal: test \(H_{o,global}=\) all n nulls are true \((=\bigcap_{i=1,2,\dots,n}H_{oi})\).

Notice: if \(H_{o,global}\) is true, then every \(P_i\sim unif(0,1)\) (but may not be independent)

Method 1. Bonferroni correction

Statistic \(= \min\{p_1,p_2,\dots,p_n\}.\)

Reject if \(\min_i \{p_i\}\leq c\), where \(c = \frac \alpha n\), \(\alpha\) is the level of test.

Proof (upperbound of type_I error): \(\mathbb P(\min_i p_i\leq c)\leq \sum_i\mathbb P(p_i\leq c)=nc\), using the property \(\mathbb P(A\cup B)\leq \mathbb P(A)+\mathbb P(B)\).

Very conservative: the bound in the proof is hard to reach.

Method 2. Fisher’s test

Statistic \[F = -2\sum_i \log(p_i).\]

Under \(H_o,global\), \(p_i\sim unif (0,1)\), if additionally \(p_i\)’s are independent, then \(F\sim \chi_{2n}^2\).

Reject if \(F\geq (1-\alpha)\) -quantile of \(\chi^2_{2n}\).

3. Simes test:

  • Reject \(H_{o,global}\) if:

    • At least 1 \(p_i\leq\frac\alpha n\)
    • and/or at least 2 \(p_i\leq\frac{2\alpha} n\)
    • \(\vdots\)
    • and/or at least n \(p_i\leq\frac{n\alpha} n\)
  • Theorem: Under \(H_{o,global}\), if \(p_i\)’s are independent. Then \(\mathbb P\)(Simes rejects at level \(\alpha\))\(=\alpha\).