The make-or-buy decision of feed on livestock farms: Evidence from Ontario swine farms

We define the boundary of a livestock farm in terms of corn production as the percentage of homegrown corn in total corn required. A new theoretical model is proposed that explains how farm boundaries are shaped by the relative efficiency of two alternative transaction-facilitating mechanisms: market and hierarchy. Using tax filer data from swine farms in Ontario, this article analyzes the impact that the mechanism efficiency has on farm boundaries. To identify the potential causal effect, the USD/CAD exchange rate is used as the instrumental variable for corn price in Ontario. The findings support the theoretical model: in-house corn production expands due to not only higher price but also higher price volatility. The potential causal relationship we identified flowing from the mechanism efficiency to farm boundary may shed light on why swine and other livestock industries are shifting towards nonmarket arrangements.


INTRODUCTION
There are many transaction-facilitating mechanisms such as markets, contracts, and hierarchical bureaucracy as seen inside firms. Economists have devoted considerable effort to study each individual mechanism. For transactions through markets, significant progress has been made to understand the role of transaction costs (e.g., Coase, 1937;Joskow, 1987;Klein, Crawford, & Alchian, 1978;Williamson, 1971Williamson, , 1973Williamson, , 1979. For transactions through contracts, Hart (2009); Hart and Moore (1990); Hart and Holmstrom (2010) enhance our understanding of incomplete contracts. For transactions directed by authorities, Holmstrom and Milgrom (1987, 1991, 1994 and Holmstrom (1989) show the importance of incentive instruments within firms. Instead of focusing on a particular mechanism, this article studies the trade-offs of alternative mechanisms. The following simplified example illustrates the intuition: A swine farmer can buy corn from the market whenever necessary to save inventory costs, but the transaction costs, such as searching for sellers and ensuring product quality, could be high. Alternatively, this farmer can sign a contract with his/her neighbor who is a crop farmer to provide corn at $4 per bushel. The contract may work well under normal circumstances. However, if an unexpected drought raises the corn price to $8 per bushel, the neighbor might hold up the transaction. Upstream vertical integration, where the livestock farmer buys the neighbor's business and hires him/her as farm manager, may be a better way to guarantee uninterrupted transactions. In this example, trade-offs occur between markets, contracts, and hierarchies where hierarchies refer to the farm management system under vertical integration.
We propose a theoretical model to formally depict the trade-offs among different mechanisms. The boundary of the livestock farm, in terms of corn production, lies on a continuous spectrum ranging from buying all to making all corn. We model how a livestock farmer maximizes his/her expected utility by choosing the boundary of his/her farm. This is the typical "make-or-buy," firm boundary, or vertical integration (in this case, upstream vertical integration) problem. Our model suggests that not only does the boundary of the farm expand when corn prices increase but also when they are more volatile. This indicates that vertical integration may act as insurance against input price uncertainty. Interestingly, Bellemare et al. (2021) show that contracts can also act as partial insurance. Our model predictions are in line with Alchian (1950): people are not simply choosing the mechanism that yields lower costs, but rather the mechanism whose potential outcome distribution is preferable.
To test the predictions from our theoretical model, we utilize the substantial corn price change around 2008 as a natural experiment to explore whether the level and volatility of corn prices are associated with the boundaries of swine farms in Ontario. To measure corn prices and their variabilities, daily corn prices from 2003 to 2014 are collected from the Grain Farmers of Ontario daily commodity report. Farm production and financial data on a total of 2006 swine farms in Ontario are from tax files. The boundary of a swine farm is measured by the percentage of homegrown corn in total corn requirement: 0% means separation (transactions facilitated off farm by mechanisms such as markets or contracts) and 100% means full integration (transactions facilitated on farm by hierarchies). The means and variances for purchased corn prices, the means and variances for homegrown corn costs, and other control variables (such as farm size, operation type, and diversification index) are used in regression models to explain farm boundaries.
Previous studies suggest that adoption of alternative marketing arrangements (AMAs), such as production contracts, causes price volatility on the spot market (Kim & Zheng, 2015;Schroeter & Azzam, 2003). However, utilizing the USD/CAD exchange rate as instrumental variable for corn price, our findings suggest that the opposite might be true: spot price volatilities cause the adoption of AMAs such as vertical integration. We show, for the first time, that the boundaries of Ontario swine farms are shaped by the relative efficiency of alternative transaction-facilitating mechanisms. Farm boundary expands not only due to higher input price level but also higher input price volatility. The potential causal relationship we identified flowing from the mechanism efficiency to farm boundary may shed light on why swine and other livestock industries are shifting towards nonmarket arrangements.

THEORETICAL FRAMEWORK
Consider a business that requires inputs. The share of transactions of input governed by mechanism is ( = 1, 2, … , , and ∑ =1 = 1). Let the output price and quantity be and , and the total quantity of input required be . The profit is then where Ω is technology, and are the fixed and variable costs, respectively, of input under transaction-facilitating mechanism . The business evaluates the merits of all mechanisms and then maximizes profit by adjusting . If the business buys 100% of its input from the market, then for the market mechanism would be 1 and other mechanisms such as contracts, hierarchies, and auctions would be 0. Note that the business could maintain multiple mechanisms at the same time for the same input as in Vukina et al. (2009). It is also possible that the firm chooses different mechanisms for different inputs (e.g., buy all input A from the market, contract some of input B, and produce the rest of B in-house). We define as the boundary of the firm on input where the th mechanism is in-house production organized by hierarchy. It is possible that firm boundaries vary across different inputs. To keep the model concise while still conveying key insights, we model only the trade-offs between two transactionfacilitating mechanisms: markets and hierarchical bureaucracies. It should be noted that there are many kinds of hierarchical structures ranging from the typical pyramid structures to only one layer where decisions are made democratically. We use hierarchical bureaucracies to loosely represent the transaction-facilitating mechanisms inside an organization. However, the difference between market and hierarchy should be stressed. Under the market, the transactions are facilitated by price. The ups and downs of prices signal to the participants in the market what to produce, how much to produce, and for whom to produce. Under hierarchy, the transactions are facilitated by leadership and direction. The leaders (such as a manager in a firm, family head on a farm, or director in a research institute) direct the transactions by his/her knowledge, beliefs, and entrepreneurial ability. More specifically, we focus on one particular input-corn. Consider a swine farmer who produces (0 ≤ ≤ 1) of the required corn ( ) in-house and buys the rest from the market. Farm profit is given by where is the price of a hog. is the quantity of hog produced. Ω is a vector of farm technology and operator characteristics affecting the conversion ratio from feed intake to pig weight gain. is the fixed cost of homegrown corn. As in Coase (1960), it is the fixed cost of switching to a new mechanism, such as the equipment bought to grow corn. is the fixed cost of buying corn from the market.
is the average cost for homegrown corn. is the average market price for corn. Based on the central limit theorem, and , as average values, are normally distributed: with mean and variance 2 , with mean and variance 2 . The farmer chooses based on the relative efficiency of the two transaction-facilitating mechanisms. The efficiency of the in-house hierarchy is measured by and 2 , while and 2 indicate the efficiency of the market mechanism. We stress that we want to depict the potential causal relationship flowing from the efficiency of transaction-facilitating mechanisms (markets or hierarchies) to farm boundary. By efficiency, we mean the mechanism's ability to consistently (smaller variance) yield output with lower cost (smaller mean). For example, transactions of corn can be facilitated by mechanism or . If the variances of corn costs under the two mechanisms are the same, but the average cost under is smaller, then is more efficient. If the means are the same, but the variance of the costs under is smaller, then is more efficient. We hypothesize that the change of the relative efficiency of the two mechanisms will trigger a reallocation of transactions ( increases or decreases).
We compress the costs of the other − 1 inputs into which are . It is often true that a few meat processors are surrounded by a large number of livestock farms. For example, there are hundreds of swine farms in Ontario, while only two major meat packers: Sofina and Conestoga Meat Packers. 1 As a result, the livestock farmers are assumed to be price-takers.
The farmer's utility is represented by a negative-exponential expected utility function where > 0 is the coefficient of risk aversion, which increases as the farmer becomes more risk-averse. Denoting the probability density function of and by ( ) and ( ), the farmer's expected utility is The range of integration is (0, +∞). Maximizing (Π) is equivalent to minimizing (See proof in the Online Appendix.) The first-order condition (FOC) is The optimal level of homegrown corn is then defined by * = − + 2 2 + 2 .
To examine the effect of the average corn costs on the optimal farm boundaries, total differentiate the FOC with respect to and , respectively, and rearrange the results yields and = − 1 2 + 2 < 0.
Thus, as the average market prices of corn increase, farm boundaries in terms of corn production expand by producing more corn in-house. On the contrary, if average costs of homegrown corn increase, farm boundaries shrink. It should be noted that ∕ = −1. That is, on the optimal farm boundary, the two forces ( and ) shaping the farm boundary are of the same magnitude but with opposite directions.
To examine the effect of the variabilities of market corn prices on farm boundaries, total differentiation of the FOC with respect to 2 and rearrange the results gives This shows that when the market prices of corn are more volatile, farm boundaries expand. This may explain the vertical integration behavior: when a downstream firm requires raw materials but the upstream markets experience frequent fluctuation, then more upstream vertical integration might be observed. Similarly, total differentiation of the FOC with respect to 2 and rearrange the results yields This suggests that when the variabilities of the costs of homegrown corn increase, farm boundaries shrink. Conveniently, 2 ∕ 2 = −(1 − )∕ . This suggests that the ratio of the marginal effects of the variabilities of the transaction-facilitating mechanisms on farm boundariesis only a function of farm boundary. It is not affected by a farmer's risk attitude, the quantity of corn, or even the size of the variabilities themselves. This dramatically simplifies the process to empirically test such a prediction.
The speed at which farm boundary responds to average price/cost may be affected by the variability of market price or the variability of in-house production cost. 2 We differentiate farm boundary with respect to the mean of price/cost first, and then with respect to the variance of price/cost again.
The comparative statics suggests that, as market price becomes more unpredictable, farmers are occasionally presented the opportunity to buy feed at attractive price. As a result, the speed of farm boundary expansion due to increased average market price slows. On the other hand, volatile in-house production cost, a risk, slows farm expansion speed due to higher market price. More in-house production at this point would expose the farm to more uncertainty.
Contrary to market price, as the cost of in-house production becomes more unpredictable, the farmer will more aggressively reduce in-house production as average cost rises. Similarly, the volatile market price presents farmers opportunity to buy corn at attractive price. Under this circumstance, the farm boundary is more sensitive to the change on average in-house production cost. It is interesting to point out that, the marginal impacts of uncertainty, no matter from in-house cost or market price, on the speed of farm boundary adjustment due to average cost/price, are the same.
Finally, total differentiation of the FOC with respect to and rearrange the results yields From the FOC, we know that plugged this back into Equation (17) yields This demonstrates how risk attitude increases a farmer's financial burden. Assume > , then ∕ > 0. This means that as farmers become more risk-averse, they expand farm boundaries and produce more corn in-house even when it is cheaper to buy.

DATA AND DESCRIPTIVE STATISTICS
The boundary of a swine farm in terms of corn production ( ) is represented by the share of homegrown corn in total corn required to feed the pigs. Corn required to feed one marketable hog is assumed to be 10 bushels. 1 − is the share of corn bought from the spot market. The main data we use are from the Ontario Farm Income Database (OFID). This farm-level dataset contains data on the production, financials, and program payments of all tax-filing farm operations in Ontario. Farms with more than 50% revenue from swine sales are defined as swine farms in this study. Specifically, the acreage of corn planted for feed on each swine farm is reported. This acreage is multiplied by county-level corn yield per acre to estimate the quantity of homegrown corn. The county-level corn yield data were obtained from the Ontario Ministry of Agriculture, Food, and Rural Affairs (OMAFRA). The county-level daily corn prices in Ontario are from the Ontario commodity reports by Grain Farmers of Ontario. As the OFID data are yearly and the swine industry experiences a cycle about every 4 years, we use the mean and variance of the average corn prices of the previous 4 years, Mean C Buy and Var C Buy, to depict the efficiency of the market. The efficiency of the hierarchy mechanism is depicted by Mean C Make and Var C Make, the mean and variance of the average costs of homegrown corn in the previous 4 years. We use the average corn prices during the harvest season (October 15 to November 15) to represent the average cost of homegrown corn. As Sykuta (2013), we argue this is the time that the corn market is most likely, if not certainly, a perfectly competitive market. 3 The reasons are (a) there are no barriers to entry; (b) the supply of corn during this time is likely to be abundant compared to demand; (c) there is a large number of corn producers; and (d) corn produced by different farmers is likely to be similar, if not identical, in quality. Since, on the perfectly competitive market, the price is equal to the average cost, this allows us to represent the average cost of homegrown corn by the average price during the harvest season. 4 The median and minimum corn prices during the harvest season are also used to represent the average cost of homegrown corn in our sensitivity analysis.
Regarding our control variables, the variable Diversification, ranging from 1 to ∞, is the reciprocal of the Herfindahl index for a swine farm. The Herfindahl index is defined as the sum of the squared share of revenue generated from each commodity group on the farm. The number of swine is the market hog equivalent (MHE) on the farm. 5 Total acreage is the total crop acres. Income is broken-down in 11 categories that indicates the range of total operating revenue of the farm. 6 The prime rate is the Bank of Canada prime lending rate.
Lastly, the instrumental variable we use as a source of exogenous variation in the price of corn is the monthly exchange rate between the Canadian dollar and the U.S. dollar. These exchange rates are obtained from the "Quandl" package in 3 Daily corn prices in Ontario from 2003 to 2014 are shown in Figure B1 in the Online Appendix, with the harvest season highlighted. Prices between harvest seasons are often higher than those during harvest seasons. 4 Additionally, we calculate the average profit margin of corn production in Ontario from 2003 to 2015 using the province-level break-even prices from OMAFRA. The result is −1.5%, close to 0%, suggesting that the corn market is perfectly competitive.  Note: a The share of homegrown corn in total corn required to feed pigs. b,c The mean and variance of corn prices on the spot market. d,e The mean and variance of the prices of homegrown corn. f The reciprocal of the Herfindahl index for a swine farm. g An 11-levels factor that indicates the range of total operating revenue of the farm. h The average CAD/USD exchange rate in January.
R. The monthly exchange rates highly correlate with the corn prices in a given county/year, but not with the boundary of the farm. 7 Table 1 presents the descriptive statistics for the dependent variable, for the variables of interest (i.e., mean of the average costs of bought corn, variance of the average costs of bought corn, mean of the average costs of homegrown corn, and variance of the average costs of homegrown corn), for the control variables, and finally for the instrumental variable (i.e., monthly CAD/USD exchange rates). The average swine farm grows 44% of the corn it requires. The average price of corn bought from the spot market is 3.776 C$/bushel compared to 3.669 C$/bushel when produced on the farm. The average variance of the costs of bought corn is 0.605, while the homegrown counterpart 7 The correlations between the boundary of the farm, the means, and variances of the average costs of bought and homegrown corn in a given county/year are presented in Online Appendix Table A1. is only 0.379. The average swine farm has 310 acres of farmland with operating revenue between C$400,000 and C$500,000. A positive constant one is added to all numerical data in our dataset to ensure the log-log models work properly.

EMPIRICAL FRAMEWORK
In this section, we discuss the main model, a log-log ordinary least square (OLS) estimation. We explain our strategy to identify the potential causal relationship using a monthly exchange rate as the instrumental variable. Additional identification strategies that ensure the robustness of our findings are also discussed.

Estimation strategy
From our theoretical model, we know that the optimal level of the farm boundary is a ratio. (See Equation 10.) Therefore, we choose log-log form OLS regression such that where is the dependent variable, the boundary of the swine farm in terms of corn production (i.e., the share of homegrown corn in the total corn required to feed the pigs on farm in year ), is a constant, the variables of interest are , 2 , , and 2 (i.e., the mean of the average corn prices on the local spot market for farm in year , the variance of the average corn prices on the local spot market for farm in year , the mean of the average costs of homegrown corn on farm in year , and the variance of the average costs of homegrown corn on farm in year , respectively), is a vector of control variables, and is an error term with mean zero.
Our purpose is to evaluate how the mechanism efficiency affects farm boundary by estimating 1 , 2 , 3 , and 4 . If , 2 , , and 2 were randomly assigned, the four estimated coefficientŝ1,̂2,̂3, and̂4 would measure the causal effect of a 1% increase of the variables of interest on the percentage change of the boundary of the average swine farm, respectively. The main null hypotheses are then 0 ∶ = 0, = 1, 2, 3, 4. We also test the theoretical predictions on the ratios of the marginal effects of the means and variances of corn prices/costs on the farm boundary. The null hypotheses are 1 0 ∶ 1 ∕ 3 = −1 and 2 0 ∶ 2 ∕ 4 = −(1 − )∕ .

Identification strategy
The factors that may potentially undermine the identification of are discussed in this section. They are (i) unobserved heterogeneity, (ii) measurement error, and (iii) reverse causality. First, we discuss the endogeneity that may be caused by unobserved heterogeneity. To tease out the effect of mechanism efficiency on farm boundary, we need to control other variables that may affect farm boundary. The reasons we choose the control variables in our model are as follows. The farm boundary may be affected by the number of pigs and the size of farmland. Swine farmers apply manure from pigs to their crop fields. It is possible some swine farmers may base the size of their farmland on available manure that correlates to the number of pigs. Capital availability may affect the expansion of farm boundary, as purchasing additional farmland for homegrown corn requires a significant amount of capital. Thus prime rates, which affect the cost of financing to buy additional farmland, are added. Machinery, which may influence the ability to expand farm boundary, is captured by the expenditure on machinery repair. It should be noted that swine farmers do have the option to rent additional farmland. This would allow them to adjust the farm boundary with less cost. The operation types of the swine farms may affect the farm boundary. Different operation types require different quantities of feed. A farrow-to-weaner swine farm, which requires less corn, may continue to buy from the market when corn prices are high, while a farrow-to-finish farm, which requires more feed, may turn to homegrown corn. Corn yield is added because it is a potential confounder that affects both corn price and the make-or-buy decision. Swine farms with high yield farmland may grow more corn. The county where the farm is located is also included to capture unobserved heterogeneity across counties. Any remaining heterogeneity to bias our estimate of must change systematically over time and is not captured by the variables on the right-hand side (RHS) of Equation (20).
The control variables and the county fixed effect would account for most of the heterogeneity. To eliminate the unobserved heterogeneity over time, we also estimate the main model with data from only 1 year. In this case, the unobserved heterogeneity that could potentially bias our estimate of must vary consistently in the same year in the same county across different farms and must not be included in our model. A farmer's risk attitude could be such an unobserved heterogeneity (Zheng, Vukina, & Shin, 2008). Note in our theoretical model that a farmer's risk attitude affects the farm boundary. Risk-averse swine farmers may prefer growing some or all of the corn by themselves. We have no direct control of risk attitude in our model. However, diversification and income may capture some of the effect from risk attitude. Riskaverse farmers are more likely to diversify their farm operations, and farmers become more risk tolerant as their incomes increase. To further control the effect of risk attitude, we estimate the main model using a subset of the data that tracks the same farms from 2003 to 2014. The risk attitude for these swine farmers should be relatively stable over time, especially after accounting for diversification index and income. Thus, the heterogeneity regarding risk attitude in this subset should be less compared to the entire dataset, as the observations are from the same farms in different years. Should unobserved risk attitude significantly bias our estimate of , the estimated coefficients from this subset will differ significantly from our main results.
It is impossible to account for all unobserved heterogeneities. We believe we have captured the key factors in our model. This belief is not groundless. We can verify the validity of it by examining the relationship between the estimated coefficients. If our model correctly depicts how the farm boundaries are formed, then we would fail to reject 1 0 and 2 0 . To do this, we estimate the main model with a randomly selected subset of swine farms from the entire dataset. This process is repeated times, which generates pairs of coefficients.
∕ and 2 ∕ 2 are calculated for each pair.
One-sample t-test is used to check whether the average of ∕ and 2 ∕ 2 is equal to its theoretical predictions, −1 and −(1 − )∕ , respectively. If the calculated ratios are not statistically different than the theoretical prediction, then the unobserved heterogeneities are less likely to be a problem. Next, we discuss the endogeneity from a measurement error. Recall that we assume 10 bushels of corn are required to feed one MHE. This assumption will not contaminate the estimate of . The reason is that corn required for an MHE is likely to be a constant. This is due to the wide adoption of artificial insemination (i.e., similar genetics), health status, and ration formulation. The pigs on the same swine farm are likely to be genetically identical, thus on average require a similar amount of feed per year. The magnitude of this constant would affect only the estimated intercept, not our coefficients of interest. The other potential measurement concern is that the dependent variable and control variables are farm-level data, while the treatment variables are the county-level data. Swine farmers in the same county may get different quotes on corn. However, our treatment variables are not corn prices at each transaction, but rather the distributional characteristics of the average prices/costs (mean and variance). Although the prices quoted to individual farmers may differ, it is likely that swine farmers in the same county are facing corn prices with similar mean and variance.
Recall that we use county-level corn prices during the harvest season as the average homegrown costs for individual farms. The lowest corn prices typically appear in the harvest season. Therefore, using county-level corn prices during the harvest season as the farm-level homegrown costs may underestimate the effect of the means and variances of homegrown corn costs on farm boundaries. That is |̂3| < | 3 | and |̂4| < | 4 |. This bias would make one less likely to reject the null hypotheses 3 and 4 , which means that rejection of these two hypotheses provides even stronger evidence. In this case, the estimated coefficients,̂3 and̂4, are the lower bound of the true effect. To further address this concern, we aggregate all farm-level data into county level and reestimate the main model as a robustness check.
Finally, we discuss the reverse causality that may contaminate the estimated coefficients. Our empirical model assumes that the mean and variance of prices of corn under different mechanisms affect farm boundary. However, it is plausible that farm boundary may affect the mean and variance of the input prices. Kim and Zheng (2015) show that as more production of hogs are guided by AMAs (i.e., the farm boundary expands), the spot prices of hogs decrease and the volatility of price increases. This is likely to be true when the volume of transactions via spot market is small. (Indeed, Kim & Zheng, 2015, show only 5.2% of hogs were transacted on the spot market in 2010.) However, this is less likely to be a problem in our case. The effect of the make-or-buy decisions by Ontario swine farmers on corn prices is unlikely to be significant.
To further investigate the potential causal relationship flowing from the mechanism efficiency to farm boundary, we estimate our main equation using the two-stage least squares (2SLS) method. The instrument for means and variances of the average corn prices under the two mechanisms is the monthly CAD/USD exchange rate. We explain our rationale for choosing monthly CAD/USD exchange rates as instrumental variables (IV) as follows. An ideal IV should be exogenous, TA B L E 2 Log-log OLS estimation results for the boundaries of swine farms: Mean, median, and minimum price during harvest season as cost of homegrown corn Note: Asterisks ***, **, and * denote significance at the 1%, 5%, and 10% levels, respectively. Column (1), (2), and (3) use the average, median, and minimum corn price during the harvest season as the cost of homegrown corn, respectively. correlated with our variables of interest, and uncorrelated with the dependent variables. First, the monthly exchange rate is affected by the demand and supply of Canadian dollars and U.S. dollars. Thus, it is plausibly exogenous to the means and variances of the corn prices under two mechanisms and is uncorrelated with the error term. Second, on relativity, monthly exchange rates should affect the corn prices in Ontario. The corn prices in Ontario are influenced by the corn price in the U.S. futures market, exchange rates, transportation cost, and other factors. The costs of homegrown corn may also be affected by the exchange rates as some of the farm inputs, such as equipment and fertilizer, are bought from the United States or priced in U.S. dollars. Third, the causal relationship between our dependent variable, farm boundaries, and the monthly exchange rates should flow in only one direction. It is unlikely that decisions on the farm boundary of Ontario swine farmers would affect CAD/USD exchange rates. The relationship between corn prices and IV is likely to be monotonic. As a result, our 2SLS specifications identify the local average treatment effects : the effects of the mechanism efficiency on farm boundaries that are caused by exchange rates. Placebo and falsification tests are conducted by (i) regressing farm boundary on the RHS variables in the main model where the four variables of interest are replaced by four randomly generated variables and (ii) regressing a randomly generated dependent variable on the original RHS variables.

ESTIMATION RESULTS AND DISCUSSION
The main results are presented in Table 2. The three columns report results when the mean, the median, and the minimum prices of corn during the harvest seasons are used to represent the average costs of homegrown corn. No matter how the costs of homegrown corn are measured, the general conclusions are the same: after controlling for farm operation type, county fixed effect, as well as other control variables, there is a significant correlation between the efficiency of transaction-facilitating mechanisms and farm boundaries. More specifically, (1) farm boundaries expand as the average price of corn under the market mechanism increases; (2) farm boundaries expand as the variability of corn prices under the market mechanism increases; (3) farm boundaries shrink as the average price of corn under the hierarchy mechanism increases; (4) farm boundaries shrink as the variability of the price of corn under the hierarchy mechanism increases. 8 These results clearly suggest that swine farmers make decisions at the margin. They are allocating the transactions of corn under two alternative transaction-facilitating mechanisms based on their efficiency. The mechanism that consistently (lower variance) yields output (corn) with lower cost was chosen. This is exactly the same as what we predicted in the previously developed theory. Table 3 presents the 2SLS regression results where the means and variances of daily exchange rates are used as the instrumental variables for the means and variances of the average costs under the two mechanisms. The instrumental variable for , 2 , , and 2 is used in columns (2) to (5), respectively. All four IVs are used in column (6). Despite the choice of the instrumental variable, the signs of all coefficients are consistent with the theoretical prediction. To mitigate the impact of extreme values of the share of homegrown corn, we restrict the analysis to a subset of farms whose share of homegrown corn is from 0 to 1. The 2SLS results of this subset, which are also consistent with our theory, can be found in the Online Appendix. The effect of the efficiency of the two transaction-facilitating mechanisms on farm boundaries appears to be robust. This suggests that the mechanism efficiency is not only associated with but may also cause the changes in farm boundaries.
To address the concern of multicollinearity, and are replaced by their ratio ∕ . 2 and 2 are replaced by 2 ∕ 2 . 9 The coefficients are similar to the main results, suggesting that multicollinearity is less likely to be an issue (see Table 4).
For robustness check, we aggregate the farm level data into county level. Farms in the same county with the same operation type in the same year are collapsed into one observation. The value for this one observation is the average of the values of all farms in the same county and with the same operation type. We also use median instead of average as the aggregation function to dampen the effect of extreme values. The results are presented in Table A2 in the Online Appendix. The coefficients of the means and variances of corn prices/costs from the two transaction-facilitating mechanisms are all statistically significant and are consistent with our main results. These results provide evidence that, at county level, farm boundaries are also associated with the efficiency of the transaction-facilitating mechanisms.
The estimated effects of mechanism efficiency on farm boundary are unlikely to be biased by the unobserved heterogeneity in a farmer's risk attitude. We estimate the main model with the swine farms that continuously operated from 2003 to 2014 (presented in columns (3) and (4) in Table A3 in the Online Appendix). Additionally, income levels, instead of the diversification index, are used as a proxy for risk attitude (presented in column (2) in Table A3). Comparing the results in columns (1) and (2) in Table A3, the effect of the mechanism efficiency on farm boundaries is similar no matter the proxy for risk attitude is the diversification index or income. When we use only the continuously operated swine farms, the estimated effect of the variance of prices on farm boundaries is similar to that from the entire dataset. The effect of the mean of prices on farm boundaries is not statistically significant. This is possibly due to the fact that, for the continuously operated swine farms, the means of the costs of homegrown corn are very similar to the means of the prices on the spot market. (See figures in the Online Appendix.) We change the historical data used to calculate the mean and variance of corn prices/costs under the two mechanisms from the last 4 years to the last 3 and the last 5 years for a robustness check (Table A4 in the Online Appendix). Except for the estimated effect of the variance of the costs for homegrown corn on farm boundaries, which is not statistically significant, all other estimates are statistically significant, and the signs align with the main model.
To ensure the length of harvest season assumed in the main model, October 15 to November 15 each year, is not affecting our main conclusion, we estimate the main model with different harvest season. The results show that our findings are robust regardless of various specifications on the length of the harvest season (Table A5 in the Online Appendix).
To further verify our results, we split our dataset into three groups by farm operation type. They are farrow-to-finish, mix, and farrow-to-weaner. The farrow-to-finish swine farms require the most feed, farrow-to-weaner farms require the 8 There is a special case: for farmers purchase corn at harvest, they face the same corn price and volatility as those produce corn in-house. For them = and 2 = 2 , and according to Equation (11), the optimal farm boundary would be 0.5, a constant. The existence of these farmers would impact the constant term of the regression results, not the coefficients for , , 2 , and 2 . We thank the reviewer for pointing out this interesting special case. 9 Multicollinearity test suggests Mean P buy and Mean P Make, Var P Buy and Var P Make are highly correlated. This is expected as Mean P Buy is corn price during non-harvest season, and Mean P Make is corn price during harvest season in the same year. After replacing Mean P Buy and Mean P Make with its ratio (Mean P Buy/Mean P Make), and replacing Var P Buy and Var P Make with its ratio (Var P Buy/Var P Make), multicollinearity is no longer detected. The Variance inflation factor (VIF) of Mean P Buy/Mean P Make and Var P Buy/ Var P Make is 1.45 and 2.75, all less than 5.
least feed, while mix farms are in the middle. Intuitively, the effect of mechanism efficiency on farm boundaries should weaken as the feed required decreases. As expected, the farrow-to-finish operations show the most significant effect of mechanism efficiency on farm boundaries (Table A6 column  signs, as expected, none of the four coefficients for the efficiency of mechanisms are statistically significant for farrow-toweaner farms.
The results for placebo and falsification tests are reported in the Online Appendix. As expected, the randomly generated numbers show no statistical significance in explaining farm boundaries. Similarly, the efficiency of transaction-facilitating mechanisms is not associated with randomly generated numbers.
We now recover the marginal effect of the efficiency of transaction-facilitating mechanisms on farm boundaries. 10 With an average farm boundary of 0.44, the marginal effects of the mean and variance of the average prices of bought corn, and the marginal effects of the mean and variance of the average costs of homegrown corn are 0.158 (i.e., 0.158 = . may all affect the switching process. However, the wider the price difference under the two mechanisms, the stronger the incentive for the farmers to switch. If the average variance of corn prices on the spot market is increased by 1, the average farm boundary would expand to 53.6% (i.e., 0.44 + 0.096). If the average variance of the cost of homegrown corn is increased by 1, the average farm boundary would shrink to 34.8% (i.e., 0.44 − 0.092). Not only higher price, but also higher price uncertainty induces swine farmers to adopt the hierarchical mechanism. This implies more demand for buying or renting farmland, resulting in higher farmland prices. Therefore, external factors inducing higher uncertainty in corn prices, such as the U.S. trade policies, may play an important role in shaping Ontario's local farmland prices by affecting livestock farmers' make-or-buy decisions on corn.
As previously mentioned, we can also verify our proposed theory by examining 1 0 and 2 0 . Our theory predicts that the ratio of the marginal effect of average prices/costs under different transaction-facilitating mechanisms should be −1. The empirical evidence from the main model in Table 2 column (1) yields −0.994 (i.e., −0.157∕0.158), almost identical to our theoretical prediction. Another prediction is that the ratio of the marginal effect of the variance of prices/costs under different mechanisms should be −1.27 (i.e., −(1 − )∕ = −(1 − 0.44)∕0.44). This is similar to −1 (i.e., −0.096∕0.096 ), the ratio calculated from our main empirical model. To further investigate this, we estimate the main model and calculate the ratios with a random subset of the data. This process is repeated 100 times. The estimated ratios of̂1∕̂3 ( = −1.002, = 0.11) are not statistically different from the theoretical prediction −1, (99) = −0.18, = 0.86. Also, the estimated ratios of̂2∕̂4 ( = −1.20, = 0.77) are not statistically different from the theoretical prediction −1.27, (99) = 0.87, = 0.39. These results provide additional empirical support to our theoretical model (see Figure I3 in the Online Appendix).
We attempt to quantify the magnitude of risk aversion of an average swine farmer in Ontario. Note from our theory that 2 ∕ = , where is the only unknown. Thus, we can recover which is estimated to be 0.000021. The typical Ontario swine farmer is likely to be risk-averse, in line with the findings in other studies (e.g., Hildreth & Knowles, 1982;De Brauw & Eozenou, 2014). Similar to Kahneman and Deaton (2010), this indicates that the association between well-being and income is no longer significant after a certain income level.

CONCLUSIONS
Defining the boundary of a livestock farm on corn as the percentage of homegrown corn in total corn required, the farmer can choose to expand the farm boundary to make more or to shrink the farm boundary to buy more corn. The transactions of bought corn are facilitated by the market mechanism, while the transactions of homegrown corn are facilitated by the hierarchical management mechanism. The efficiency of a transaction-facilitating mechanism is defined as its ability to consistently yield output at low cost (i.e., the mean and variance of output prices/costs are both low). We propose a theory that explains how the boundaries of the livestock farm are shaped by mechanism efficiency. Using farm-level tax filer data, we investigate the potential causal relationship flowing from the efficiency of the transaction-facilitating mechanisms (markets or hierarchies) to farm boundary. The results suggest that, as predicted by the proposed theory, the boundaries of swine farms in Ontario in terms of corn production are associated with the efficiency of the transactionfacilitating mechanisms. More specifically, the boundaries of Ontario swine farms expand when the market mechanism is less efficient, and the boundaries shrink when the hierarchical mechanism is less efficient. These results are robust when we measure mechanism efficiency in different ways (i.e., different lengths of historical data used to calculate efficiency; mean, median, or minimum corn price during the harvest season to represent the average cost of homegrown corn). They are also robust when we aggregate the farm-level data into the county-level data by the mean or by the median. Accounting for the risk attitude by the diversification index or income also does not change the main conclusion.
The identified relationship between farm boundaries and the efficiency of transaction-facilitating mechanisms is not only correlation but also is likely to be causality. First, placebo and falsification tests suggest that the identified relationship is unlikely to be spurious. Second, we split the data into groups by the farm-operating type and estimate the main model in each group. The results align with our expectation that the effect of mechanism efficiency on farm boundaries is more pronounced for swine farms that require more feed. Lastly, the CAD/USD monthly exchange rate is used as an instrument for the efficiency of the transaction-facilitating mechanisms. The 2SLS results suggest that the relative efficiency of mechanisms causes the shift in farm boundaries.
It is estimated that a $1 increase in the average market price of corn may increase the average percentage of homegrown corn by 15.8%. 11 If the variance of the market prices of corn is increased by 1, the share of homegrown corn may increase by 9.6%. The impact of the cost of homegrown corn on the share of homegrown corn is the same magnitude with the opposite sign.
Two policy implications need to be stressed. First, economic activities should be facilitated by the relatively more efficient institution. This institution could be market, hierarchy, contract, auction, other institutions, or a combination of them. The optimal combination is often the result of a lengthy adjustment (Zilberman, Lu, & Reardon, 2017). The dichotomy policy question of one or the other should be replaced by an understanding and appreciation for all mechanisms (Traversac, Rousset, & Perrier-Cornet, 2011;Williamson, 2005). This point is perhaps best illustrated by Deng Xiaoping, the chief architect of China's economic reforms: in choosing between the planned and market economy, he stated "It doesn't matter whether a cat is white or black, as long as it catches mice." Second, we show that in-house production expands under uncertainty. Policies aiming at enhancing stability, especially in developing countries, provide farmers confidence to rely on organizational choice besides in-house production. This allows more extensive division of labor and enables farmers to focus on things they are really good at. Specialization is often followed by efficiency gain. The policies that reduce uncertainty can improve the political-legal environments (Busse & Hefeker, 2007), facilitate market linkages (Shanoyan et al., 2014) or introduce alternative arrangements such as contract which is shown to improve welfare (Bellemare, 2012;Bellemare & Bloem, 2018).