Dear profs.,

Please, I would like to know how to perform a grid search in order to find an optimal value for a threshold—for example, the threshold value to choose for the inflation rate in an asymmetric model. 

Thanks.