Category Archives: Measures, Statistics & Technicalities

The two notions of amenities in spatial economics

Spatial economists use the word “amenity” in two imperfectly aligned ways. The first refers to place-specific services that are not explicitly transacted and hence do not directly appear in the budget constraint. The second refers to place-specific residuals because the researcher lacks relevant price or expenditure data. Sometimes these concepts are aligned, but they are far from synonymous.

These inconsistent notions co-exist in part because the phrase “urban amenity” is often used without being explicitly defined. Consider Jennifer Roback’s landmark 1982 JPE article, which “focuses on the role of wages and rents in allocating workers to locations with various quantities of amenities.” Roback estimates hedonic valuations of crime, pollution, cold weather, and clear days, which clearly satisfy the first definition since an individual cannot buy cleaner air or more sunny days except by changing places. But Roback (1982) never explicitly defines the word “amenity”.

Another 1982 publication, The Economics of Urban Amenities by Douglas B. Diamond and George S. Tolley, discusses the appropriate definition of amenities at length. They start with “an amenity may be defined a location-specific good”, but shortly warn that “such a concise definition also hides important nuances of the amenity concept that must be clearly understood before applying the concept to the full scope of urban and regional analysis.” Five pages of discussion follow. The crucial idea is that “amenities, like other goods, affect the level of either firm profits or household satisfactions. But, unlike for other goods, increments to amenities can be gained solely through a change in location.” This is in line with the first notion of an amenity.

In recent empirical work in urban economics, amenities are often residuals. Just as productivity is a residual that rationalizes output quantities given observed input quantities, amenities are residuals that rationalize residential choices given observed location characteristics. In Rebecca Diamond (2016), she defines “amenities broadly as all characteristics of a city which could influence the desirability of a city beyond local wages and prices.” This is sensible, but it is distinct from the first notion of an amenity. In particular, when available price data cover a smaller set of local goods and services, there is more residual variation that is labeled as an amenity. In a sufficiently data-scarce empirical setting, housing would be an amenity in the second sense.

The recent literature on “consumption amenities” or “retail amenities” illustrates the tension between the two definitions of amenities. Restaurant meals are often labeled a “consumption amenity”. Restaurant meals have a location-specific component: bigger cities have more varied restaurants, and households infrequently consume meals in other cities. But they are a non-traded service: they are excludable, priced, and enter the household budget constraint. More generally, the prices of traded goods vary across locations. Diamond and Tolley discuss this case: “a good may be excludable and thus rationed by price at a given location, but the price may vary across locations. In this case, it is the option to buy the good at a given price, and not the good itself, which is location-specific and thus an amenity.”

I have not seen trade economists treat “the option to buy the good at a given price” as an urban amenity. Rather, if one can write down, say, the CES price index for traded varieties, then one does not need to further value the option to buy a particular variety at a given price, because the CES price index incorporates this as spatial variation in the marginal utility of a dollar of traded goods consumption. Allen and Arkolakis (2014), for example, estimate local CES price indices and define amenities as utility shifters that do not appear in the budget constraint. Krugman (1991), a seminal contribution in which workers are attracted to locations with lower prices of traded goods, does not use the word “amenity” at all. In practice, of course, the price index is not perfectly observed, and so the residuals in quantitative spatial models that are labeled amenities also reflect unobserved price, variety, and quality variation.

Personally, I long ago internalized the first definition and instinctively treat the phrase “retail amenities” as an oxymoron. But I see why empirical applications must choose to either treat residuals as stochastic errors (e.g., measurement error) or give them a label like “amenities”. Hence the ambiguity when spatial economists use the word “amenity”.

Exact hat algebra concerns comparative statics, not calibration

The phrase “exact hat algebra” is used by trade and spatial economists far more often than it is clearly defined. In “Spatial Economics for Granular Settings” (September 2023), Felix Tintelnot and I aim to make clear that exact hat algebra is a means of conducting comparative statics, not a means of calibrating model parameters.

The phrase “exact hat algebra”, which I discussed in a 2018 blog post, is an extension of “hat algebra”. The latter phrase, per Alan Deardorff’s glossary entry, refers to “the Jones (1965) technique for comparative static analysis in trade models.” Jones (1965) presents local comparative statistics that leverage minimalist neoclassical assumptions (e.g., the Rybczynski theorem). By contrast, exact hat algebra delivers global comparative statics by exploiting full knowledge of the supply and demand curves (which is simple when these are constant-elasticity functions).

