Skip to content
Archive of posts filed under the Multilevel Modeling category.

MRP with R and Stan; MRP with Python and Tensorflow

Lauren and Jonah wrote this case study which shows how to do Mister P in R using Stan. It’s a great case study: it’s not just the code for setting up and fitting the multilevel model, it also discusses the poststratification data, graphical exploration of the inferences, and alternative implementations of the model. Adam Haber […]

Conference on Mister P online tomorrow and Saturday, 3-4 Apr 2020

We have a conference on multilevel regression and poststratification (MRP) this Friday and Saturday, organized by Lauren Kennedy, Yajuan Si, and me. The conference was originally scheduled to be at Columbia but now it is online. Here is the information. If you want to join the conference, you must register for it ahead of time; […]

Fit nonlinear regressions in R using stan_nlmer

This comment from Ben reminded me that lots of people are running nonlinear regressions using least squares and other unstable methods of point estimation. You can do better, people! Try stan_nlmer, which fits nonlinear models and also allows parameters to vary by groups. I think people have the sense that maximum likelihood or least squares […]

“For the cost of running 96 wells you can test 960 people and accurate assess the prevalence in the population to within about 1%. Do this at 100 locations around the country and you’d have a spatial map of the extent of this epidemic today. . . and have this data by Monday.”

Daniel Lakeland writes: COVID-19 is tested for using real-time reverse-transcriptase PCR (rt-rt-PCR). This is basically just a fancy way of saying they are detecting the presence of the RNA by converting it to DNA and amplifying it. It has already been shown by people in Israel that you can combine material from at least 64 […]

“Are Relational Inferences from Crowdsourced and Opt-in Samples Generalizable? Comparing Criminal Justice Attitudes in the GSS and Five Online Samples”

Justin Pickett writes: You’ve blogged a good bit on MTurk, weighting, and model-based inference. Drawing heavily on your work (Gelman, 2007; Gelman and Carlin, 2002; Wang et al., 2015), Andrew Thompson and I [Pickett] just published a study that largely confirms your concerns about MTurk (and opt-in samples), but that also emphasizes the promise of […]

Computer-generated writing that looks real; real writing that looks computer-generated

You know that thing where you stare at a word for long enough, it starts to just look weird? The letters start to separate from each other, and you become hyper-aware of the arbitrariness of associating a concept with some specific combination of sounds? There’s gotta be a word for this. Anyway, I was reminded […]

MRP Conference registration now open!

Registration for our MRP mini conference/meeting is now open. Please go to the conference website to register.  Places are limited so make sure you register so you don’t miss out! Abstract submissions will be open until the end of this month. Other than the great talks that we already have submitted, I’m super excited because […]

MRP Conference at Columbia April 3rd – April 4th 2020

The Departments of Statistics and Political Science and Institute for Social and Economic Research and Policy at Columbia University are delighted to invite you to our Spring conference on Multilevel Regression and Poststratification. Featuring Andrew Gelman, Beth Tipton, Jon Zelner, Shira Mitchell, Qixuan Chen and Leontine Alkema, the conference will combine a mix of cutting […]

Advice for a Young Economist at Heart

Shoumitro Chatterjee, who sent me that paper we discussed yesterday, writes: I [Chatterjee] recently finished my PhD in economics from Princeton and am starting as junior faculty at Penn State. I do applied work on development using observational and administrative data, and I have a few questions: 1. Is there a difference between multiple comparisons […]

MRP Carmelo Anthony update . . . Trash-talking’s fine. But you gotta give details, or links, or something!

Before getting to the main post, let me just say that I’m a big fan of Nate Silver. Just for one example: I’m on record as saying that primary elections are hard to predict. So I don’t even try. But there’s lots of information out there: poll data, fundraising numbers, expert opinion, delegate selection rules, […]

Forget about multiple testing corrections. Actually, forget about hypothesis testing entirely.

Tai Huang writes: I am reading this paper [Why we (usually) don’t have to worry about multiple comparisons, by Jennifer, Masanao, and myself]. I am searching how to do multiple comparisons correctly under Bayesian inference for A/B/C testing. For the traditional t-test approach, Bonferroni correction is needed to correct alpha value. I am confused with […]

They added a hierarchical structure to their model and their parameter estimate changed a lot: How to think about this?

Jesús Humberto Gómez writes: I am an epidemiologist and currently I am studying my fourth year of statistics degree. Currently we have a dataset with data structure shown here: We want to investigate the effect of mining contamination on the blood lead levels. We have a total of 8 inhabited locations and the participants and […]

Hey—the New York Times is hiring an election forecaster!

Chris Wiggins points us to this job opening: Staff Editor – Statistical Modeling The New York Times is looking to increase its capacity for statistical projects in the newsroom, especially around the 2020 election. You will help produce statistical forecasts for election nights, as part of The Times’s ambitious election results operation. That operation is […]

The Generalizer

I just saw Beth Tipton speak at the Institute of Education Sciences meeting on The Generalizer, a tool that she and her colleagues developed for designing education studies with the goal of getting inferences for the population. It’s basically MRP, but what is innovative here is the application of these ideas at the design stage. […]

Smoothness, or lack thereof, in MRP estimates over time

Matthew Loop writes: I’m taking my first crack at MRP. We are estimating the probability of an event over 30 years, adjusting for sampling stratum using a multilevel model with varying intercepts for stratum. When we fit the model, the marginal predicted probability vs. year is a smooth function, since the mean of the varying […]

Fitting big multilevel regressions in Stan?

Joe Hoover writes: I am a social psychology PhD student, and I have some questions about applying MrP to estimation problems involving very large datasets or many sub-national units. I use MrP to obtain sub-national estimates for low-level geographic units (e.g. counties) derived from large data (e.g. 300k-1 million+). In addition to being large, my […]

Causal inference and within/between person comparisons

There’s a meta-principle of mathematics that goes as follows. Any system of logic can be written in various different ways that are mathematically equivalent but can have different real-world implications, for two reasons: first, because different formulations can be more directly applied in different settings or are just more understandable by different people; second, because […]

Postdoctoral research position on survey research with us at Columbia School of Social Work

Here it is: The Center on Poverty and Social Policy at the Columbia University School of Social Work, the Columbia Population Research Center, and the Institute for Social and Economic Research and Policy are seeking a postdoctoral scholar with a PhD in statistics, economics, political science, public policy, demography, psychology, social work, sociology, or a […]

“Deep Origins” and spatial correlations

Morgan Kelly writes: Back in 2013 you had a column in Chance magazine on the Ashraf-Galor “Out of Africa” paper which claims that genetic diversity determines modern income. That paper is part of a much large literature in economics on Persistence or “Deep Origins” that shows how medieval pogroms prefigure Nazi support, adoption of the […]

“Some call it MRP, some Mister P, but the full name is . . .”

Jim Savage points us to this explainer, How do pollsters predict UK general election results?, by John Burn-Murdoch of the Financial Times. It’s bittersweet seeing my method described by some person I’ve never met. Little baby MRP is all grown up! Being explained by the Financial Times—that’s about as good as being in the Guardian […]