It's possible that df_sorted has every value greater than p_threshold in the ForBack functions. In that case, the if statement at the end of the backwards regression never gets run and df_sorted_final never gets set (https://github.com/smith478/ModelTools/blob/master/ModelTools.py#L1108), and this causes an error when we try to use df_sorted_final later.
It's possible that df_sorted has every value greater than p_threshold in the ForBack functions. In that case, the if statement at the end of the backwards regression never gets run and df_sorted_final never gets set (https://github.com/smith478/ModelTools/blob/master/ModelTools.py#L1108), and this causes an error when we try to use df_sorted_final later.