Both of these techniques are ways of presenting the comparative statics of a theoretical model. Exact hat algebra is not about identification or estimation per se. As Felix and I stress (page 7):

We emphasize the distinction between using the comparative statics defined by equations (5)-(7) to compute counterfactual outcomes and fitting the model’s parameters. Because equations (5)-(7) show that computing counterfactual outcomes only requires knowing the model’s parameters up to the point where the model delivers the shares lkn/L and ykn/Y, others have used the phrase “exact hat algebra” to refer to both rewriting the equations in hats and calibrating combinations of model parameters to rationalize observed shares. In fact, the system of equations defines counterfactual outcomes regardless of how one estimates or calibrates the parameters of the baseline equilibrium. The key question is how to fit the model’s parameters to data.

In our paper, Felix and I show how to fit a model of bilateral commuting flows in a variety of ways: regressing flows on observed bilateral covariates, using matrix approximations such as a rank-restricted singular value decomposition, or calibrating pair-specific cost parameters to replicate the shares observed in the raw data. These different methods produce different predictions about counterfactual outcomes because they produce different baseline equilibrium shares. But exact hat algebra defines the comparative statics of the model (with a continuum of individuals) for each of these parameterizations.

Classifying industries as traded or non-traded

This post follows up on my 2018 post, What economic activities are “tradable”?. Since then, I learned a bit more about this literature from Santiago Franco, a UChicago PhD student studying spatial variation in market power.

Delgado, Porter, and Stern (2016) build on Porter (2003) to divide industries into traded industries and local industries:

Porter (2003) examines the co-location patterns of narrowly defined service and manufacturing industries to define clusters, following the principle that co-location reveals the presence of linkages across industries. The methodology first distinguishes traded and local industries. Local industries are those that serve primarily the local markets (e.g., retail), whose employment is evenly distributed across regions in proportion to regional population. Traded industries are those that are more geographically concentrated and produce goods and services that are sold across regions and countries. The set of traded industries excludes natural-resource-based industries, whose location is tied to local resource availability (e.g., mining).

This approach use a combination of high employment specialization and high concentration across BEA regions to classify industries. One advantage of this classification relative to the Mian and Sufi classification mentioned in my previous post is that its classification of NAICS 6-digit industries into local and traded is exhaustive.

Of course, there are shortcomings and difficulties involved in declaring every industry to be “traded” or not. “Tradable” and “traded” are not exactly synonymous: goods may be tradable but not traded because of the pattern of comparative advantage or weak scale economies, for example.

Here’s one example where I think the classification is troublesome: the Cluster Mapping Project says that all 39 6-digit industries within NAICS 62 “Health Care and Social Assistance” are non-traded. Meanwhile, I’ve written paper on “Market Size and Trade in Medical Services“. Using Medicare claims data, we document that “imported” medical care — services produced by a medical provider in a different region — constitute about one-fifth of US healthcare consumption!

April 2024 update: Also relevant is a recent working paper by Simcha Barkai and Ezra Karger, “Classifying Industries into Tradable/Nontradable via Geographic Radius Served“.

Minnesota is special, economic geography edition

Minnesota is special in many dimensions. The residents will tell you about 14,000+ lakes. The resident macroeconomists will tell you about the four horsemen. Here are two ways that Minnesota is distinctive in terms of the data describing its economic geography.

In the LEHD Origin-Destination Employment Statistics (LODES) data, Minnesota is the only state that reports employment by establishment rather than firm. Graham, Kutzbach, and McKenzie (2014):

For multi-establishment employers, establishments are not assigned to jobs in the source data except for in Minnesota. The LEHD program uses an imputation model with parameters based on the Minnesota data to draw establishments for workers at multiunit employers. An establishment is more likely to be assigned to a worker when it is large and close to that worker’s residential location (based on great-circle distance between address coordinates).

In Minnesota, local government can get pretty local. For example, the mayor of Funkley, MN owns its only business: a bar that also hosts the town council meetings. In Census lingo, legally defined county subdivisions are called minor civil divisions. Minnesota has many. In 2010, the Census Bureau defined 35,703 county subdivisions in the United States. Minnesota had 2,760 of them. That’s more than any other state.

Thought experiments that exact hat algebra can and cannot compute

