Relationship-Specificity, Incomplete Contracts, and the Pattern of Trade

Is a country’s ability to enforce contracts an important determinant of comparative advantage? To answer this question, I construct a variable that mea- sures, for each good, the proportion of its intermediate inputs that require rela-tionship-speciﬁc investments. Combining this measure with data on trade ﬂows and judicial quality, I ﬁnd that countries with good contract enforcement specialize in the production of goods for which relationship-speciﬁc investments are most important. According to my estimates contract enforcement explains more of the pattern of trade than physical capital and skilled labor combined.


I. INTRODUCTION
In this paper I test whether a country's ability to enforce written contracts is an important determinant of comparative advantage. The channel that I consider builds on the well-established insight that when investments are relationship-specific, under-investment occurs if contracts cannot be enforced [Klein, Crawford, and Alchian 1978;Williamson 1979Williamson , 1985Grossman and Hart 1986;Hart and Moore 1990]. Because countries with better contract enforcement have less under-investment, they will have a cost advantage in the production of goods requiring relationship-specific investments. I examine this hypothesis by testing whether countries with better contract enforcement export relatively more in industries for which relationship-specific investments are important. To quantify the importance of relationship-specific investments, I construct a variable that measures, for each good, the proportion of its intermediate inputs that require relationship-specific investments. I use the United States input-output tables to deter-mine which intermediate inputs are used and in what proportions in the production of each final good. Inputs requiring relationship-specific investments are identified using data from Rauch [1999] on whether an input is sold on an organized exchange or not. If an input is sold on an exchange, then the market for the input is thick, with many alternative buyers and sellers. Because of this, the value of the input outside of a buyer-seller relationship is close to the value inside the relationship, and by definition the input is not relationship-specific [Klein, Crawford, and Alchian 1978;Williamson 1979Williamson , 1985. If a good is not sold on an exchange, it may be reference priced in trade publications. This indicates an intermediate level of market thickness and relationship-specificity. Using this additional indicator, I construct a second measure that classifies inputs that are neither bought and sold on an exchange nor reference priced as relationship-specific.
At the country level, I find that the average contract intensity of production and of exports is positively correlated with judicial quality and contract enforcement. At the country-industry level, I find that countries with better contract enforcement export relatively more in industries for which relationship-specific investments are most important. According to the estimates, contract enforcement explains more of the global pattern of trade than countries' endowments of capital and skilled labor combined. To correct for potential reverse causality from trade flows to judicial quality I exploit differences in countries' legal origins, using both instrumental variables (IVs) and propensity score matching techniques. The estimated effect of judicial quality on trade flows continues to be significant and remains approximately the same magnitude as the OLS estimates.
The paper is organized as follows. The next section reports the estimating equation. Section III describes the data, explaining in detail the construction of the measures of contract intensity. Section IV reports the OLS estimates and Section V tackles the issue of endogeneity. Section VI concludes.

II. BACKGROUND AND ESTIMATING EQUATION
The importance of contract enforcement and relationshipspecific investments in international trade has been well de-570 QUARTERLY JOURNAL OF ECONOMICS veloped. 1 While the initial focus has been on modelling the effect that contract enforcement has on the decisions of multinational firms [McLaren 2000;Grossman and Helpman 2002Antrà s 2003;Antrà s and Helpman 2004;Ornelas and Turner 2005;Puga and Trefler 2005], more recent studies also consider the effect that contract enforcement can have on comparative advantage [Levchenko 2004;Antrà s 2005;Acemoglu, Antrà s, and Helpman 2005;Costinot 2005]. 2 To see exactly how contract enforcement can affect comparative advantage, consider investments made by an input supplier to customize an input for the needs of a final good producer. These investments are relationship-specific because the value of the investments in customization are higher within the buyer-seller relationship than outside the relationship. In this environment, if contracts are imperfectly enforced ex post, then there is underinvestment ex ante [Klein, Crawford, and Alchian 1978;Williamson 1979Williamson , 1985Grossman and Hart 1986;Hart and Moore 1990]. This under-investment is a potential source of comparative advantage. Because countries with good contract enforcement have less under-investment, the costs of producing customized inputs, as well as the final goods using them, are lower. This cost advantage will be greater the more important relationship-specific inputs are in the production of a final good. From this it follows that countries with better contract enforcement have a comparative advantage in the production of final goods that use intensively inputs requiring relationship-specific investments. I test this hypothesis by estimating the following equation: where x ic denotes total exports in industry i from country c to all other countries in the world; z i is a measure of the importance of relationship-specific investments (i.e., contract intensity) in industry i; Q c is a measure of the quality of contract enforcement in country c; H c and K c denote country c's endowments of skilled labor and capital, and h i and k i are the skill and capital intensities of production in industry i; ␣ i and ␣ c denote industry fixed effects and country fixed effects.
In this equation exports are explained by interactions of an industry characteristic with a country characteristic. This functional form was first used by Rajan and Zingales [1998] to test whether industrial sectors that are relatively more dependent on external financing develop faster in countries with better developed financial markets. More recently, Romalis [2004] uses the same specification to test for the importance of countries' factor endowments as a source of comparative advantage. To see the logic behind the interaction terms, consider the coefficient ␤ 1 for the judicial quality interaction term z i Q c . A positive coefficient indicates that countries with better contract enforcement (i.e., high Q c countries) export relatively more in industries for which relationship-specific investments are more important (i.e., high z i industries). That is, countries with better contract enforcement specialize in contract intensive industries. The same logic applies to the factor endowment interactions h i H c and k i K c [see Romalis 2004]. If countries that are abundant in a factor specialize in industries that use intensively that factor, then ␤ 2 and ␤ 3 will be positive. 3 The estimation here is conceptually distinct from studies that estimate a gravity model to show that there is a positive relationship between a country's total volume of trade and the quality of its institutions or its ability to enforce contracts [e.g., Anderson and Marcouiller 2002;Berkowitz, Moenius, and Pistor 2006;de Groot et al. 2004;Ranjan and Lee 2004]. In my estimating equation the effect that contract enforcement Q c has on the total volume of trade across all industries is captured by the country fixed effects. The coefficient of interest ␤ 1 only captures the effect that contract enforcement has on the pattern of trade, not the total volume of trade. Levchenko [2004], using an estimating equation similar to (1), shows that countries with better institutions specialize in goods that are institutionally dependent. As a proxy for institutional intensity Levchenko uses a good's complexity, measured by the variety or range of inputs used in production. Like Levchenko, 3. Like Romalis [2004], I only consider positive exports. In doing this, the question that I am considering is, conditional on a country exporting in an industry, how do differences in the contracting environment affect the volume of exports in that industry? The effect that a country's contracting environment has on its decision to enter an industry is not captured in my estimates. The data do indicate that countries with better contract enforcement are more likely to export in high contract intensive industries than low contract intensive industries. However, I do not pursue this result in this paper.

