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.
The GBJ objective at t (for given d, kkk, pairwise_cors) minus the offset
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.