Tuesday, August 18, 2015

Daily or monthly weather data?

We’ve had a few really hot days here in California. It won’t surprise readers of this blog to know the heat has made Marshall unusually violent and Sol unusually unproductive. They practice what they preach. Apart from that, it’s gotten me thinking back to a common issue in our line of work - getting “good” measures of heat exposure. It’s become quite popular to be as precise as possible in doing this – using daily or even hourly measures of temperature to construct things like ‘extreme degree days’ or ‘killing degree days’ (I don’t really like the latter term, but that’s beside the point for now).

I’m all for precision when it is possible, but the reality is that in many parts of the world we still don’t have good daily measures of temperature, at least not for many locations. But in many cases there are more reliable measures of monthly than daily temperatures. For example, the CRU has gridded time series of monthly average max and min temperature at 0.5 degree resolution.

It seems a common view is that you can’t expect to do too well with these “coarse” temporal aggregates. But I’m going to go out on a limb and say that sometimes you can. Or at least I think the difference has been overblown, probably because many of the comparisons between monthly and daily weather show the latter working much better. But I think it’s overlooked that most comparisons of regressions using monthly and daily measures of heat have not been a fair fight.

What do I mean? On the one hand, you typically have the daily or hourly measures of heat, such as extreme degree days (EDD) or temperature exposure in individual bins of temperature. Then they enter into some fancy pants model that fits a spline or some other flexible function that capture all sorts of nonlinearities and asymmetries. Then on the other hand, for comparison you have a model with a quadratic response to growing season average temperature. I’m not trying to belittle the fancy approaches (I bin just as much as the next guy), but we should at least give the monthly data a fighting chance. We often restrict it to growing season rather than monthly averages, often using average daily temperatures rather than average maximums and minimums, and, most importantly, we often impose symmetry by using a quadratic. Maybe this is just out of habit, or maybe it’s the soft bigotry of low expectations for those poor monthly data.

As an example, suppose, as we’ve discussed in various other posts, that the best predictor of corn yields in the U.S. is exposure to very high temperatures during July. In particular, suppose that degree days above 30°C (EDD) is the best. Below I show the correlation of this daily measure for a site in Iowa with various growing season and monthly averages. You can see that average season temperature isn’t so good, but July average is a bit better, and July average daily maximum even better. In other words, if a month has a lot of really hot days, then that month's average daily maximum is likely to be pretty high.

You can also see that the relationship isn’t exactly linear. So a model with yields vs. any of these monthly or growing season averages likely wouldn’t do as well as EDD if the monthly data entered in as a linear or quadratic response. But as I described in an old post that I’m pretty sure no one has ever read, one can instead define simple assymetric hinge functions based on monthly temperature and rainfall. In the case of U.S. corn, I suggested these three based on a model fit to simulated data:

This is now what I’d consider more of a fair fight between daily and monthly data. The table below is from what I posted before. It compares the out-of-sample skill of a model using two daily-based measures (GDD and EDD), to a model using the three monthly-based hinge functions above. Both models include county fixed effects and quadratic time trends. In this particular case, the monthly model (3) even works slightly better than the daily model (2). I suspect the fact it’s even better relates less to temperature terms than to the fact that model (2) uses a quadratic in growing season rainfall, which is probably less appropriate than the more assymetric hinge function – which says yields respond up to 450mm of rain and are flat afterwards.

Calibration R2
Average root mean square error for calibration
Average root mean square error for out-of-sample data
 (for 500 runs)
% reduction in out-of-sample error

Overall, the point is that monthly data may not be so much worse than daily for many applications. I’m sure we can find some examples where it is, but in many important examples it won’t be. I think this is good news given how often we can’t get good daily data. Of course, there’s a chance the heat is making me crazy and I’m wrong about all this. Hopefully at least I've provoked the others to post some counter-examples. There's nothing like a good old fashioned conflict on a hot day.

Friday, August 7, 2015

US weather and corn yields 2015.