572
I am also interested in the effect of institutions on trade, but my focus is more narrow. I am interested in the effect of one specific institution: contract enforcement. Further, I am interested in only one channel through which contract enforcement affects the pattern of trade: through under-investment in relationship-specific investments. While the previous empirical literature identifies the broader effects of institutions on trade flows and on the pattern of trade, I attempt to isolate a specific channel through which contract enforcement affects comparative advantage.
For a number of reasons, one cannot take the estimates of (1) as conclusive evidence of the effect of contract enforcement on the pattern of trade. The first reason is that there may be determinants of comparative advantage that are omitted from (1). Assume that the true model includes the additional term w i W c . If z i and w i or Q c and W c are correlated, then OLS estimates of ␤ 1 will be biased. As shown below, contract intensive industries also tend to be skill intensive. As well, countries with good judicial systems also tend to have high incomes and be abundant in skilled labor. Therefore, a primary concern is that z i Q c may be simply capturing the fact that developed countries tend to specialize in the production of skill intensive, high-tech industries. Because of this, in my estimation I carefully control for a host of alternative determinants of comparative advantage.
The second reason to be cautious about the estimates of (1) is that causality may run from comparative advantage to judicial quality. Although, it has been shown that total trade volumes can affect the development of political, economic, and legal institutions [Acemoglu, Johnson, and Robinson 2005;López-Córdova and Meissner 2005], less well studied is whether comparative advantage can also affect institutions. One of the only sources of evidence on this comes from Do and Levchenko [2006], who show that comparative advantage affects financial development. This is because a country's specialization of production affects its demand for external financing, which, in turn, affects subsequent financial development. The same logic also applies to contract enforcement. Countries that specialize in contract intensive industries may have a greater incentive to develop and maintain a good contracting environment. As a result, estimates of ␤ 1 may also capture the feedback from specialization to judicial quality. I deal with this issue explicitly in Section V, where I use legal origin to isolate variation in judicial quality that is unaffected by comparative advantage in 1997.
Before moving to the estimation results, I first describe the data that I use, explaining in detail the construction of the measure of contract intensity across industries.
III. THE DATA Data on trade flows, factor endowments, and factor intensities of production are from standard sources. Industry level data on trade flows are from Feenstra [2000]. I convert the original trade data which are classified by 4-digit SITC codes to the BEA's 1997 I-O industry classification. The final data are classified into 222 industries that include both manufacturing and nonmanufacturing industries. 4 Data on countries' stocks of human capital and physical capital are from Antweiler and Trefler [2002]. Human capital stock is measured by the natural log of the ratio of workers completing high school to those not completing high school. Capital stock is the natural log of the average capital stock per worker. Both measures are from 1992. 5 Data on the skill and capital intensities of production are from Bartelsman and Gray [1996]. Because data on factor intensities are only available for manufacturing industries, when factor endowment interactions are included in the estimating equation the number of industries falls from 222 to 182.
As my primary measure of judicial quality Q c I use the "rule of law" from Kaufmann, Kraay, and Mastruzzi [2003]. This is a weighted average of a number of variables that measure individuals' perceptions of the effectiveness and predictability of the judiciary and the enforcement of contracts in each country between 1997 and 1998. I also test the sensitivity of my results to the use of alternative measures of judicial quality and contract enforcement taken from Gwartney and Lawson [2003] and World Bank [2004]. As I show in Section IV.C., the results of the paper are completely robust to the use of these other measures. I have chosen to use Kaufmann et al.'s variable as my baseline measure because it is available for the largest number of countries. Of the 159 countries with trade data, Kaufmann, Kraay, and Mastruzzi [2003] have data for 146 of them, 4. Details of the conversion are provided in the Appendix. 5. An alternative source of data on factor endowments is Hall and Jones [1999]. I choose to use data from Antweiler and Trefler because the Hall and Jones data on human and physical capital stocks are from 1985 and 1988. The estimates are similar if the Hall and Jones data are used, except that the factor endowment interactions are less significant. The estimated coefficients for the judicial quality interaction are essentially identical.

