I’ve been playing around with the R package texreg for creating combined regression tables for multiple models. It’s not the only package to do that – see here for a review – but it’s often handy to be able to generate both ascii art, latex, and html versions of the same table using almost identical syntax. Also, the ascii art creating screenreg function allows me to bypass the pdf construction cycle I previously described here. The coefficient plots from plotreg are pretty cool too.
This post is about making the variables listed in those combined regression tables more readable. That is particularly important when data comes from variable-mangling statistical software or from co-authors whose idea of a descriptive name could pass for an online banking password. Even R will cheerfully mash up your carefully chosen variable names through formulas, factors, and interactions. So for work people are going to see, variables should have sensible names.
First I’ll walk through the existing texreg machinery for renaming, omitting, and reordering variables, and then propose a hopefully more intuitive implementation. I’ll demonstrate all this using screenreg on a classic data set on job prestige.
Perhaps you tried to open some application or mount some DMG on your Mac and encountered the following alarming message
“[Application] is damaged and can’t be opened. You should move it to the trash.”
Perhaps it is indeed damaged. But more likely it is just not signed by its developer or not made available from the AppStore, depending on how tight your security preferences are set. A less misleading message would certainly be nice.
If it’s not really damaged then how do you get the application to open?
If you trust the people from whom you are downloading things you can bypass the warning by adjusting your ‘Preferences > Security & Privacy’ to
Allow applications downloaded from: Anywhere
It is sufficient to do this once when you first open the application, and it’s probably best to re-tighten the preferences once it is successfully launched.
So who is it that does not sign their applications and causes you all this trouble?
Me, for one. None of my software is signed and none of it is distributed via the AppStore. The ability to sign software depends on paying one hundred dollars a year to Apple become a ‘registered developer’. (I understand that similar plans are in the works for Microsoft developers). As a result, many of us open source software developers have not signed our applications.
Now, as it happens I have just ponied up so as soon as I figure out how to get my code into XCode and sign it you won’t get the warning from my software. But before then, if you’re wondering whether you should trust me enough to put your shields down, you can always ponder the source code, or be reassured that others can.
So now you know what the alarming message probably actually means, and also what you can do about it.
If you are planning to attend the European Political Science Association (EPSA) meeting in Barcelona next week you might find a searchable online programme helpful (scraped out of the original pdf).
Making available replication materials for the research you do is A Good Thing. It’s also work, and it’s quite easy to never get around to. Certainly I claim no special virtue in this department so I am always happy when there’s an institutional stick to prod my better nature in the right direction. One such institutional prod comes from academic journals and their data policies. If you have to give them your replication data before you they’ll publish your paper, then you probably will. What sorts of journals have data policies?
There are now quite a few R packages to turn cross-tables and fitted models into nicely formatted latex. In a previous post I showed how to use one of them to display regression tables on the fly. In this post I summarise what types of R object each of the major packages can deal with.
Unsurprisingly, there’s quite some variation…
Since it seems to be the fashion, here’s a post about how I make my academic papers.
Actually, who am I trying to kid? This is also about how I make slides, letters, memos and “Back in 10 minutes” signs to pin on the door. Nevertheless it’s for making academic papers that I’m going to recommend this particular set of tools.
I use the word make deliberately because I’m thinking of ‘academic paper’ broadly, as the sum of its words, analyses, tables, figures, and data. In this sense, papers can contain their own replication materials and when they do it should be possible in a single movement to rerun a set of analyses and reconstruct the paper that reports them.
To get anywhere near that goal, I use a mix of latex, its newer bibliography system biblatex, and the R package knitr. Also, I use a Mac, though that won’t make very much difference to the exposition.
Here’s how this currently works…
Inspired by Preis et al.’s article Quantifying the advantage of looking forward, recently published in Scientific Reports (one of Nature publishing group’s journals), I wondered if similar big-data web-based research methods might address a question even bigger than how much different countries wonder about next year. How about the meaning of life. Who is searching for clarification about the meaning of life? And how is that related to the more obvious life task of getting richer?
You’ve got a pdf file and you’d like to view it with whatever the system viewer is. As usual, that requires something special for Windows and something general for the rest of us. Here goes…
fourfive R packages will turn your regression models into pretty latex tables: texreg, xtable, apsrtable, memisc, and stargazer. This is very nice if you happen to be a latex document or its final reader, but it’s not so great if you’re making those models to start with.
What if you wanted to see these as you were working on them? In particular what if you wanted to see all your models lined up as if they were already Table 4 of the Masterwork Yet To Be Named that is only now slowly taking shape in your mind?
Dean Burnett writes a column in Guardian, sometimes about science but more entertainingly on pseudo-, wannabe-, and not-actually- science. Most of the time this is good BS-shovelling fun and I recommend it. Unfortunately today we get some ill-considered overreach under the guise of shovelling.
The subject is a silly equation purporting to define how depressing any day of the year is, and thereby to identify the most depressing one. It is sufficiently silly that it doesn’t deserve a link, has no redeeming features and if you’ve not read it yet you’re just lucky. He’s right. It is nonsense.
The arguments are more interesting, if a bit alarming. To put it bluntly: if they were sound they would sink all regression models about any social issue of any interest to anybody ever.