GBJ_objective: GBJ_objective.R

Description Usage Arguments Value Examples

View source: R/GBJ_objective.R

Description

Calculates the GBJ objective function at given threshold points. Used both to calculate the observed GBJ statistic and also to find the boundary points for p-value calculation (through uniroot). Mostly for internal use.

Usage

1
GBJ_objective(t_vec, d, k_vec = NULL, pairwise_cors, offset = 0)

Arguments

t_vec

A scalar or vector of threshold points (magnitudes of test statistics) to calculate the objective at.

d

The total number of test statistics in the set.

k_vec

If t_vec is not a vector all of the test statistics, let us know which ordered objective functions we are calculating (can be a vector with the same length as t).

pairwise_cors

A vector of all d(d-1)/2 pairwise correlations between the test statistics, where d is total number of test statistics in the set.

offset

Used if we want to subtract the observed gbj value for uniroot.

Value

The GBJ objective at t (for given d, kkk, pairwise_cors) minus the offset

Examples

1
GBJ_objective(t_vec=1:5, d=5, k_vec=NULL, pairwise_cors=rep(0.2,10), offset=0)

GBJ documentation built on May 2, 2019, 2:39 a.m.