QUARTERLY JOURNAL OF ECONOMICS
while Gwartney and Lawson [2003] and World Bank [2004] have data only for 112 and 116 of them.

III.A. Constructing Measures of Contract Intensity
The final variable needed to estimate (1) is the importance of relationship-specific investments across industries. To construct this measure I first use the 1997 United States I-O Use Table to identify which intermediate inputs are used, and in what proportions, in the production of each final good. 6 Using data from Rauch [1999], I identify which inputs require relationship-specific investments. As an indicator of whether the investments needed to produce an intermediate input are relationship-specific, I use whether or not the input is sold on an organized exchange and whether or not it is reference priced in a trade publication. If an input is sold on an organized exchange then the market for this input is thick, and the scope for hold-up is limited. If a buyer attempts to renegotiate a lower price, then the seller can simply take the input and sell it to another buyer. 7 If an input is not sold on an exchange, it may be reference priced in trade publications, which are purchased by potential buyers and sellers of the input. Trade publications are only produced if there is a sufficient number of purchasers of the publication. Therefore, if an input is reference priced in a publication, then this indicates that there exists a reasonably large number of potential buyers and sellers of the input. Inputs not sold on an exchange but referenced in trade publications can be thought of as having an intermediate level of relationship-specificity.
Rauch's original classification groups goods into 1,189 industries classified according to the 4-digit SITC Rev. 2 system. 8 Each industry is coded as being in one of the following three categories: 6 7. The setting that I describe is one where the seller must make relationshipspecific investments. However, in many situations it is the buyer who must make relationship-specific investments. In this case, whether or not an input is bought and sold on an exchange is still a good indicator of the relationship-specificity of the input. This is because inputs bought and sold on an exchange also have many alternative sellers, and, therefore, the seller's ability to hold up the buyer is limited.
8. Rauch has both a liberal estimate and a conservative estimate. Throughout the paper, I use the liberal estimate. None of the results of the paper are affected by this decision. 575 sold on an exchange, reference priced, or neither. I aggregate the Rauch data into 342 industries classified according to the BEA's I-O industry classification. To match each SITC industry to an I-O industry, I construct a concordance using the 4-digit SITC to the 10-digit Harmonized System (HS10) concordance from Feenstra [1996] and the HS10 to I-O classification concordance from the BEA. Equal weights are used when aggregating the SITC industries to the I-O classification. In the end, I have data on the fraction of each input that is sold on an organized exchange, reference priced, and neither. Using this information, along with information from the U.S. I-O Use Table on input use, I construct for each final good two measures of the proportion of its intermediate inputs that are relationship-specific: where u ij is the value of input j used in industry i and u i is the total value of all inputs used in industry i; R j neither is the proportion of input j that is neither sold on an organized exchange nor reference priced; and R j ref price is the proportion of input j that is not sold on an organized exchange but is reference priced. I denote the two measures of z i by rs1 and rs2, where rs stands for "relationship-specific." Both measures classify inputs that are neither bought and sold on an exchange nor reference priced as being relationship-specific, but the second measure also includes reference priced inputs as being relationship-specific.
My use of Rauch's classification is quite different from that of other studies. Berkowitz, Moenius, and Pistor [2006] and Ranjan and Lee [2004] use Rauch's data and show that the effect of institutional quality on the volume of trade is greatest for goods that are not sold on an organized exchange. The interpretation is that goods not sold on an exchange are more complex and therefore institutions are a more important determinant of the volume of trade for these goods. Unlike these studies, I do not use the measure to classify the complexity of downstream final goods, but to identify the market thickness of upstream intermediate inputs.
A list of the twenty least and twenty most contract intensive industries using z i rs1 is provided in Table II. The ranking of industries appears sensible. The least contract intensive indus-576 QUARTERLY JOURNAL OF ECONOMICS tries tend to have primary inputs that are not customized and are bought and sold on thick markets: poultry processing, flour milling, petroleum refineries, corn milling, oilseed processing, etc. The industries listed as the most contract intensive also seem sensible. The industries are for various automobile, aircraft, computer, and electronic equipment manufacturing industries, all of which intensively use inputs requiring relationship-specific investments [Monteverde and Teece 1982;Masten, Meehan, and Snyder 1989;Masten 1984]. Table I reports the correlations between the two measures of contract intensity ( z i rs1 and z i rs2 ) and factor intensities of production (h i and k i ). As shown, the two measures of contract intensity are highly correlated with one another. In addition, the measures of contract intensity are also correlated with skill and capital intensity. Contract intensive industries tend to be skill intensive, but not capital intensive.

IV.A. Examining the Raw Data
Before turning to estimates of (1), I check whether there is evidence in the raw data that contract enforcement is important for comparative advantage. I do this by dividing countries into good and poor judiciary countries, defined as those with judicial quality Q c above and below the sample median. Similarly, I also group industries into those that are contract intensive and those that are not; the median level of contract intensity z i rs1 is used to divide the two groups. 9 I first consider data on production, which 9. The results are similar if z i rs2 is used to group the industries.   UNIDO [2003]. I find that for good judiciary countries 56 percent of production is in contract intensive industries, while for poor judiciary countries only 42 percent of production is in contract intensive industries. The findings are similar if exports are examined. For good judiciary countries 63 percent of exports are in contract intensive industries, while for poor judiciary countries only 40 percent of exports are in contract intensive industries.