Here's the annual update on weather in the US, averaged over the areas where corn is grown.  The preferred model by Michael Roberts and myself [paper] splits daily temperature into beneficial moderate heat (degree days 10-29C, or 50-84F) and harmful extreme heat (degree days above 29C, or 84F). These two variables (especially the one on extreme heat) are surprisingly powerful predictors of annual corn yields.  So how does 2015 look like? Below are the numbers through the end of July.

First, here's the cumulative occurrence of extreme heat for March 1st, 2015 - July 31, 2015. The grey dashed lines are annual time series from 1950-2011, the black line is the average (1950-2010), and the colored lines show the last four years.  2012 (blue) was very hot and had very low yields as predicted by the model.  On the other hand, 2014 (green) had among the lowest number of harmful extreme degree days. The current year, 2015 (magenta line), comes in slightly below normal so far.

Second, beneficial moderate heat is above average. Usually the two are positively correlated (when extreme heat is above normal, so is moderate heat). Lower-than average harmful extreme heat and above-average beneficial moderate heat suggests that we should see another above-average year in terms of crop yields (Qualification: August is still outstanding and farmers planted late this year in many areas due to the cold winter, suggesting that August might be more important than usual). This is supported by the fact that corn futures have been coming down lately.

Finally, Kyle Meng and Solomon Hsiang have just pointed out to me that the very strong El Nino signal likely suggests that other parts of the global will see significant production shortfalls, so hopefully some of this can be mitigated by higher than average US yields - the power of trade.

Tuesday, August 4, 2015

Answering Matthew Kahn's questions about climate adaptation

Matt has taken the bait and asked me a five good questions about my snarky, contrarian post on climate adaptation.  Here are his questions and my answers.

Question 1.  This paper will be published soon by the JPE. Costinot, Arnaud, Dave Donaldson, and Cory B. Smith. Evolving comparative advantage and the impact of climate change in agricultural markets: Evidence from 1.7 million fields around the world. No. w20079. National Bureau of Economic Research, 2014.  http://www10.iadb.org/intal/intalcdi/PE/2014/14183.pdf

It strongly suggests that adaptation will play a key role protecting us. Which parts of their argument do you reject and why?

Answer:  This looks like a solid paper, much more serious than the average paper I get to review, and I have not yet studied it.  I’m slow, so it would take me awhile to unpack all the details and study the data and model.  Although, from a quick look, I think there are a couple points I can make right now. 

First, and most importantly, I think we need to be clear about the differences between (i) adaptation (ii) price response and trade; (iii) innovation that would happen anyway; (iv) climate-change-induced innovation; (v) and price-induced innovation.  I’m pretty sure this paper is mainly about (ii), not about adaptation as conventionally defined within literature, although there appears to be some adaptation too.  I need to study this much more to get a sense of the different magnitudes of elasticities they estimate, and whether I think they are plausible given the data.

To be clear: I think adaptation, as conventionally defined, pertains to changing production behavior when changing climate while holding all other factors (like prices, trade, technology, etc.) constant.  My annoyance is chiefly that people are mixing up concepts.  My second annoyance is that too many are perpetually optimistic--some economists wear it like a badge, and I don’t think evidence or history necessarily backs up that optimism.

Question 2. If farmers know that they face uncertain risks due to climate change, what portfolio choices can they engage in to reduce the variability of their earnings? What futures markets exist to allow for hedging? If a risk averse economic agent knows "that he does not know" what ambiguous risks she faces, she will invest in options to protect herself. Does your empirical work capture this medium term investment rational plan? Or do you embrace the Berkeley behavioral view of economic agents as myopic?

Some farmers have subsidized crop insurance (nearly all in the U.S. do). But I don't think insurance much affects production choices at all. Futures markets seem to “work” pretty well and could be influenced by anticipated climate change.  We actually use a full-blown rational expectations model to estimate how much they might be affected by anticipated climate change right now: about 2% higher than they otherwise would be. 

Do I think people are myopic? Very often, yes.  Do I think markets are myopic?  By and large, no, but maybe sometimes.  I believe less in bubbles than Robert Shiller, even though I'm a great admirer of his work.  Especially for commodity markets (if not the marcoeconomy) I think rational expectations models are a good baseline for thinking about commodity prices, very much including food commodity prices.  And I think rational expectations models can have other useful purposes, too.  I actually do think the Lucas enterprise has created some useful tools, even if I find the RBC center of macro more than a bit delusional.

