Generates a random splitting of the groups
Usage
get_best_splitting(
df_long,
nb_conditions,
exp_unit = "mouse",
x = "days_after_treatment",
y = "log10tf",
block_factor = NULL,
max_iter = 100,
rule_splitting_fun = rule_splitting,
alpha = 0.5,
initial_seed = 123
)
Arguments
- df_long
Long dataframe containing the values that will be used to calculate the slopes
- nb_conditions
An integer indicating the number of conditions that will be used for the randomization, usually corresponds to the number of treatments, including control.
- exp_unit
A string indicating which column from df_long to group the values. Default is "mouse".
- x
A string indicating the time column. Default is "days_after_treatment"
- y
A string indicating which column the values are to regress from. Default is "log10tf".
- block_factor
A string. Default is NULL. A string indicating the name of the dataframe's column to block the randomization.
- max_iter
An integer specifying the number of iterations to run the randomization procedure. Default is 100.
- rule_splitting_fun
A function that defines the rule to either update or not the splitting.
- alpha
A double defining how fast the temperature goes to 0. Default is 0.5. The closer alpha is to 0 , the faster the temperature goes to 0.
- initial_seed
An integer that is used to ensure the starting randomization is reproducible.