RELATIONSHIP-SPECIFICITY, CONTRACTS, AND TRADE
A second way to examine the data is to check whether countries with good contract enforcement have a higher average contract intensity of production and exports. The average contract intensity of country c is calculated as Z c ϭ ¥ i ic z ic , where ic is industry i's share of either total production or exports in country c. The results of this procedure are summarized in Table III. The first two columns report the estimated relationship between judicial quality and the average contract intensity of output using both measures of contract intensity. The third and fourth columns report the same regressions using the average contract intensity of exports. The results show that even in the raw data one observes that countries with better contract enforcement specialize in goods for which relationship-specific investments are most important.

IV.B. Estimation Results
I now turn to my estimating equation. Because production data are only available for 28 aggregate industries and for only 78 countries, I only use exports as my measure of specialization. OLS estimates of (1) are reported in Table IV. The first column estimates (1) with only the judicial quality interaction included. In this specifica- The dependent variables are the average contract intensity of production or exports. Standardized beta coefficients are reported, with robust standard errors in brackets. ** indicates significance at the 1 percent level. . Standardized beta coefficients are reported, with robust standard errors in brackets. * and ** indicate significance at the 5 and 1 percent levels.

580
QUARTERLY JOURNAL OF ECONOMICS tion, data are available for 146 countries and 222 industries, and, therefore, the number of possible observations is 146 ϫ 222 ϭ 32,412. However, because of 1,396 missing observations and 8,418 zero observations, the number of observations in the regression is 22,598. The estimated coefficient for the judicial quality interaction z i Q c is positive and statistically significant, a result that supports the hypothesis that contract enforcement is important for comparative advantage.
Next, I control for factor endowments as determinants of comparative advantage. Because factor endowment data are only available for 70 countries and factor intensity data are only available for 182 manufacturing industries, the maximum number of observations is 70 ϫ 182 ϭ 12,740. However, because of missing export data and zero exports, the actual number of observations in the regression is 10,976. In column (2), I first reestimate the specification of column (1) using the smaller sample of countries and industries. The judicial quality interaction remains positive and statistically significant. Next, in column (3), I include the factor endowment interaction variables. The judicial quality interaction remains positive and statistically significant. Because I report standardized beta coefficients, one can directly compare the relative magnitudes of the judicial quality interaction with the factor endowment interactions. According to the estimates, the effect that judicial quality has on the pattern of trade is greater than the combined effects of both capital and skilled labor. A one standard deviation increase in the judicial quality interaction increases the dependent variable by .33 standard deviations, while a simultaneous one standard deviation increase in the capital and skilled labor interactions increases the dependent variable by .19 standard deviations. 10 I also control for other determinants of trade flows that, if omitted, may bias the estimated importance of contract enforcement for comparative advantage. I interact a number of industry characteristics with log income per capita to control for the possibility that, for reasons unrelated to contract enforcement, high 10. One may be concerned that the importance of judicial quality relative to skill and capital endowments is a result of my estimated skill and capital coefficients being unusually low. However, the estimated magnitudes of these coefficients are similar to what other studies have found. For example, Levchenko [2004] estimates a specification similar to my baseline equation with skill and capital factor endowment interactions included (see column (2) of Table II). The beta coefficients for his skill and capital interactions are .10 and .12, which are similar to the estimates of .09 and .11 here. income countries specialize production in certain industries. I include interactions of log income per capita with measures of the share of value added in shipments for each industry, the amount of intra-industry trade in each industry and the TFP growth in the previous twenty years in each industry. These interactions control for the possibility that high income countries have a comparative advantage in lucrative high value-added industries, industries with a high degree of fragmentation of the production process, or industries that are dynamic with rapid technological progress. I also control for the potential importance of financial development by including an interaction of the log of each country's private bank credit to GDP ratio with each industry's capital intensity. 11 The last control variable that I include is an interaction of log income with one minus the Herfindahl index of input concentration for each industry, which is a measure that is increasing in the variety of inputs used in production. It is used by Clague [1991a,b] to measure how "self contained" an industry is. He argues that because developing countries have poorly developed transportation, communication, and distribution infrastructures, they will specialize in production that is "self contained." Blanchard and Kremer [1997] and Levchenko [2004] use the variable to measure a good's "complexity," arguing that because complex goods rely more heavily on institutions than simple goods, high income countries, with superior institutions, should specialize in complex goods.
The results with the set of control interactions, without and with factor endowment interactions, are reported in columns (4) and (5). The judicial quality interaction remains positive and statistically significant when these alternative determinants of specialization are controlled for. 12 The estimated relationship between judicial quality and comparative advantage, in addition to being statistically significant, is also economically meaningful. For example, if we take the estimates from Table IV as causal (I consider causality in detail in Section V), then according to the estimate from column (1), if Thailand improved its contract enforcement to equal Taiwan's, 11. See Beck [2003], Svaleryd and Vlachos [2005], and Manova [2005] for evidence on the importance of financial development for comparative advantage.
12. Although not reported here, the results are similar if the control variables are included in the regression one at a time or in different combinations. As well, the results are nearly identical if value added, intra-industry trade, TFP growth, and one minus the Herfindahl index are interacted with judicial quality rather than log income per capita.