I think climate and anticipated climate change will affect output (for good and bad), which will affect prices, and that prices will affect what farmers plant, where they plant it, and trade.  But none of this, I would argue, is what economists conventionally refer to as adaptation.  A little more on response to price below...

Again, my beef with the field right now is that we are too blase about miracle of adaptation.  It’s easy to tell horror stories that the data cannot refute.  Much of economist tribe won’t look there—it feels taboo.  JPE won’t publish such an article. We have blinders on when uncertainty is our greatest enemy.

Question 3. If specific farmers at specific locations suffer, why won't farming move to a new area with a new comparative advantage? How has your work made progress on the "extensive margin" of where we grow our food in the future?

The vast majority of arable land is already cropped.  That which isn’t is in extremely remote and/or politically difficult parts of Africa.  Yes, there will be substitution and shifting of land.  But these shifts will come about because of climate-induced changes in productivity.  In other words, first-order intensive margin effects will drive second-order extensive margin effects.  The second order effects—some land will move into production, some out--will roughly amount to zero.  That’s what the envelope theorem says.  To a first approximation, adaptation in response to climate change will have zero aggregate effect, not just with respect to crop choice, but with respect to other management decisions as well.  I think Nordhaus himself made this point a long time ago.

However, there will also be intensive and extensive margin responses to prices.  Those will be larger than zero.  But I think the stylized facts about commodity prices ( from the rational expectations commodity price model, plus other evidence ) tell us that supply and demand are extremely inelastic.

Question 4. The key agriculture issue in adapting to climate change appears to be reducing international trade barriers and improving storage and reducing geographic trade costs. Are you pessimistic on each of these margins? Container ships and refrigeration keep getting better, don't they?

I think storage will improve, because almost anyone can do it, and there’s a healthy profit motive.  It’s a great diversification strategy for deep-pocketed investors. I think many are already into this game and more will get into it soon.  Greater storage should quell a good share of the greater volatility, but it actually causes average prices to rise, because there will be more spoilage.  But I’m very “optimistic” if you will, about the storage response.  I worry some that the storage response will be too great.

But I’m pretty agnostic to pessimistic about everything else.  Look what happened in earlier food price spikes.  Many countries started banning exports.  It created chaos and a huge “bubble” (not sure if it was truly rational or not) in rice prices.  Wheat prices, particularly in the Middle East, shot up much more than world prices because government could no longer retain the subsidized floors. As times get tougher, I worry that politics and conflict could turn crazy.  It’s the crazy that scares me.  We’ve had a taste of this, no?  The Middle East looks much less stable post food price spikes than before. I don’t know how much food prices are too blame, but I think they are a plausible causal factor.

Question 5. With regards to my Climatopolis work, recall that my focus is the urbanized world. The majority of the world already live in cities and cities have a comparative advantage in adapting to climate conditions due to air conditioning, higher income and public goods investments to increase safety.

To be fair: I’m probably picking on the wrong straw man.  What’s bothering me these days has much less to do with your book and more to do with the papers that come across my desk every day.  I think people are being sloppy and a bit closed minded, and yes, perhaps even tribal.  I would agree that adaptation in rich countries is easier.  Max Auffhammer has a nice new working paper looking at air conditioning in California, and how people will use air conditioning more, and people in some areas will install air conditioners that don’t currently have them--that's adaptation.  This kind of adaptation will surely happen, is surely good for people but bad for energy conservation.  It’s a really neat study backed by billions of billing records.   But the adaptation number—an upper bound estimate—is small.

I thought of you and your book because people at AAEA were making the some of the same arguments you made, and because you’re much bigger fish than most of the folks in my little pond.  Also, I think your book embodies many economists’ perhaps correct, but perhaps gravely naïve, what-me-worry attitude.

Why Science for Climate Adaptation is Difficult

