data_analysis: Emperical ranks probbaility of the test given the effect size

Description Usage Arguments Details Value Author(s) Examples

View source: R/data_analysis.R

Description

Emperical comnputation of the ranks probability of a test being higher than any other test given the effect size from the external information.

Usage

1
2
data_analysis(alpha, pvalue, filter, N_current = 1L, N_prior = 1L, tail,
  max.group, standarized = FALSE, effectType = c("continuous", "binary"))

Arguments

alpha

Nmeric, significance level of the hypothesis test

pvalue

a vector of pvalues of the test statistics

filter

a vector of filter statistics

N_current

Integer vector, number of observations per test in the current data

N_prior

Integer vector, number of observations per test in the prior data

tail

right-tailed or two-tailed hypothesis test. default is right-tailed test.

max.group

maximum number of groups to be used to split the p-values, default is five. Note that, it is better to keep approximately 1000 p-values per group.

standarized

Character of c("TRUE" or "FALSE") determine whether standarization is required. Default is FALSE means filter is a vector of zscore. Thus, standarization will not used.

effectType

Character of type ("binary" or"continuous") of effect sizes

Details

Perform data analysis for the different methods such as proposed, bonferroni, Benjamini and Hoghburgh, IHW, and Dorbibian methods.

Value

rejections A numeric vector of the number of rejected test of the different methods.

Author(s)

Mohamad S. Hasan, shakilmohamad7@gmail.com

Examples

1
2
3
4
5
6
7
8
9
# generating data (known in practice)
set.seed(123)
m = 10000
X = runif(m, min = 0, max = 2.5)               # covariate
H = rbinom(length(X), size = 1, prob = 0.1)   # hypothesis true or false
Z = rnorm(length(X), mean = H * X)            # Z-score
p = 1 - pnorm(Z)
rejections <- data_analysis(alpha = .1, pvalue = p, filter = X, N_current = m,
         N_prior = m, tail = 2, max.group = 10, effectType = "continuous")

mshasan/empOPW documentation built on March 1, 2021, 4:19 a.m.