Marc Bellemare has a nice style guide (see here).
Note that I don't follow all of his writing advice, at least not all of the time. However, it is definitely worth reading. Often. People will take your work more seriously if it looks professional. Also, when I read really sloppy papers, either as a professor/advisor or as a referee, I often feel a bit insulted, like you don't value my time at all. Typos happen. Everyone knows this. But spend time cleaning what you write.
At the very least, reread your papers before submitting them. I just reread this post. Twice.
Addendum: I just happened to re-read a letter I wrote to an editor about a referee report. Caught two typos. How embarrassing! Do as I try to do, not as I always do....?
Sunday, June 26, 2016
Saturday, June 11, 2016
Stata Tip: Dummy Variables and Interaction Terms
One of the most frustrating things to happen (all the time) when you're in the Stata groove is to get that error message, "no room to add more observations." Yes, you can usually add more more memory (use the 'set memory' command), and if you can't, you can always buy a new computer with more memory. But insufficient memory issues often come up when you have many dummy variables in your model. I used to make them using the tabulate command:
tabulate var, gen(newstub)
There's a much better way! You don't actually need to create those variables! Much better to just add "i." to the beginning of your variable within the regression command:
regress y i.var
Done. You can even specify the base and test for equality of different dummy coefficients!
You can use a similar trick for interaction variables. Instead of creating several interaction variables,
generate femaleXgroup2=female*group2
generate femaleXgroup3=female*group3
just use this regression command:
regress y i.sex i.group sex#group
Actually, even better to do this:
regress y sex##group
I would say that one of the most-often made coding errors I see is to forget to include one of the non-interacted variables in regression models with interaction terms. By using the ## trick, you don't need to worry about it! Oh, if one of the variables is continuous, you need to tell Stata this by putting "c." before the variable. For example,
regress y i.sex age sex#c.age or regress y sex##c.age
More details here. Or for quick reference, look at the this cheat sheet.
tabulate var, gen(newstub)
There's a much better way! You don't actually need to create those variables! Much better to just add "i." to the beginning of your variable within the regression command:
regress y i.var
Done. You can even specify the base and test for equality of different dummy coefficients!
You can use a similar trick for interaction variables. Instead of creating several interaction variables,
generate femaleXgroup2=female*group2
generate femaleXgroup3=female*group3
just use this regression command:
regress y i.sex i.group sex#group
Actually, even better to do this:
regress y sex##group
I would say that one of the most-often made coding errors I see is to forget to include one of the non-interacted variables in regression models with interaction terms. By using the ## trick, you don't need to worry about it! Oh, if one of the variables is continuous, you need to tell Stata this by putting "c." before the variable. For example,
regress y i.sex age sex#c.age or regress y sex##c.age
More details here. Or for quick reference, look at the this cheat sheet.
Tuesday, May 31, 2016
What? Causal Identification Wasn't Always a Thing to Worry About?
Read this interview of David Card and Alan Krueger. Imagine that. There was a time in the not so distant past that nobody used the terms "natural experiment" and "research design". Also, see their thoughts on RCTs, behavioral economics, and complicated theories explaining human behavior. Interesting throughout!
Here is more on the history of applied micro research, starting in the 1960s. Important to note before going on the job market: "We also show that, despite the partial abandonment of theory by applied microeconomists, the labor market for economists still pays a wage premium to theorists." My non-rhetorical question: Doing theory is hard and time-consuming. Is it worth it? My answer: It depends....
Sunday, May 22, 2016
At Adam Smith's Grave
I know, I know. It's been a while since I've posted anything. I've been traveling. Yesterday I visited Adam Smith's grave. Pretty cool thing, no?
Thursday, April 28, 2016
Need a Useful Yet Beautiful Graduation Gift? Stata Cheat Sheets
I suggest printing these out (ideally in color) and framing them! They're beautiful! And practical! I love them all...can't wait to start using the keyboard shortcuts.
Tuesday, April 12, 2016
How to Be Innovative
I just saw this Ted Talk on the habits of original thinkers. Really, that's what we're in the business of doing: coming up with innovative ideas and following through with those ideas. Lots of good advice in the talk. My favorite: "The greatest originals are the ones who fail the most, because they're the ones who try the most. You need a lot of bad ideas in order to get a few good ones." And honestly, all you need is a few good ideas. Nobody will care about or even notice all of your bad ones.
I also like his insights on procrastination. No, this does not mean you should wait until the last minute to write that proposal, third year paper, etc.! It does suggest that before hurrying to send that brand new paper to a journal, you should present it at several conferences and share it with trusted colleagues. Yes, you may get good suggestions from them, but even if you don't, it is very likely that you yourself will come up with ideas for substantial improvements while you wait for responses from people.
I also like his insights on procrastination. No, this does not mean you should wait until the last minute to write that proposal, third year paper, etc.! It does suggest that before hurrying to send that brand new paper to a journal, you should present it at several conferences and share it with trusted colleagues. Yes, you may get good suggestions from them, but even if you don't, it is very likely that you yourself will come up with ideas for substantial improvements while you wait for responses from people.
Tuesday, April 5, 2016
Dominicans Love Regression Discontinuity Design
I just got back from celebrating my little brother's wedding in the Dominican Republic (AKA República Dominicana). I really liked these pens spotted in a gift shop. ;)
Subscribe to:
Posts (Atom)
