Ensures the input to the statistical function is in the proper format, and enruse the output is formated to the need of the AMNOG workflow.
Usage
p_val(
dat,
event_index,
cell_index,
treatment_var,
treatment_refval,
subjectid_var,
safe_mode = FALSE,
threshold_lower = 5,
threshold_upper = 200,
...
)
Arguments
- dat
data.table. The analysis data set.
- event_index
vector of integers that index the rows in
dat
that match the definition of an 'event'. Matching is done via theINDEX_
column indat
.- cell_index
A vector of integers referencing the rows of
dat
(as specified by theINDEX_
column indat
) that match the population to be analyzed. See the "Endpoint Events" vignette in ramnog for more information.- treatment_var
character. The name of the treatment variable in the data.
- treatment_refval
character. The reference value of the treatment variable in the data.
- subjectid_var
character. Name of the subject identifier variable in the data (default is "USUBJID").
- safe_mode
Boolean determing if the function should fail when given input that cannot be calculated (
safe_mode = TRUE
), or if it should silently return aNA
value (default).- threshold_lower
numeric. Lower threshold limit for selecting Fischer vs. Barnard.
- threshold_upper
numeric. Upper threshold limit for selecting Fischer vs. Barnard.
- ...
Optional parameters.