Among other things, I’m teaching the Eaton-Kortum (2002) model and “exact hat algebra” to my PhD class tomorrow. Last year, my slides said “this model’s counterfactual predictions can be obtained without knowing all parameter values by a procedure that we now call ‘exact hat algebra’.” Not anymore. Only some of its counterfactual predictions can be attained via that technique.

As I reviewed in a 2018 blog post, when considering a counterfactual change in trade costs (and no change in exogenous productivities nor population sizes), the exact-hat-algebra calculation requires only the trade elasticity and initial trade flows in order to solve for the endogenous proportionate wage changes associated with any choice of exogenous proportionate trade-cost changes.

In Section 6.1 of Eaton and Kortum (2002), the authors consider two counterfactual scenarios that speak to the gains from trade. The first raises trade costs to their autarkic levels (“dni goes to infinity”). The second eliminates trade costs (“dni goes to one”). Exact hat algebra can be used to compute the first counterfactual; see Costinot and Rodriguez-Clare (2014) for a now-familiar exposition or footnote 42 in EK (setting α = β = 1). The second counterfactual cannot be computed by exact hat algebra.

One cannot compute the “zero-gravity” counterfactual of Eaton and Kortum (2002) using exact hat algebra because this would require one to know the initial levels of trade costs. To compute the proportionate change in trade costs associated with the dni=1 counterfactual, one would need to know the values of the “factual” dni. The exact hat algebra procedure doesn’t identify these values. Exact hat algebra allows one to compute proportionate changes in endogenous prices in an underidentified model by leveraging implicit combinations of parameter values that rationalize the observed initial equilibrium without separately identifying them.

Exact hat algebra requires only the trade elasticity and the initial trade matrix (including expenditures on domestically produced goods). That’s not enough to identify the model’s parameters. (If these moments alone sufficed to identify bilateral trade costs, the Head-Ries index that only computes their geometric mean wouldn’t be necessary.) Thus, one can only use exact hat algebra to compute outcomes for counterfactual scenarios that don’t require full knowledge of the model’s parameter values. One can express the autarky counterfactual in proportionate changes (“d-hat is infinity”), but one cannot define the proportionate change in trade costs for the “zero-gravity” counterfactual without knowing the initial levels of trade costs. There are some thought experiments that exact hat algebra cannot compute.

Update (5 Oct): My comment about the contrast between the two counterfactuals in section 6.1 of Eaton and Kortum (2002) turns out to be closely related to the main message of Waugh and Ravikumar (2016). They and Eaton, Kortum, Neiman (2016) both show ways to compute the frictionless or “zero-gravity” equilibria when using additional data (namely, prices or price deflators). See also footnote 7 of Sposi, Santacreu, Ravikumar (2019), which is attached to the sentence “Note that reductions of trade costs (dij − 1) require knowing the initial value of dij.”

Spatial Economics for Granular Settings

Economists studying spatial connections are excited about a growing body of increasingly fine spatial data. We’re no longer studying country- or city-level aggregates. For example, many folks now leverage satellite data, so that their unit of observation is a pixel, which can be as small as only 30 meters wide. See Donaldson and Storeygaard’s “The View from Above: Applications of Satellite Data in Economics“. Standard administrative data sources like the LEHD publish neighborhood-to-neighborhood commuting matrices. And now “digital exhaust” extracted from the web and smartphones offers a glimpse of behavior not even measured in traditional data sources. Dave Donaldson’s keynote address on “The benefits of new data for measuring the benefits of new transportation infrastructure” at the Urban Economics Association meetings in October highlighted a number of such exciting developments (ship-level port flows, ride-level taxi data, credit-card transactions, etc).

But finer and finer data are not a free lunch. Big datasets bring computational burdens, of course, but more importantly our theoretical tools need to keep up with the data we’re leveraging. Most models of the spatial distribution of economic activity assume that the number of people per place is reasonably large. For example, theoretical results describing space as continuous formally assume a “regular” geography so that every location has positive population. But the US isn’t regular, in that it has plenty of “empty” land: more than 80% of the US population lives on only 3% of its land area. Conventional estimation procedures aren’t necessarily designed for sparse data sets. It’s an open question how well these tools will do when applied to empirical settings that don’t quite satisfy their assumptions.

Felix Tintelnot and I examine one aspect of this challenge in our new paper, “Spatial Economics for Granular Settings“. We look at commuting flows, which are described by a gravity equation in quantitative spatial models. It turns out that the empirical settings we often study are granular: the number of decision-makers is small relative to the number of economic outcomes. For example, there are 4.6 million possible residence-workplace pairings in New York City, but only 2.5 million people who live and work in the city. Applying the law of large numbers may not work well when a model has more parameters than people.

