Wordscores and JFreq – an update

An old post of mine on using JFreq and Wordscores in R still gets frequent hits. For some documents, the current version of JFreq doesn’t work as well as the old one (which you can find here [I’m just hosting this, all credit to Will Lowe]). For even longer documents, we have a Python script by Thiago Marzagão archived here (I have never tried this). And then there is quanteda, the new R package that also does Wordscores.

Having said this, a recent working paper by Bastiaan Bruinsma, Kostas Gemenis heavily criticize Wordscores. While their work does not discredit Wordscores as such (merely the quick and easy approach Wordscores advertises — which depending on your view is the essence of Wordscores), I prefer to read it as a call to validating Wordscores before they are applied. After all, in some situations they seems to ‘work’ pretty well, as Laura Morales and I show in our recent paper in Party Politics.

Alienating open-source contributors?

Some time ago, I came across a blog post highlighting how open-source contributors can be alienated by maintainers. Tim Jurka describes his unpleasant experience of sending an updated version of an R package to CRAN. He highlights the short and impersonal messages from CRAN maintainers, an apparent contradiction, and generally felt alienated by the process. Interestingly, there are four lessons to be learnt offered:

– don’t alienate volunteers — everyone in the R community is a volunteer, and it doesn’t benefit the community when you’re unnecessarily rude.
– understand volunteers have other commitments — while the core R team is doing an excellent job building a statistical computing platform, not everyone can make the same commitment to an open-source project.
– open-source has limited resources — every contribution helps.
– be patient — not everyone can operate on the same level, and new members will need to be brought up to speed on best practices.

I guess everyone would sign up to this, but oddly enough my experience with the team running CRAN has always been of the nature Tim Jurka cites as a positive example: brief, but courteous. What is definitely missing from said blog post, though, is an appreciation that the team running R and CRAN are also volunteers!

Replication as learning

As part of the course on applied statistics I’m teaching, my students have to try to replicate a published paper (or, typically, part of the analysis). It’s an excellent opportunity to apply what they have learned in the course, and probably the best way to teach researcher degrees of freedom and how much we should trust the results of a single study. It’s also an excellent reminder to do better than much of the published research in providing proper details of the analysis we undertake. Common problems include not describing the selection of cases (where not everyone remains in the sample), opaque recoding of variables, and variables that are not described. An interesting case is the difference between what the authors wanted to do (e.g. restrict the sample to voters) and what they apparently did (e.g. forge to do so). One day, I hope this exercise will become obsolete: the day my students can readily download replication code…

Image: CC-by-nd Tina Sherwood Imaging https://flic.kr/p/8iz7qS

Why religion? – Now Published

APWe used to call it ‘Why Muslims’ because in the context of contemporary immigration in Western Europe religion and Islam are hardly distinguishable. This analysis of data from the SOM project now published at Acta Politica asks when politicians focus on immigrants as Muslims — rather than say national or cultural-ethnic groups.

Joost Berkhout and I find that Muslim-related claims-making is associated with the parliamentary presence of anti-immigrant parties and the policy topic under discussion. Yes, while work by Sieglinde Rosenberger and Sarah Meyer using the same data as we do, generally find a limited role of anti-immigrant parties in politicizing immigration, when it comes to Muslims, they seem to play an important role. By contrast, the evidence for policy-oriented and socio-structural explanations is inconclusive for claims-making highlighting the religion of immigrants.

“Why Don’t Immigrants Vote More?” — Participation in Local Elections Published

paMy paper on the electoral participation of immigrants in local elections is now available online (Parliamentary Affairs). As part of this research, I spoke to a politician who exclaimed: ‘Why don’t they [immigrants] vote now that we have given them the opportunity?’. It’s the expectation that all ‘we’ have to do is enfranchise immigrants, and they’ll flock to the ballot boxes. But, they don’t.

In the paper I present a new representative survey of participation in the 2015 municipal elections in the Canton of Geneva. The cleaned data (and replication material) are available at IQSS Dataverse; the raw data at FORS.

In Geneva, foreign citizens who have lived in Switzerland for at least 8 years have the right to vote in local elections. In 2015, the chancellor wrote a personal letter to each of them to invite them to vote, yet most immigrant groups vote less than the majority population. In the paper I test four common explanations for this difference in electoral turnout: social origin (resources), political engagement, civic integration and networks, as well as socialisation. Individually, all these explanations are associated with differences in electoral participation, but contrary to some recent studies, substantive differences between nationalities remain in the local elections in Geneva.