bstrap_sample: resamples a rank column in a dataframe based on groups

View source: R/functions.R

bstrap_sampleR Documentation

resamples a rank column in a dataframe based on groups

Description

bstrap_sample performs a single iteration of bootstrapping of a rank column in a data frame. The rows matching control in the quoted quo_group_col column are removed. The remaining rows are grouped by quo_group_col and in each group the rank column is resampled with replacement and the mean rank of the resampling for each group is returned

Usage

bstrap_sample(iteration, quo_score_col, quo_group_col, df, control = "A")

Arguments

iteration

integer giving the current bootstrap iteration from the calling function

quo_score_col

quoted column name containing the HR scores

quo_group_col

quoted group name containing the group name of the observation

df

input data frame

control

character naming the control group that will be removed prior to bootstrapping


besthr documentation built on April 14, 2023, 9:11 a.m.