Felix and I introduce a model of a “granular” spatial economy. “Granular” just means that we assume that there are a finite number of individuals rather than an uncountably infinite continuum. This distinction may seem minor, but it turns out that estimated parameters and counterfactual predictions are pretty sensitive to how one handles the granular features of the data. We contrast the conventional approach and granular approach by examining these models’ predictions for changes in commuting flows associated with tract-level employment booms in New York City. When we regress observed changes on predicted changes, our granular model does pretty well (slope about one, intercept about zero). The calibrated-shares approach (trade folks may know this as “exact hat algebra“), which perfectly fits the pre-event data, does not do very well. In more than half of the 78 employment-boom events, its predicted changes are negatively correlated with the observed changes in commuting flows.

The calibrated-shares procedure’s failure to perform well out of sample despite perfectly fitting the in-sample observations may not surprise those who have played around with machine learning. The fundamental concern with applying a continuum model to a granular setting can be illustrated by the finite-sample properties of the multinomial distribution. Suppose that a lottery allocates I independently-and-identically-distributed balls across N urns. An econometrician wants to infer the probability that any ball i is allocated to urn n from observed data. With infinite balls, the observed share of balls in urn n would reveal this probability. In a finite sample, the realized share may differ greatly from the underlying probability. The figure below depicts this ratio for one urn when I balls are distributed across 10 urns uniformly. A procedure that equates observed shares and modeled probabilities needs this ratio to be one. As the histograms reveal, the realized ratio can be far from one even when there are two orders of magnitude more balls than urns. Unfortunately, in many empirical settings in which spatial models are calibrated to match observed shares, the number of balls (commuters) and the number of urns (residence-workplace pairs) are roughly the same. The red histogram suggests that shares and probabilities will often differ substantially in these settings.

Balls and 10 urns: Histogram of realized share divided by underlying probability

Balls and 10 urns: Histogram of realized share divided by underlying probability

Granularity is also a reason for economists to be cautious about their counterfactual exercises. In a granular world, equilibrium outcomes depend in part of the idiosyncratic components of individuals’ choices. Thus, the confidence intervals reported for counterfactual outcomes ought to incorporate uncertainty due to granularity in addition to the usual statistical uncertainty that accompanies estimated parameter values.

See the paper for more details on the theoretical model, estimation procedure, and event-study results. We’re excited about the growing body of fine spatial data used to study economic outcomes for regions, cities, and neighborhoods. Our quantitative model is designed precisely for these applications.

Do customs duties compound non-tariff trade costs? Not in the US

For mathematical convenience, economists often assume iceberg trade costs when doing quantitative work. When tackling questions of trade policy, analysts must distinguish trade costs from import taxes. For the same reason that multiplicative iceberg trade costs are tractable, in these exercises it is easiest to model trade costs as the product of non-policy trade costs and ad valorem tariffs. For example, when studying NAFTA, Caliendo and Parro (2015) use the following formulation:

Caliendo and Parro (REStud, 2015), equation (3)

This assumption’s modeling convenience is obvious, but do tariff duties actually compound other trade costs? The answer depends on the importing country. Here’s Amy Porges, a trade attorney, answering the query on Quora:

Tariff rates in most countries are levied on the basis of CIF value (and then the CIF value + duties is used as the basis for border adjustments for VAT or indirect taxes). CIF value, as Mik Neville explains, includes freight cost. As a result, a 5% tariff rate results in a higher total amount of tariffs on goods that have higher freight costs (e.g. are shipped from more distant countries).

The US is one of the few countries where tariffs are applied on the basis of FOB value. Why? Article I, section 9 of the US Constitution provides that “No Preference shall be given by any Regulation of Commerce or Revenue to the Ports of one State over those of another”, and this has been interpreted as requiring that the net tariff must be the same at every port. If a widget is loaded in Hamburg and shipped to NY, its CIF price will be different than if it were shipped to New Orleans or San Francisco. However the FOB price of the widget shipped from Hamburg will be the same regardless of destination.

Here’s a similar explanation from Neville Peterson LLP.

On page 460 of The Law and Policy of the World Trade Organization, we learn that Canada and Japan also take this approach.

