estimate.cd: Estimates c_d for controlling Type I error rate under the...

Description Usage Arguments Value Examples

View source: R/AFNC.R

Description

estimate.cd empirically estimates c_d to control the Type I error rate under the global null hypothesis that no signals exist. In this algorithm, M number of Monte Carlo samples, drawn under the global null hypothesis of no signals, are used to estimate c_d. The estimate of c_d is pre-computed in estimate.cd and passed to AFNC.

Usage

1
estimate.cd(d, M = 10000, alpha = 0.05)

Arguments

d

number of variables (SNPs).

M

number of Monte Carlo samples. The larger the M the more accurate the estimate.

alpha

significance level for false positive control.

Value

Estimate of c_d for controlling Type I error rate under the global null, to be used as an input in AFNC.

Examples

1
2
3
4
5
6
# Load "AFNC" library and example data.
library("AFNC")
data(example_data)

set.seed(1)  # Set seed
cd = estimate.cd(d=length(p.value), M=10000, alpha=0.05)  # estimate c_d

zjdaye/AFNC documentation built on May 4, 2019, 11:23 p.m.