I love using David Hugh-Jones' huxtable
library in R. But I hate forgetting how to include math symbols in the resulting tables. Here's how to do it.
I love using David Hugh-Jones' huxtable
library in R. But I hate forgetting how to include math symbols in the resulting tables. Here's how to do it.
The Census Bureau has proposed a major revision to the data that it will release from the 2020 decennial census. I think that the proposal would harm demographic research and affect policies. The Bureau is accepting feedback through October 22 (details at the link above). I would encourage you to look through the proposal and provide feedback on the proposal. I have copied my response below for those who may be interested.
A huge shout-out to the NHGIS team who notified users of these important changes and who have been tireless advocates for ensuring continued access to useful data.
How to use custom LaTeX document classes and Pandoc templates to customize documents without losing focus on writing
I often want to keep a flow when I'm writing. I want to avoid detours and distractions like looking up citations or finding a particular piece of information. But if I don't put in some kind of marker to remind myself to enter the information later, then I will definitely forget.
New methods are key to developing new hypotheses and testing old ones. It would be difficult to imagine social sciences today without regression models, or social network analysis, or online ethnographies. Each has been developed and used to expand what we think that we know about the social world.
But social scientists, especially junior researchers, too often fail to justify their new methods. They demonstrate their creativity and document the often considerable work they put into developing their new approach. But scholars should take care that they're not just building a better mousetrap.
Several weeks ago, my Silver Spring neighborhood experienced a rash of petty thefts from parked cars. Word spread through our neighborhood listserv. Nothing major, it happens toward the end of every summer, and some neighbors admitted to leaving their car doors unlocked. One neighbor, however, strongly advocated that the police increase patrols in our neighborhood. It's a rational course of action, and most of my neighbors—the majority of whom are white—probably thought so as well.
But I also know from collecting data on the topic that more than half of black and Latino residents in the DC area report that the fear of police arresting or questioning them affects their daily lives. About a quarter of both groups say that this fear affects their daily lives "a lot." It's possible that increasing the police presence in our neighborhood might worry our black and Latino neighbors more than the car break-ins. By way of comparison, just over one in ten white residents feared police on a daily basis, and most of those who did said that it only affected their daily lives "a little."
This post translates the Stata code to calculate the standard error of the predictions contained in the document, How are average marginal effects and their standard errors computed by margins using the delta method? by Jeff Pitblado of StataCorp, into R code.
Because I am a masochistperfectionist, I spent the better part my day making my R code more elegant. I figured out what to do with a simple loop, but wanted to write the code the right way. I always tell myself that the time I spend torturing myselfwriting the right code will help me down the line so I know how to do it next time. I will inevitably forget and spend the same four hours doing the same thing again. As a gift to my future self, I decided that I would write down what I learned because it will likely come up again (you're welcome, future Mike!).
My basic problem comes from the desire to match two lists item-by-item. Python contains a function, zip()
, that does this. I want to figure out how to zip in R.
tl;dr: paste outcome and dependent variables into R's as.formula()
function to avoid typing the same models out repetitively.
I used to think of CVs as a relic of an antiquated system of prestige. But working on some software changed my mind. CVs are, it turns out, pretty complicated artifacts. They reveal a great deal about the professional life of academics and all of the systems on which they come to rely.
Like most academics, I found it difficult to keep my CV up to date. I was surprised to learn that there was not a straight-forward system for managing this information. I thought that there should be a better system. It turns out, I'm not alone. About a week ago, Daniel Laurison posted the following to Twitter:
it ...