Pursuant to Article 8.2, each Member is free either to include or to exclude from the customs value of imported goods: (1) the cost of transport to the port or place of importation; (2) loading, unloading, and handling charges associated with the transport to the port of place or importation; and (3) the cost of insurance. Note in this respect that most Members take the CIF price as the basis for determining the customs value, while Members such as the United States, Japan and Canada take the (lower) FOB price.

While multiplicative separability is a convenient modeling technique, in practice ad valorem tariff rates don’t multiply other trade costs for two of the three NAFTA members.

Shift-share designs before Bartik (1991)

The phrase “Bartik (1991)” has become synonymous with the shift-share research designs employed by many economists to investigate a wide range of economic outcomes. As Baum-Snow and Ferreira (2015) describe, “one of the commonest uses of IV estimation in the urban and regional economics literature is to isolate sources of exogenous variation in local labor demand. The commonest instruments for doing so are attributed to Bartik (1991) and Blanchard and Katz (1992).”

The recent literature on the shift-share research design usually starts with Tim Bartik’s 1991 book, Who Benefits from State and Local Economic Development Policies?. Excluding citations of Roy (1951) and Jones (1971), Bartik (1991) is the oldest work cited in Adao, Kolesar, Morales (QJE 2019). The first sentence of Borusyak, Hull, and Jaravel’s abstract says “Many studies use shift-share (or “Bartik”) instruments, which average a set of shocks with exposure share weights.”

But shift-share analysis is much older. A quick search on Google Books turns up a bunch of titles from the 1970s and 1980s like “The Shift-share Technique of Economic Analysis: An Annotated Bibliography” and “Dynamic Shift‐Share Analysis“.

Why the focus on Bartik (1991)? Goldsmith-Pinkham, Sorkin, and Swift, whose paper’s title is “Bartik Instruments: What, When, Why and How”, provide some explanation:

The intellectual history of the Bartik instrument is complicated. The earliest use of a shift-share type decomposition we have found is Perloff (1957, Table 6), which shows that industrial structure predicts the level of income. Freeman (1980) is one of the earliest uses of a shift-share decomposition interpreted as an instrument: it uses the change in industry composition (rather than differential growth rates of industries) as an instrument for labor demand. What is distinctive about Bartik (1991) is that the book not only treats it as an instrument, but also, in the appendix, explicitly discusses the logic in terms of the national component of the growth rates.

I wonder what Tim Bartik would make of that last sentence. His 1991 book is freely available as a PDF from the Upjohn Institute. Here is his description of the instrumental variable in Appendix 4.2:

In this book, only one type of labor demand shifter is used to form instrumental variables2: the share effect from a shift-share analysis of each metropolitan area and year-to-year employment change.3 A shift-share analysis decomposes MSA growth into three components: a national growth component, which calculates what growth would have occurred if all industries in the MSA had grown at the all-industry national average; a share component, which calculates what extra growth would have occurred if each industry in the MSA had grown at that industry’s national average; and a shift component, which calculates the extra growth that occurs because industries grow at different rates locally than they do nationally…

The instrumental variables defined by equations (17) and (18) will differ across MSAs and time due to differences in the national economic performance during the time period of the export industries in which that MSA specializes. The national growth of an industry is a rough proxy for the change in national demand for its products. Thus, these instruments measure changes in national demand for the MSA’s export industries…

Back in Chapter 7, Bartik writes:

The Bradbury, Downs, and Small approach to measuring demand-induced growth is similar to the approach used in this book. Specifically, they used the growth in demand for each metropolitan area’s export industries to predict overall growth for the metropolitan area. That is, they used the share component of a shift-share analysis to predict overall growth.

Hence, endnote 3 of Appendix 4.2 on page 282:

This type of demand shock instrument was previously used in the Bradbury, Downs and Small (1982) book; I discovered their use of this instrument after I had already come up with my approach. Thus, I can only claim the originality of ignorance for my use of this type of instrument.

Tim once tweeted:

Researchers interested in “Bartik instrument” (which is not a name I coined!) might want to look at appendix 4.2, which explains WHY this is a good instrument for local labor demand. I sometimes sense that people cite my book’s instrument without having read this appendix.

Update (10am CT): In response to my query, Tim has posted a tweetstorm describing Bradbury, Downs, and Small (1982).

What share of US manufacturing firms export?

