country/sector (for investments) or country/product (for trade) pair is scored against the panel of country/sector or product pairs where investment or trade success is observed. The intuition behind this being that investment and trade success reveal the conditions under which they become possible, and therefore a good policy strategy would be to try to meet _at minima_ similar conditions to hope for a similar outcome. The results are presented on a simple Excel spreadsheet that allows to read an assessment of the country performance on each of the variables selected by the model.

There are different ways to build a benchmark. A simple way, as was done for the CBT, would be for each variable and each sector (product) to observe where a country ranks relative to successful peers. One way to do this would be to use quantiles defined according to performance (from worst to best) and score each country’s performance in a variable/sector (product) according to which quantile it would fall into. Another method would be to use an indexing measure such as the Distance to Frontier score (a normalized measure of the percentage of the best score) such as used in the Doing Business rankings to see how far a country is from the best practice. Thus, it would become possible to assess for each sector how a country fares along each variable relative to countries with successful outcomes.

These methods, however, would only use the model for the selection of the significant variables but leave aside the information that the model produces on the effect of each variable score on the likelihood of investment and RCA success. We therefore take an approach which utilizes the model insights to calculate benchmarks. Our goal is to produce categorical scores (from 1: worse to 5: best) for each indicator previously selected by the model and relative to which each country’s performance on this indicator can be benchmarked. To construct scores, we must define four thresholds which map the entire universe of values for each indicator into the five defined categories (bins). Once the thresholds _W_<sup>_p_</sup> are defined, they are transformed back to the original units of measurements for each variable.

The scores are obtained using the concept of accumulated local effects (ALE, Apley and Zhu, 2019). Based on the estimates from the econometric model, ALE provides a measure of the impact of the variable (evaluated at any point) on the probability of success (receiving FDI or having RCA) once the effects of all other variables are integrated out. For each variable, we simulate a large number of realizations (2,000) and for each of them compute the respected accumulated local effect. We then need to map the set of simulated effects on the success probability (ALE) into five scores (bins). Akin to credit risk scores, the goal is to produce the scores which comprehensively capture the similar profile of the probability of success within the score (within score homogeneity) and, at the same time, differ substantially between each other (between score heterogeneity). Hence, the mapping should provide that all points (e.g., values of ) in the first bin imply very low (negligible) effect on the success probability, while all points (e.g., values of ) in the last bin imply the maximum effect on the success WW<sup>pp</sup> probability (to the extent possible which is determined by the estimated coefficient for this variable). WW<sup>pp</sup> The values in the three bins in between the first and the fifth category imply gradually increasing probability of success. A question then is how to perform this mapping.

A simple approach is to form bins based on the quantiles of the distribution of estimated ALE (say 20<sup>th</sup> , 40<sup>th</sup> , 60<sup>th</sup> , 80<sup>th</sup> ). Potential limitations with such approach are that splitting is made arbitrary (at predefined quantiles) and there is no guarantee that bins (scores) formed in this way will maintain the within score homogeneity and between the score heterogeneity with respect to the success probability, especially if the distribution of ALE is skewed. To alleviate these shortcomings, we use a k-means clustering approach which partitions the estimated ALE into five bins, such that within bin dissimilarity in 25