perform: Perform a two-stage procedure

View source: R/perform.R

performR Documentation

Perform a two-stage procedure

Description

Perform a two-stage procedure

Usage

perform(data, filt_test, base_pval, base_thrl, base_thrl_adj_method, ...)

Arguments

data

A tibble. Consists of raw observations, which may be manipulated to construct filtration and base test statistics.

filt_test

An expression, that its evaluation, with data as an environment, produces a logical vector of length 1 or data's number of rows. A TRUE value correspond to an hypothesis that passes the filtration test, i.e., is NOT filtered (filtration test rejected).

base_pval

An expression, that its evaluation, with data as an environment, produces a numeric vector of length 1 or data's number of rows. A p-value for the base test.

base_thrl

An expression, that its evaluation, with data as an environment, produces a numeric vector of length 1 or data's number of rows. A threshold, functioning as a reject region for the base test.

base_thrl_adj_method

A function of 1 argument. Used to adjust the thresholds of the base test, considering only unfiltered hypotheses.

...

data's variables to group by.

Value

data, with additional columns:

  • filt_test, base_pval, base_thrl: Evaluation results of the corresponding parameter values.

  • base_thrl_adj: Adjusted thresholds for the base test; the result of base_thrl_adj_method on the unfiltered thresholds in base_thrl.

  • final_result: logical, indicating for each hypothesis whether both the filtration test and the base test of it are rejected (TRUE) or not (FALSE).


yotamleibovici/twostageshrink documentation built on Sept. 15, 2022, 7:30 p.m.