What share of US manufacturing firms export? That’s a simple question. But my answer recently changed by quite a lot. While updating one of my class slides that is titled “very few firms export”, I noticed a pretty stark contrast between the old and new statistics I was displaying. In the table below, the 2002 numbers are from Table 2 of Bernard, Jensen, Redding, and Schott (JEP 2007), which reports that 18% of US manufacturing firms were exporters in 2002. The 2007 numbers are from Table 1 of Bernard, Jensen, Redding, and Schott (JEL 2018), which reports that 35% of US manufacturing firms were exporters in 2007.

NAICS Description Share of firms Exporting firm share Export sales share of exporters
2002 2007 2002 2007 2002 2007
311 Food Manufacturing 6.8 6.8 12 23 15 21
312 Beverage and Tobacco Product 0.7 0.9 23 30 7 30
313 Textile Mills 1.0 0.8 25 57 13 39
314 Textile Product Mills 1.9 2.7 12 19 12 12
315 Apparel Manufacturing 3.2 3.6 8 22 14 16
316 Leather and Allied Product 0.4 0.3 24 56 13 19
321 Wood Product Manufacturing 5.5 4.8 8 21 19 09
322 Paper Manufacturing 1.4 1.5 24 48 9 06
323 Printing and Related Support 11.9 11.1 5 15 14 10
324 Petroleum and Coal Products 0.4 0.5 18 34 12 13
325 Chemical Manufacturing 3.1 3.3 36 65 14 23
326 Plastics and Rubber Products 4.4 3.9 28 59 10 11
327 Nonmetallic Mineral Product 4.0 4.3 9 19 12 09
331 Primary Metal Manufacturing 1.5 1.5 30 58 10 31
332 Fabricated Metal Product 19.9 20.6 14 30 12 09
333 Machinery Manufacturing 9.0 8.7 33 61 16 15
334 Computer and Electronic Product 4.5 3.9 38 75 21 28
335 Electrical Equipment, Appliance 1.7 1.7 38 70 13 47
336 Transportation Equipment 3.4 3.4 28 57 13 16
337 Furniture and Related Product 6.4 6.5 7 16 10 14
339 Miscellaneous Manufacturing 9.1 9.3 2 32 15 16
Aggregate manufacturing 100 100 18 35 14 17

 

Did a huge shift occur between 2002 and 2007? No. The difference between these two tables is due to a change in the data source used to identify whether a firm exports. In their 2007 JEP article, BJRS used a question about export sales in the Census of Manufactures (CM). In their 2018 JEL article, BJRS used customs records from the Longitudinal Firm Trade Transactions database (LFTTD) that they built. Footnote 23 of the latter article notes that “the customs records from LFTTD imply that exporting is more prevalent than would be concluded based on the export question in the Census of Manufactures.”

This is a bit of an understatement: only about half of firms that export in customs records say that they export when asked about it in the Census of Manufactures! [This comparison is inexact because the share of exporting firms may have really increased from 2002 to 2007, but BJRS (2018) say that they “find a relatively similar pattern of results for 2007 as for 2002” when they use the CM question for both years.] The typical three-digit NAICS industry has the share of firms that export roughly double when using customs data rather than the Census of Manufactures survey response. Who knows what happened in “Miscellaneous Manufacturing” (NAICS 339), which had 2% in the 2002 CM and 35% in the 2007 LFTTD.

I presume that the customs records are more reliable than the CM question. More firms are exporters than I previously thought!

On “hat algebra”

This post is about “hat algebra” in international trade theory. Non-economists won’t find it interesting.

What is “hat algebra”?

Alan Deardorff’s Glossary of International Economics defines “hat algebra” as

The Jones (1965) technique for comparative static analysis in trade models. Totally differentiating a model in logarithms of variables yields a linear system relating small proportional changes (denoted by carats (^), or “hats”) via elasticities and shares. (As published it used *, not ^, due to typographical constraints.)

The Jones and Neary (1980) handbook chapter calls it a circumflex, not a hat, when explaining its use in proving the Stolper-Samuelson theorem:

a given proportional change in commodity prices gives rise to a greater proportional change in factor prices, such that one factor price unambiguously rises and the other falls relative to both commodity prices… the changes in the unit cost and hence in the price of each commodity must be a weighted average of the changes in the two factor prices (where the weights are the distributive shares of the two factors in the sector concerned and a circumflex denotes a proportional change)… Since each commodity price change is bounded by the changes in both factor prices, the Stolper-Samuelson theorem follows immediately.

