powered by
Binary Cut-Off Transformation
binary_cutoff(name, int_cutoff, ext_cutoff)
Transformation function to be used in create_baseline_object(). Sets quantile values larger than cut-off value to TRUE otherwise FALSE.
create_baseline_object()
TRUE
FALSE
variable to transform
cut-off for internal patients, numeric between 0 and 1
cut-off for external patients, numeric between 0 and 1
# Creates a simple function, where `data` is a `BaselineDataFrame`: function(data) { ext <- data$ext == 0 q <- get_quantiles(data, name) ifelse(ext, q > int_cutoff, q > ext_cutoff) }
Run the code above in your browser using DataLab