The function takes the data and splits it into roughly equal chunks to be sent to the workers for parallel processing. The function takes care to not split the same individual across multiple workers.
split_data(db, str_id, cores)
tibble() containing the data
A character string giving the name of the id variable
An integer indicating the number of cores to use in estimation
A list of data.frames with length equal to the number of cores to use in estimation
Note that the function will only split the data correctly if all respondents have the same number of rows. Therefore, it is important that this function is called after the data has been padded with NAs in case of unequal number of choice tasks.