582
QUARTERLY JOURNAL OF ECONOMICS then its exports of "electronic computer manufacturing" would increase from 2.83 to 6.97 billion U.S. dollars per year. Thailand's share of world production in these goods would increase from 1.6 to 4.0 percent. 13 This being said, the proportion of the pattern of trade explained by contract enforcement is not so large that it is unreasonable. Applying the Frisch-Waugh-Lovell Theorem [Davidson and MacKinnon 1993, pp. 19 -24], one can calculate the proportion of the variation in trade flows unexplained by the country and industry fixed effects that is explained by the judicial quality interaction. According to the estimates of column (1), the judicial quality interaction explains 2.28 percent of the residual variation. Similarly, according to the estimates of column (3), the judicial quality and factor endowment interactions together explain 3.09 percent. 14 These results suggest that the majority of the world's pattern of trade remains to be explained.

IV.C. Extensions and Additional Results
The results presented to this point have not considered the possibility that vertical integration may be used to help reduce under-investment. If vertical integration can be used to increase relationship-specific investments when contracts are not perfectly enforced, then one should observe that contract enforcement is less important for comparative advantage within industries for which vertical integration is relatively easy. To test for this, I use the number of inputs used in the production process as a measure of the difficulty of vertical integration. If there are fixed costs in the production of inputs, then the additional cost of producing all inputs in-house will be increasing in the number of inputs needed for production. Using the 1997 U.S. I-O Use Table, 13. This is calculated as follows. Thailand's Q c is .580 and Taiwan's is .734. Electronic computer manufacturing's z i is .956. Thailand's initial value of exports in the industry is 2,830,776, measured in thousands of U. S. dollars. The beta coefficient of .289 for ␤ 1 corresponds to a coefficient of 5.53. If Thailand improved its rule of law to equal Taiwan's, then its exports of electronic computer manufacturing (call this xЈ ic ) would be given by, ln xЈ ic ϭ ln 2,830,776 ϩ ␤ 1 z i ⌬Q c ϭ ln 2,830,776 ϩ 6.12 ⅐ .956 ⅐ (.734 Ϫ .580). Solving yields xЈ ic ϭ 6,969,627 or 6.97 billion U.S. dollars. Because total world production of electronic computer manufacturing is 176 billion U.S. dollars, this represents an increase of Thailand's share of global exports from 1.6 to 4.0 percent.
14. In practice, these figures are calculated by regressing the dependent and independent variables on the industry and country fixed effects to obtain the residuals, which are then used in the regression equation. The R 2 from the equations gives the variation in trade flows unexplained by the fixed effects that are explained by the independent variables.

RELATIONSHIP-SPECIFICITY, CONTRACTS, AND TRADE
I construct an indicator variable I i n i Ͼn that equals one if the number of inputs used in industry i is greater than the median number of inputs used in all industries. I interact the indicator variable with z i Q c and include this in my estimating equation. The results are reported in the first column of Table V. 15 Both interaction terms are positive and statistically significant. The positive coefficient for z i Q c shows that even within industries for which vertical integration is most feasible, the estimated relationship between contract enforcement and trade is still positive and statistically significant. The positive coefficient for z i Q c I i n i Ͼn shows that contract enforcement has an even larger effect on comparative advantage within industries for which vertical integration is a less feasible option. According to the estimates, the effect of contract enforcement on comparative advantage is almost twice as large in industries for which vertical integration is less feasible (with a beta coefficient of .35) relative to industries for which vertical integration is more feasible (with a beta coefficient of .19).
In columns (2)- (5), I test whether other country characteristics, rather than judicial quality, cause countries to specialize in contract intensive industries. I do this by allowing z i to interact with the country characteristics from Table IV. The alternative interactions all enter with positive coefficients, a result that is not surprising given the strong correlation between Q c and the other country characteristics. 16 Despite this, the estimated coefficient for the judicial quality interaction remains positive and statistically significant. As well, the coefficients remain approximately the same magnitudes, ranging from .18 to .32.

IV.D. Robustness and Sensitivity Analysis
I now test the sensitivity and robustness of my baseline estimates. I first consider the robustness of my results to alternative measures of Q c and z i . I re-estimate (1)   . Standardized beta coefficients are reported, with robust standard errors in brackets. * and ** indicate significance at the 5 and 1 percent levels.

RELATIONSHIP-SPECIFICITY, CONTRACTS, AND TRADE
estimated coefficient and standard error for the interaction term z i Q c when different measures of Q c and z i are used. Columns (1) and (2) report estimates without factor endowment interactions, while columns (3) and (4) include factor endowment interactions. Each row uses a different measure of contract enforcement. In the first row I use a measure of legal quality from Gwartney and Lawson [2003]. The next three rows use measures of judicial quality and contract enforcement from the World Bank's [2004] Doing Business Database. The World Bank has constructed three measures of the efficiency of the judicial system in the collection of an overdue debt: the number of procedures involved, the official costs, and the total time required. I scale each variable The regressions are estimates of (1). The dependent variable is the natural log of exports in industry i by country c to all other countries, ln x ic . Each entry of the table reports the estimated beta coefficients for z i Q c , with robust standard errors reported in brackets. Below this the number of observations in the regression is reported. * and ** indicate significance at the 5 and 1 percent levels.