Matthew Kahn, author of the cheeky book Climatopolis: How Our Cities will Thrive in the Hotter Future, likes to compliment our research (Schlenker and Roberts, 2009) on potential climate impacts to agriculture by saying it will cause valuable innovation that will prevent its dismal predictions from ever occurring.

Matt has a point, one that has been made many times in other contexts by economists with Chicago School roots.  Although in Matt’s case (and most all of the others), it feels more like a third stage of denial than a serious academic argument.

It’s not just Matt.  Today, the serious climate economist (or Serious?) is supposed to write about adaptation.  It feels taboo to suggest that adaptation is difficult.  Yet, the conventional wisdom here is almost surely wrong.  Everyone seems to ignore or miscomprehend basic microeconomic theory: adaptation is a second or higher-order effect, probably as ignorable as it is unpredictable.

While the theory is clear, the evidence needs to be judged on a case-by-case basis. Although it seems to me that much of the research so far is either flawed or doesn’t measure adaptation at all.  Instead it confounds adaptation—changes in farming and other activities due to changes in climate—with something else, like technological change that would have happened anyway, response to prices, population growth or other factors.

For example, some farmers may be planting earlier or later due to climate change.   They may also be planting different crops in a few places. But farmers are also changing what, when and where they plant due to innovation of new varieties that would have come about even if Spring weren’t coming a little earlier.  The effects of climate change on farm practices are actually mixed, and in the big picture, look very small to me, at least so far.

The other week the AAEA meetings in San Francisco, our recent guest blogger Jesse Tack was reminding me of Matt’s optimistic views, and in the course of our ensuing conversations about some of his current research, it occurred to me just why crop science surrounding climate-related factors is so difficult. The reason goes back to struggles of early modern crop science, and the birth of modern statistics and hypothesis testing, all of which probably ushered in the Green Revolution.

How’s all that?  Well, modern statistical inference and experimental design have some earlier roots, but most of it can be traced to two books, The Statistical Manual for Research Workers, and The Arrangement of Field Experiments, both written by Ronald Fisher in the 1920s. Fisher developed his ideas while working at Rothamsted, one of the oldest crop experiment stations in the world.  In 1919 he was hired to study the vast amount of data collected since the 1840s, and concluded that all the data was essentially useless because all manner of events affecting crop yields (mostly weather) had hopelessly confounded the many experiments, which we unrandomized and uncontrolled. It was impossible to separate signal from noise. To draw scientific inferences and quantify uncertainties, would require randomized controlled trials, and some new mathematics, which Fisher then developed.  Fisher’s statistical techniques, combined with his novel experimental designs, literally invented modern science. It’s no surprise then that productivity growth in agriculture accelerated a decade or two later.

So what does this have to do with adaptation?  Well, the crux of adaptation involves higher-order effects: the interaction of crop varieties, practices and weather.  It’s not about whether strain X has a typically higher yield than strain Y.  It’s about the relative performance of strain X and strain Y across a wide range weather conditions.

Much like the early days of modern science, this can be very hard to measure because there’s so much variability in the weather and other factors. Scientists cannot easily intervene to control the temperature and CO2 like they can varieties and crop practices.  And when they do, other experimental conditions (like soil moisture) are usually carefully controlled such that no water or pest stresses occur.  Since these other factors are also likely influenced by warming temperatures (like VPD-induced drought, also here), so it’s not really clear whether these experiments tell us what we need to know about the effects of climate change.

(An experiment with controlled temperatures and CO2 concentrations)

Then, of course, is the curse of dimensionality.  To measure interactions of practices, temperature and CO2, requires experimentation on a truly grand scale.   If we constrain ourselves to actual weather events, in most parts of the world we have only one crop per year, so the data accumulate slowly, will be noisy, and discerning cause and effect basically impossible. In the end, it’s not much different from Ronald Fisher trying to discern truth from his pre-1919 experiment station data that lacked randomly assigned treatments and controls.

I would venture to guess that these challenges in the agricultural realm likely apply to other areas as well.

So, given the challenges, the high cost, and basic microeconomic prediction that adaptation is a small deal anyway, how much should we actually spend on adaptation versus prevention?