Today in class, somebody asked a question in my panel data econometrics class. The question concerned the assumption of strict exogeneity and whether it was violated in the example I gave before. I replied that yes, it could indeed be violated, but most of the time, in one way or another, a model will be mis-specified and assumptions will not hold in the strict sense. What I meant was that in some vague sense, the assumptions was a good enough approximation (without me going into the details of my example, think of the correlation between the error term and the regressor as being almost zero).
That made me think again of Milton Friedman, who argues in a famous essay that a model should be judged by its ability to predict counterfactual outcomes, or in his own words, “to make correct predictions about the consequences of any change in circumstances”. Sometimes, this is what we are after, and this is referred to as a positive approach (being able to make the right predictions)—as opposed to a normative one (where we can talk about welfare and how one can maximize it).
That sounds reasonable at first. But can we really make such a clear distinction? Can’t we simply see welfare as the outcome we would like to predict? Of course, we always need a model to make statements about welfare, but then it could also be that all models agree on the direction of the welfare effects of certain policy changes and only differ with respect to the exact magnitude. Therefore, I prefer to think of a model as a set of assumptions that are for sure wrong in the zero-one sense. But the question is how wrong, and that depends on the purpose the model is meant to serve. So, it’s a matter of degree. If the model allows me to make fairly accurate welfare statements (and I can be sure of that for whatever reasons—this is the red herring here), then I can apply Friedman’s argument that it’s good in his sense, but then I can even use if for welfare comparisons, so it serves a normative purpose. In a way, all this brings me back to an earlier post and in particular the part about Marshak.
PS on September 19, 2014: There are two interesting related articles in the most recent issue of the Journal of Economic Literature, in discussions of the books by Chuck Manski and Kenneth Wolpin, respectively. In these discussions, John Geweke and John Rust touch upon the risk of making mistakes when formulating a theoretical model, and how we should think about that.
This goes to the ones who already know what they want to do, and it has to do with structural modeling. It’s about how to do this in Stata (of all places).
There are many reasons why you may want to use Stata for your empirical analysis, from beginning to end. Usually, you will use Stata anyways to put together your data set and also to do your descriptive analysis–it’s just so much easier than many other packages because many useful tools come with it. Plus, it’s a quasi industry standard among economists, so using it and providing code will be most effective.
So, if your structural model is not all that complicated, you can just as well estimate it in Stata.
Today, I want to point you to two useful guides for that. The first one is the guide by Glenn Harrison. This is actually how I first learned to program up a simulated maximum likelihood estimator. It’s focused around experiments and the situation you usually have there, namely choices between two alternatives. It’s a structural estimation problem because each alternative will generate utility, and the utility function depends on parameters that we seek to estimate.
Then, today I bumped into the lecture notes by Simon Quinn, which I found particularly insightful and useful if what you’re doing has components of a life cycle model. What I like particularly about his guide is that it explains how you would make some choices related to the specification of your model and functional forms.
Of course, there are also many reasons why you may not want to use Stata for your analysis. But in any case, it may not hurt to give it a thought.
Last week we saw another one of Apples wonderfully crafted presentations. What a choreography! But besides learning how to present really well (just observe how a lot of information is conveyed in a way that makes it all look so simple and clear), there was something special going on.
First of all, what was it all about? New iPhone models, Apple goes payment services (aka Apple Pay), and the new Apple Watch. Now, at least to me, it seems that the watch is dominating the press coverage. But let’s think about what may be going on in the background for the moment.
The iPhone needed an upgrade anyways. Bigger screens (the competitors had this already, and customers were asking for it), better camera, faster processor, and new technology that allows one to use the phone for super convenient payments. Good move.
Then Apple Pay. How smart is that? Apple positions itself in-between the merchants and the customer and every time somebody wants to make a payment Apple sends a request to the credit card company and the credit card company then sends the money directly to the merchant. Apple is not involved in the actual transaction, has less trouble, and cashes in anyways. Customers benefit, and merchants will want to offer the service. Good move, with lots of potential.
Finally, the Apple Watch. When you read the coverage, then you realize that the watch is actually not yet ready. Battery life is still an issue, and so is the interface. And maybe the design will still change. But there are four truly innovative features almost hiding in the background. First, it’s a fashion item, unlike all the other technical devices that are already on the market. Second, it has more technology packed into it, and third, it’ll have apps on it. Fourth, you can use it to pay, with Apple Pay.
So, what’s so special about this event? It’s all about network effects. I’ve worked on two-sided markets for a while, and there are three types of network effects that play a role. The first ones are direct network effects. These are the ones we know from Facebook: the more people are on Facebook, the more I like to be on Facebook. These ones play less of a role. The second ones are indirect network effects. They arise because app developers find it the more worthwhile to start developing apps the more users will potentially download them. This is why Apple presented the Apple Watch now. Starting from now, until the product will finally be sold, they can develop apps, which will in turn make the watch more attractive to consumers, so it will have positive effects on demand. But developers will already see that now and will therefore produce even more apps. Very smart, and all Apple has to do is to provide the platform, the app store, and cash in every single time somebody buys an app. Finally, Apple Pay. Similar model. The more people use Apple Pay the more merchants will use it, and this will make people buy more Apple devices so that they can use the services, and so on.
So, if you ask me, taken together this is a huge step for Apple. Not because the Apple Watch or the iPhone are particularly great, but because Apple’s business model is incredibly smart. Beautifully smart. And I haven’t even mentioned that sometime soon all the Apple mobile devices will be much better integrated with the operating system on their laptops and desktops. As they said in their own words, something “only Apple can do”.
Writing an empirical paper involves—next to the actual writing—reading in data, analyzing it, producing results, and finally presenting them using tables and figures.
When starting a Ph.D., one typically imagines producing tables by means of lots of copy-pasting. But actually, I strongly advise you not to do that and instead to use built-in commands or add ons that allow you to produce LaTeX (or LyX) tables. There are at least two good reasons for this. First, it’ll save you time, fairly soon, maybe already when you put together the first draft of your paper. But at least when you do the first revision of that draft. The reason is that you will produce similar tables over and over again, because you will change your specification, the selection of your sample, or something else. And you will do robustness checks. The second reason why one wants to automate the creation of tables is that it will help you make less mistakes, which can come about when you paste results in the wrong cells or when you accidentally put too many or too few stars denoting significance next to the coefficient estimates.
Here’s an example of one way to do it in Stata and LaTeX (I usually use Stata for organizing my data, matching data sets, producing summary statistics, figures, and so on). I think the way it’s done here is actually quite elegant. This post is also useful when you’re using LyX, by the way, because you can always put LaTeX code into a LyX document.
So far this is all about generating tables. But actually, the underlying idea is that you organize everything in a way so that you can press a button and your data set that you will use for the analysis is built from the raw data, then you press a button and the analysis is run and the tables and figures are presented, and finally you press a button and the paper is typeset anew. This is described very nicely in Gentzkow and Shapiro’s Practitioner’s Guilde that I have already referred to in an earlier post. On the one hand, this is best practice because it ensures replicability of results, but on the other hand it will also save you time when you revise your paper, and believe me, you will likely have to do that many times.
The following is a slightly altered version of a column I wrote for the December 2011 issue of our student newspaper Nekst.
In 1925, economist Henry Schulz wrote in the Journal of Political Economy that “The common method of fitting a straight line to data involves the arbitrary selection of one of the variables as the independent variable X and the assumption that an observed point fails to fall on the line because of an “error” or deviation in the dependent variable Y alone, the X variable being allowed no deviation.”
At first glance, one may wonder whether this can be right. Haven’t we all learned that we regress Y on X when we are interested in “the effect” of X on Y? In his article, Schulz was interested in estimating demand for sugar. He faced the problem that both, demand Y and price X were measured with error. In such a case, indeed, there is no reason to prefer one of the two regressions described by him to the other. Here, “errors” come about—people realized later—not only because variables are not correctly measured, but also because there were aspects of the relationship between prices and quantities sold in that market that were not explained by a simple model saying that there is a one-to-one relationship between prices and demand.
Here comes the role of theory, and it is fascinating to see in the literature how the following ideas developed. It all started with a book Henry Moore wrote in 1914, entitled Economic Cycles: Their Law and Cause. In there, we can find a regression of the quantity of pig iron sold on its price. The coefficient on price was positive, and Moore interpreted it as a “new type” of dynamic demand curve. Philip Wright, a Harvard economist, reviewed the book in the following year in the Quarterly Journal of Economics and explained that it is very plausible that demand for pig iron was very volatile, whereas the production technology, and hence the supply curve, was not changing much over time. Therefore, the shifts in the demand curve trace out the supply curve, and that is why we are estimating a supply curve when regressing quantities on prices.
A discussion followed and then, after more than 10 years, Appendix B of Philip Wright´s 1928 book The Tariff on Animal and Vegetable Oils contained two derivations of what we know today as the instrumental variables estimator. The idea is that when we regress quantities on prices and use factors shifting the supply curve as instruments for prices (e.g. weather conditions for corn production), then we will estimate a demand curve. Conversely, when we use factors shifting the demand curve as instruments (e.g. a change in value added taxes), then we will estimate a supply curve. Carl Christ provides more details on the history in his 1985 AER article.
One thing one can take away from this is that theory matters. Once we see the world through the lens of theory—here a simple model of supply and demand—we can progress in our understanding of it. It also restrains us, because not everything that can be done should be done. The above example shows that first, we need to understand what we are estimating when we regress one variable on another. This is guided by theory. If we do not know this a priori, i.e. before we have performed this regression, then there is probably no point in buying expensive data sets, collecting data, conducting experiments, studying asymptotic properties of the estimator, or developing more fancy estimation procedures. This is also what Marshak had in mind when he started his 1953 paper by saying that “Knowledge is useful if it helps to make the best decisions.” Highly recommended.
CHRIST, C. (1985): “Early progress in estimating quantitative economic relationships in America,” American Economic Review, 75(6), 39–52.
MARSCHAK, J. (1953): “Economic measurements for policy and prediction,” in Studies in Econometric Method, ed. by W. Hood, and T. C. Koopmans, pp. 1–26. Wiley, New York.
MOORE, H. (1914): Economic Cycles: Their Law and Cause. Macmillan, New York.
SCHULTZ, H. (1925): “The statistical law of demand as illustrated by the demand for sugar,” Journal of Political Economy, 33(6), 577–631.
WRIGHT, P. G. (1915): “Moore’s Economic Cycles,” Quarterly Journal of Economics, 29(3), 631–641.
WRIGHT, P. G. (1928): The Tariff on Animal and Vegetable Oil. MacMillan, New York.
It’s August, which means that students are finishing up their research master or master theses. Here is some advice that I give most of them at one point or another, and I think also Ph.D. students may not be aware of all of the following. I’ll focus on the form for now, and will talk about the contents of a good paper at a later point in time.
Let’s start with the very basics. You want to make your paper to be pleasant and easy to read in terms of the font size. My usual advice is to use a font like Times with a size of 11pt, to change the spacing to 1.5 or double space, and to use margins of 3cm in the top and in the bottom, and 2.5cm on the left and right.
Footnotes are usually placed after the end of a sentence, after the full stop. And acronyms should be defined before being used. You can do this by writing out the acronym and putting it in parentheses right after that. From then on you can use it. Particular sections or figures you refer to should start with capital letters. So, you would say “in the previous section”, but “in Section 3”.
Equations should only be numbered when you refer to them. Also, when you have an equation that is a “displayed formula” (so takes a whole line) and the sentence ends with that equation, then the equation should end with a full stop in it. When the text continues after the equation, then there should sometimes be a comma, for instance because the equation uses something that is defined afterwards using the expression “where”.
Overall, I think the best advice I can given is to be very careful so that the writing is of high quality. First of all, the English should be correct. There should not be any typos, and you should make extensive use of the spell checker. Then, the references should be in good order.
The following mostly applies to Ph.D. students in economics and related disciplines. When you’re writing papers, you should definitely use LyX or LaTeX together with BibTeX. Also references to figures, tables, equations, sections, and so on should be programmed so that when you change the structure of the document or insert a section or another figure, all the references are updated. This will save you a lot of time in the future, when you go through the 10th or so revision of a paper.
Generally, learn from others. In an earlier post I’ve already suggested that you should read papers in top 5 journals. Not all of them are well-written. But the chance that you get a well-written paper is higher than in other journals. Look at how introductions are structured, how the research is motivated. And spend a lot of time working out the arguments.
Andrew Chesher told me once, when I was visiting UCL as a Ph.D. student, that one may want to think about the following structure: this is what I’m doing > this is why I’m doing it and why it’s interesting > this is how I’m doing it > this is what I find. I think this is a great way to think about presenting research. He also said that academic papers should not have any superfluous written text and that for every word one should ask oneself whether it’s really necessary. Thereby, one can make text shorter and ultimately more clear.
Always make sure you use easy to understand and short sentences, mostly active tense, and that each paragraph roughly corresponds to one line of thought. But don’t be too mechanical.
Respect the reader by explaining well. Think of your reader as not being an expert on the topic you’re writing on, but as being smart and having a general education in economics. That way, you will not make the mistake of not explaining things that may be clear to you, but not to most readers.
And before I forget: many students write that “coefficients are significant”, but it should actually say that they are “significantly different from zero”.
If you want to learn more, have a look at my earlier post on the challenge of writing, where I also provide a reference to Silvia’s book. And if you’re interested in working some more on your writing, you may also want to consider having a look at a classic, the “Elements of Style“.
I’m from Southern Germany, and just as many of my friends who also came to live somewhere outside of Germany, one of the things I’m really missing on a Saturday morning is a fresh pretzl, with a bit of butter and maybe some cheese. I’m saying Saturday because I recall going to the bakery with my dad before breakfast to get some. And those bakeries were normally closed on Sunday.
We call them “Brezeln” in Germany, and since I’m from Stuttgart I will of course claim that they were invented in Bad Urach, which is not far away. Bavarians will claim that they are from Bavaria, and in the end nobody can say where they really come from. But just as wheat beer they have made their way and are now extremely popular throughout Germany. Which is not surprising because they’re the perfect snack as they are, or with butter, so you will certainly get them on the streets or at train stations, for instance. Sometimes, in the US or elsewhere one comes across something that is called pretzel and looks a bit like it, but it is actually not a pretzel, most of the time (they are not supposed to be heavy and they are not supposed to be too crunchy or dry–instead they are supposed to be crunchy where they are thin and soft where they are thick).
A pretzel is made out of yeast dough and the brown color comes from lye. So it can’t be that hard to make them I thought. It’s a bit like molecular cuisine because of the lye, though. I’ve been practicing making them myself, and I haven’t been too satisfied so far. But this morning I made some that turned out the way they should be, and in the end it’s actually not that hard now that I’ve found the right balance. So here’s the recipe. You’ll probably have to try yourself what works best, because ingredients differ across countries. So this one is optimised for Holland.
I’m going to make six of them. Here’s how we do the raw dough. I used a kneading machine, but you can easily do the dough by hand. On the picture you see that I put everything into a large bowl, in the following way. Start with 300 grams of standard wheat flour. Bread buns and the like usually have 2% salt relative to the flour in them, so add 6 grams of salt on the side. Don’t mix it with the rest of the dough yet, because it’ll slow down the yeast when we put it together with the flour and water. Put in half a pack of dry yeast (or 10 grams of fresh yeast), that’s something like 3 to 4 grams, a bit of brown sugar, a bit of butter (about a tablespoon), a bit of milk, and some tepid water, about 150 mills. On the display of the scale you see 467 grams, so that’s it.
You can see that I’ve put the salt to the side, as well as the butter and have dug a little hole in which I’ve put the yeast, the sugar and the water. Then I’ve stirred the water very gently so that the yeast dissolves. This will produce a watery pre-dough. It’ll form bubbles, so let it do that for 15 minutes or half an hour. Then knead the dough. It’ll be a fairly dry dough.
Form six pieces out of it. Then roll them so that they are about 10 to 20cm long. This is what you see on the picture. It’ll be hard to make them longer, so let the dough expand a bit more by letting it rest for 10 minutes. Roll and pull at the same time. Leave them a bit thicker in the middle (about twice a pencil’s diameter).
Now it’s time to form the pretzels. The picture shows how it works. There’s no need to rush, you can do this step by step. Place them on a baking sheet with baking paper underneath and wait. Now it’s important to wait a bit, so that he dough expands, but not too much because then it gets too fluffy and will be dry. I’d say wait about 10 minutes.
Now it’s time to put lye on with a brush. It took me a while to figure this out, but you can actually get lye from the Asia shop. In Chinese cooking, lye is used to make some noodles, for instance. I’ve thinned it down a bit with water and have also made sure that I go with the brush a bit underneath the raw pretzels. You can also use natron powder from the baking section, or natron lye from the pharmacy.
Finally, put coarse salt on top and use a sharp knife to make a cut in the thick part. Bake for 16 to 18 minutes at 210 degrees Celsius. Good luck!