QUARTERLY JOURNAL OF ECONOMICS
so that a higher number indicates a better judicial system. As the results show, no matter which measures of Q c and z i are used, the estimated coefficient of z i Q c is positive and statistically significant.
The bottom half of Table VI reports the sensitivity of my baseline estimates to the removal of influential observations and to alternative samples. The first row reports estimates after removing observations with studentized residuals greater than 2.0. 17 Next, I restrict the sample to only include countries that joined the OECD by the 1990s. This serves as a check of whether the results are being driven by broad differences between developing and developed countries or whether the importance of contract enforcement can also be seen among the group of most developed countries. In addition, because data from these countries are of good quality, I am also testing the sensitivity of my results to the omission of countries with lower quality data. The next row reports results when the sample is restricted to only non-OECD countries. The final row reports estimates using data from 1963. 18 The trade data are from the UN's Comtrade database. Contract enforcement is measured using a measure of legal quality in 1970 from Gwartney and Lawson [2003]. The contract intensity measures are constructed using the 1963 U.S. I-O Use Table and Rauch's [1999] data. The 1963 sample includes 42 countries and 178 industries. As shown, the results remain robust to all of these sensitivity checks. Even with the removal of influential observations, changes in the sample of countries and changes in the time period, contract enforcement continues to be an important determinant of comparative advantage.

V. ENDOGENEITY
As discussed in Section II, one must be cautious in interpreting the OLS estimates as causal. This is because causality may also run from trade flows to judicial quality. Countries that specialize in contract intensive industries may have a greater incen-17. An observation's studentized residual is calculated from a regression with the observation in question excluded. This methodology allows one to recognize an outlier that strongly influences the estimated regression line, causing the observation to have a small residual. See Belsley, Kuh, and Welsch [1980].
18. I choose to report 1963 estimates because this is the earliest year for which data are available. I have also estimated the equations using data from 1967, 1972, 1977, 1982, 1987, and 1992. The results are also robust to the use of each of these alternative samples. tive to develop and maintain a good contracting environment. To estimate the causal influence of judicial quality on trade flows I estimate (1) using IVs. I use differences in countries' legal origins as instruments for judicial quality. Although a country's legal origin can be used to isolate variation in countries' legal quality unaffected by trade flows in 1997, legal origin may also affect comparative advantage through channels other than contract enforcement. In other words, it may not satisfy the exclusion restrictions necessary in order for the instruments to be valid. Because of this, I pursue a second strategy. I compare the relative exports of British common law and French civil law countries but restrict my comparison to pairs of countries that are matched by important country characteristics that may be affected by legal origin and also affect comparative advantage.