I’m not sure when “hat algebra” entered the lexicon, but by 1983 Brecher and Feenstra were writing “Eq. (20) may be obtained directly from the familiar ‘hat’ algebra of Jones (1965)”.

What is “exact hat algebra”?

Nowadays, trade economists utter the phrase “exact hat algebra” a lot. What do they mean? Dekle, Eaton, and Kortum (2008) describe a procedure:

Rather than estimating such a model in terms of levels, we specify the model in terms of changes from the current equilibrium. This approach allows us to calibrate the model from existing data on production and trade shares. We thereby finesse having to assemble proxies for bilateral resistance (for example, distance, common language, etc.) or inferring parameters of technology.

Here’s a simple example of the approach. Let’s do a trade-cost counterfactual in an Armington model with labor endowment L, productivity shifter \chi, trade costs \tau, and trade elasticity \epsilon. The endogenous variables are wage w, income Y = w \cdot L, and trade flows X_{ij}. The two relevant equations are the market-clearing condition and the gravity equation.

Suppose trade costs change from \tau_{ij} to \tau'_{ij}, a shock \hat{\tau}_{ij} \equiv \frac{\tau'_{ij}}{\tau_{ij}}. By assumption, \hat{\chi}=\hat{L}=1. We’ll solve for the endogenous variables \hat{\lambda}_{ij}, \hat{X}_{ij} and \hat{w}_{i}. Define “sales shares” by \gamma_{ij}\equiv\frac{X_{ij}}{Y_{i}}. Algebraic manipulations deliver a “hat form” of the market-clearing condition.

Similarly, let’s obtain “”hat form” of the gravity equation.

Combining equations (1.1) and (1.2) under the assumptions that \hat{Y}_{i}=\hat{X}_{i} and \hat{\chi}=\hat{L}=1, we obtain a system of equations characterizing an equilibrium \hat{w}_i as a function of trade-cost shocks \hat{\tau}_{ij}, initial equilibrium shares \lambda_{ij}, and \gamma_{ij}, and the trade elasticity \epsilon:

If we use data to pin down \epsilon, \lambda_{ij}, and \gamma_{ij}, then we can feed in trade-cost shocks \hat{\tau} and solve for \hat{w} to compute the predicted responses of \lambda'_{ij}.

Why is this “exact hat algebra”? When introducing material like that above, Costinot and Rodriguez-Clare (2014) say:

We refer to this approach popularized by Dekle et al. (2008) as “exact hat algebra.”… One can think of this approach as an “exact” version of Jones’s hat algebra for reasons that will be clear in a moment.

What is “calibrated share form”?

Dekle, Eaton, and Kortum (AERPP 2007, p.353-354; IMF Staff Papers 2008, p.522-527) derive the “exact hat algebra” results without reference to any prior work. Presumably, Dekle, Eaton, and Kortum independently derived their approach without realizing a connection to techniques used previously in the computable general equilibrium (CGE) literature. The CGE folks call it “calibrated share form”, as noted by Ralph Ossa and Dave Donaldson.

A 1995 note by Thomas Rutherford outlines the procedure:

In most large-scale applied general equilibrium models, we have many function parameters to specify with relative ly few observations. The conventional approach is to calibrate functional parameters to a single benchmark equilibrium… Calibration formulae for CES functions are messy and difficult to remember. Consequently, the specification of function coefficients is complicated and error-prone. For applied work using calibrated functions, it is much easier to use the “calibrated share form” of the CES function. In the calibrated form, the cost and demand functions explicitly incorporate

  • benchmark factor demands
  • benchmark factor prices
  • the elasticity of substitution
  • benchmark cost
  • benchmark output
  • benchmark value shares

Rutherford shows that the CES production function y(K,L) = \gamma \left(\alpha K^{\rho} + (1-\alpha)L^{\rho}\right)^{1/\rho} can be calibrated relative to a benchmark with output \bar{y}, capital \bar{K}, and labor \bar{L} as y = \bar{y} \left[\theta \left(\frac{K}{\bar{K}}\right)^{\rho} + (1-\theta)\left(\frac{L}{\bar{L}}\right)^{\rho}\right]^{1/\rho}, where \theta is the capital share of factor income. If we introduce “hat notation” with \hat{y} = y/\bar{y}, we get \hat{y} = \left[\theta \hat{K}^{\rho} + (1-\theta)\hat{L}^{\rho}\right]^{1/\rho}. Similar manipulations of the rest of the equations in the model delivers a means of computing counterfactuals in the CGE setting.