calc_min_precision: Calculate the mode value at minimum precision
Description
This function determines the mode of a variable `x`, filtered to entries with the minimum value of a specified precision vector `precision_var`.
It optionally resolves ties using one or two additional vectors for tie-breaking.