smooth and continuous, and can be approximated by a flexible polynomial.<sup>16</sup> Second, average costs by revenue would not jump discontinuously at the thresholds. Under these assumptions, we develop a three step methodology. In a first step, we use bunching at the revenue thresholds to measure revenue responses to higher tax rates. In a second step, we use the discontinuities in average costs by revenue, on each side of the thresholds, to estimate the cost response for infra-marginal firms. Using the revenue elasticity estimated in the first step, we adjust the cost discontinuities to take into account intensive margin revenue responses. In a third step, we combine the revenue and cost responses to compute the profit response at the thresholds.

# **3.1 Data and Evidence of Responses to the Tax Schedule**

Costa Rica is a middle-income country, with per capita GDP of $15,000 and stable institutions. It collects 21% of its GDP in revenue of which 14% is tax revenue and 7% social security contributions. Our study uses the 2008 to 2014 universe of administrative corporate tax returns, from the Ministry of Finance. All registered corporations are required to file electronically yearly tax declaration D101 in which they report profits, revenue and costs. Costs are reported in five line items: administrative costs and wages, material inputs, capital depreciation, interest payments and other costs. The data contains 617,588 firm-year observations and 222,352 unique firms. In total, the corporate income tax raises 18% of tax revenue, roughly 2.5% of GDP. We study the behavior of small firms with yearly revenue below 150 M CRC ($450,000 in PPP). They represent 81% of the firm population, declare 20% of total profits and generate 13% of corporate tax revenue.

Figure 3 shows the key features of the data by revenue bins of half million CRC, pooling all years together. Panel A shows the distribution of firms by revenue, which displays clear excess mass below the revenue thresholds and missing mass just above. Panel B shows the average profit margin by revenue, where profit margin is defined as profits over revenue.<sup>17</sup> Profit margin by revenue follows a downward step function: it remains constant within a given tax bracket and jumps down discontinuously at the thresholds. Average profit margin within the first tax bracket is 17%, falls to 8% in the second bracket and decreases further to 5% in the third. We also observe that firms reporting revenue at the thresholds display profit margins in excess of 22% and 9%, respectively at the first and second thresholds.<sup>18</sup> The estimation strategy uses the moments of the distributions of Figure 3 to estimate the profit elasticity and separate it between revenue and cost responses.

> 16The ability to approximate the counterfactual density with a flexible polynomial is a usual assumption in bunching papers, however, it is not a trivial: it requires smooth production functions, credible shapes extrapolated distributions and no extensive margins responses. In our context there appears to be support for these assumptions and the parametric choices (e.g. polynomial order, bunching interval limits) do not impact the estimated parameters.

> 17Figure A2 shows average profits (Panel A) and average costs (Panel B) by revenue. Profit margin is unit free and very stable within tax bracket in our data, which highlights the large discontinuity in the tax base at the threshold.

> 18As shown in equation 7, firms with low costs have incentives to select into bunching: sufficient heterogeneity in costs for a given level of revenue can lead to large average profit margins for bunchers.

10