V.A. Instrumental Variables
To isolate the causal impact of contract enforcement on comparative advantage I rely on countries' legal origins. I use legal origin indicator variables to construct interaction variables that are used as instruments for z i Q c . The interactions are z i B c , z i F c , z i G c , z i S c , where B c , F c , G c , and S c are indicator variables that equal one if country c has a legal origin that is British common law, French civil law, German civil law, and Socialist. The omitted category is for Scandinavian civil law countries. Because each country's legal origin is predetermined and unaffected by trade flows in 1997, this can be used to isolate exogenous variation in judicial quality. Djankov et al. [2003], Acemoglu and Johnson [2004], and Lerner and Schoar [2005] have shown that legal origin is an important determinant of differences in judicial quality and contract enforcement between countries.
The IV estimates are reported in Table VII. The first two columns report OLS and IV estimates of (1) without factor endowment controls. According to the first stage estimates, after German and Scandinavian legal origin countries, British common law countries have the best rule of law, followed by French civil law countries and then Socialist countries. Overall, these estimates are consistent with previous evidence of the relationship between legal origins and judicial quality [e.g., La Porta et al. 1999;Djankov et al. 2003]. The second stage estimates are summarized in the top panel of the table. The IV coefficient is positive and statistically significant, providing support for the importance of contract for comparative advantage. However, the magnitude 588 QUARTERLY JOURNAL OF ECONOMICS .00 .00 .00 Over-id test (p-value) .00 .00 .00 In the second stage standardized beta coefficients are reported, with robust standard errors in brackets. The dependent variable is the natural log of exports in industry i by country c to all other countries. In the first stage I report regular coefficients, with robust standard errors clustered at the country level reported in brackets. The dependent variable is the judicial quality interaction z i Q c . The measure of contract intensity used is z i rs1 . Although all explanatory variables in the second stage are also included in the first stage, to conserve space I do not report the first stage coefficients for these variables. The omitted legal origin category is Scandinavian. Because there are no Socialist legal origin countries in the smaller samples of columns (3)-(5), the Socialist interaction term does not appear as an instrument in these specifications. The reported F-test is for the null hypothesis that the coefficients for the interaction terms are jointly equal to zero. * and ** indicate significance at the 5 and 1 percent levels.
of the IV estimate is larger than the OLS estimate. Given the nature of the potential reverse causality, the IV estimates are expected to be smaller than the OLS estimates, not larger. This fact, as well as the results from the tests of the overidentifying restrictions, suggest that the instruments may be correlated with the second stage residuals, resulting in a violation of the exclusion restrictions. Previous empirical work also supports this possibility. La Porta et al. [1997Porta et al. [ , 1998 find that a country's legal origin also affects investor protection and financial development. If these, in turn, affect trade through channels that have not been properly controlled for in the estimating equations, the IV estimates will be inconsistent. I attempt to control for these alternative channels by including, in the second stage, the factor endowment interactions, as well as the full set of interaction control variables from Table IV. The results, reported in columns (3)-(6) show that including these control variables does not result in estimates that appear more valid. The IV estimates are still larger than the OLS estimates, and they actually increase significantly rather than decrease. This suggests that the set of interactions may not properly control for the alternative channels through which legal origin may affect comparative advantage. The most likely reason for this is the difficulty in identifying exactly how country-level variables affect comparative advantage. To control for the effect that country characteristics have on the pattern of trade, I must correctly identify the corresponding industry characteristics that are relevant for specialization. Because of the difficulty involved in this, in the following section I pursue an alternative strategy that does not require that I identify these industry variables.

V.B. The Use of Propensity Scores
I continue to use differences in legal origin as a source of variation in judicial quality unaffected by trade flows in 1997, but I restrict my analysis to only British common law and French civil law countries. As well, instead of using legal origin as an instrument for judicial quality, I directly estimate the following reduced form equation where x ib and x if denote total exports in industry i from a British 590 QUARTERLY JOURNAL OF ECONOMICS common law country and a French civil law country. Because, all else equal, British common law countries tend to have better legal systems than French civil law countries, ␤ is expected to be positive. That is, relative to French civil law countries, British common law countries are expected to export relatively more in contract intensive industries. 19 I estimate (2) using a sample of all possible British-French country pairs. The results are reported in the first column of Table VIII. The column reports the estimate of ␤, as well as its standard error adjusted for clustering at the industry level. As shown, the estimated coefficient is positive and statistically significant, indicating that compared to French civil law countries, British common law countries tend to export more in contract intensive industries. 20,21 British common law and French civil law countries may be different in ways other than in the quality of their judicial systems, and these differences may be important for comparative advantage, causing the estimates of column (1) to be biased. To overcome this potential problem I restrict my comparison to British and French country pairs with similar characteristics that may bias my estimates if not accounted for. I match countries based on per capita income, financial development, factor endowments, and trade openness. 22 By restricting my sample to matched country pairs, I remove the bias that may exist in my estimates if the country characteristics are ignored. The advan-19. The functional form of this estimating equation is similar to traditional tests of Ricardian productivity differences as a source of comparative advantage. Tests of this nature have their origins with MacDougall [1951], Stern [1962], and Balassa [1963], and have most recently been performed by Golub and Hsieh [2000].
20. This result is also apparent in the raw data. Defining contract intensive industries as those above the median level, one observes that for British common law countries 64 percent of exports are in contract intensive industries, while for French civil law countries only 53 percent of exports are contract intensive. This is also observed in the production data. For British common law countries 54 percent of production is in contract intensive industries, while for French civil law countries only 48 percent of production is contract intensive.
21. The estimated coefficient of 1.17 is similar in magnitude to the effect of .90 implied by the IV estimate from column (1) of Table VII. This figure is calculated by first calculating the estimated difference in British-French judicial qualities Q b Ϫ Q f from the difference in their legal origins: (Ϫ.295z i ) Ϫ (Ϫ.405z i ) ϭ .11z i . Because the second stage coefficient for the judicial quality interaction is 8.14 (which corresponds to the beta coefficient of .385), the estimated impact of the difference in legal origin on the export ratio ln ( x ib /x if ) is 8.14 ⅐ .11z i ϭ .90z i .
22. Trade openness is measured as the log of the ratio of exports plus imports to GDP. The measures of income, financial development, and factor endowments are the same as used above. The regressions are estimates of (2). The dependent variable is the natural log of the ratio of the common law country's total exports in industry i relative to the civil law country's total exports in industry i, ln (x ib /x if ). The measure of contract intensity used is z i rs1

RELATIONSHIP-SPECIFICITY, CONTRACTS, AND TRADE
. Estimated coefficients are reported, with robust standard errors adjusted for clustering at the industry level in brackets. * and ** indicate significance at the 5 and 1 percent levels.

QUARTERLY JOURNAL OF ECONOMICS
tage of matching is that I do not need to identify the relevant industry characteristics when controlling for country characteristics. That is, I do not need to know exactly how it is that each country characteristic affects the pattern of trade.
To match British common law and French civil law countries, I use propensity score matching [Rosenbaum andRubin 1983, 1984]. This is done as follows. Let L c be an indicator variable that equals one if country c's legal origin is British common law and zero if country c's legal origin is French civil law. I first estimate the following probit model, where ⌽٪ is the normal CDF and XЈ c is the vector of variables used to match countries. I calculate each country's predicted propensity score P c . Then for each British common law country b, I choose the French civil law country f that minimizes the distance between their propensity scores. More precisely, for each b, the matched f satisfies where F denotes the set of French common law countries. This matching procedure is often referred to as nearest neighbor matching.
Columns (2)- (6) of Table VIII report estimates of (2) using the samples of matched country pairs. In columns (2) and (3) country pairs are matched by log per capita GDP and financial development. In both cases, the estimated coefficients are positive and statistically significant, and their magnitudes are less than half the baseline estimate of 1.17 from column (1). This suggests that not controlling for differences in income and financial development between British and French legal origin countries biases upwards the estimated effect of judicial quality on trade flows. In addition, the results also show that even when controlling for these differences, legal origin continues to be an important determinant of comparative advantage. In columns (4) and (5) countries are matched by factor endowments and trade openness. In both cases the estimated coefficient remains positive and statistically significant. Unlike the results when countries are matched by income and financial development, here the estimated coefficients are about the same or larger than the estimate of column (1). In the final column, I match country pairs using all the variables. Again, the coefficient is positive and statistically significant. As well, the estimated coefficient is smaller than the baseline estimate reported in column (1).
Unlike the IV estimates, the propensity score matching estimates tend to decrease when country characteristics are controlled for. For this reason, the matching estimates may be more reliable than the IV estimates, where the coefficients increase, rather than decrease, when additional variables are controlled for. Overall, the matching estimates provide further evidence that contract enforcement and relationship-specific investments are important determinants of comparative advantage.
VI. CONCLUSIONS I have tested whether a country's contracting environment is a source of comparative advantage. I found that countries with good contract enforcement specialize in industries where relationship-specific investments are most important. According to the estimates, contract enforcement explains more of the global pattern of trade than countries' endowments of physical capital and skilled labor combined. To correct for the potential endogeneity of judicial quality, I exploited differences in countries' legal origins, using both IV and propensity score matching techniques. Both estimates supported the OLS results, providing added evidence for the notion that a nation's ability to enforce contracts is an important determinant of comparative advantage.

VI.A. Data Description
Data on total exports by country c in industry i to all other countries in the world are from the World Trade Flows Database [Feenstra 2000]. The data are from 1997 and are measured in thousands of U. S. dollars. The data are originally classified by the 4-digit SITC Rev. 2 system. I map the data to the BEA's 1997 I-O classification system, using the SITC to HS10 concordance from Feenstra [1996] and the concordance from HS10 to the I-O system, which is available from the BEA. I use the number of HS10 categories linking each SITC and I-O category as an indicator of which I-O category to choose when an SITC category maps into multiple I-O categories. When an SITC category maps equally into two or more I-O categories, then the choice of I-O category was made manually. This mapping methodology results in each SITC category being mapped into only one I-O category.
Because of this, for some I-O categories there are no SITC categories that map into them. This occurs if only small proportions of many different SITC categories map into an I-O category. In the end, the SITC trade data are mapped into 222 I-O categories. An alternative strategy is to use weights so that trade data in an SITC category are split between all of the I-O categories linked to the SITC category rather than just to the dominant I-O category. The results of the paper are similar if this methodology is used. The former method is chosen because it results in a more aggregate and, as a result, more conservative and clean, final classification of the trade data.
Trade data from 1963 are from the UN's Comtrade database. The original data are classified by the 4-digit SITC Rev. 1 system. I concord the trade data to BEA's 1963 I-O classification using a concordance from SITC Rev. 1 to SIC72, which the I-O system is based on. The concordance is from Feenstra [1996].
Production data are from UNIDO [2003]. Production is measured as the value of output in 1997 in each 3-digit ISIC Rev. 2 industry.
Factor endowment data are from Antweiler and Trefler [2002]. A country's stock of physical capital K c is measured by the natural log of the average capital stock per worker. The stock of human capital H c is measured by the natural log of the ratio of workers that completed high school to those that did not complete high school. The measures used are from 1992 because this is the year closest to 1997 for which data are available.
The measures of judicial quality and contract enforcement are from a variety of sources. The "rule of law" Q c is from Kaufmann, Kraay, and Mastruzzi [2003]. The variable, using data collected in 1997 and 1998, measures the extent to which agents have confidence in and abide by the rules of society. These include perceptions of the incidence of crime, the effectiveness and predictability of the judiciary, and the enforceability of contracts. The original variable ranges from Ϫ2.5 to 2.5, with a higher number indicating a better rule of law. I transform the variable so that it ranges from 0 to 1 by adding 2.5 to the original value and dividing by 5. "Legal quality" is from Gwartney and Lawson [2003]. It is an index from 1 to 10 that measures the "legal structure and the security of property rights" in each country in 1995. Data on the "number of procedures," "official costs," and "time" required to collect an overdue debt are from World Bank [2004]. "Number of procedures" is the total number of procedures mandated by law or court regulation that demand interaction between the parties or between them and the judge or court officer. Because more procedures are associated with a lower judicial quality, I use 60 minus the total number of procedures as my measure so that a higher number indicates less procedures and a more efficient judicial system. The final variable ranges from 2 to 49. "Official costs" is the sum of attorney fees and court fees during the litigation process, divided by the country's income per capita. As my measure of judicial quality I use 6 minus the natural log of official costs so that a higher number indicates lower costs of litigation and a better legal system. The final variable ranges from .45 to 4.56. "Time" is the total estimated time of the full legal procedure in calendar days. I use 1,500 minus the total time so that a higher number indicates a shorter duration and a better legal system. The final variable ranges from 41 to 1,473.
Real per capita GDP data are from the Penn World Tables  (PWT), with missing observations filled in using data from Maddison [2001]. I match the Maddison data and the PWT data using the following OLS estimate of the relationship between the two measures: rgdpch1997 ϭ 288.12 ϩ 1.146maddison1997. The number of observations in the regression is 100, the R 2 is .98, and the t-statistics for ␤ 0 and ␤ 1 are 1.66 and 64.13.
Data on each country's legal origin are from La Porta et al. [1999]. Countries are classified as either German, Scandinavian, British, French, or Socialist. Financial development CR c is the natural log of credit by banks and other financial institutions to the private sector as a share of GDP in 1997. The measure is from Beck, Demirgü ç-Kunt, and Levine [1999]. Trade openness is the natural log of the sum of exports and imports as a share of GDP. Data are from Feenstra [2000] and the PWT.
Contract intensity z i measures the proportion of an industry's inputs, weighted by value, that require relationship-specific investments in their production. I use data from Rauch [1999] to identify inputs that are relationship-specific. The construction of this measure is described in Section III. When constructing the measures of z i at the 3-digit ISIC Rev. 2 level of disaggregation, I use the same procedure as described in Section III, except that the final goods are aggregated to the 3-digit ISIC level. A concordance from the I-O classification to 3-digit ISIC was constructed using the I-O classification to HS10 concordance from the BEA, the HS10 to 5-digit SITC concordance from Feenstra [1996], and