I recognise this is similar to this but I couldn't understand the answer to the question and hence am asking again.

Is it possible to use both cluster standard errors and multilevel models together and how does one implement this in R? In my set up I am running a conjoint experiment in 26 countries with 2000 participants per country. Like any conjoint experiment each participant is shown two vignettes and asked to choose/rate each vignette. The same participants is then shown two fresh vignettes for comparison and asked to repeat the task. In this case each participant performs two comparisons. I am currently running a multilevel model with each comparison at level 1 and country is the level 2 unit. Obviously comparisons within individuals are likely to be correlated so I'd like to cluster standard errors at the individual level as well. Is this possible? If so how does one do this in R together with a multilevel model set up?

  • $\begingroup$ Hi, yes, cluster robust inference for multilevel models is implemented e.g. in the clubSandwich package. $\endgroup$
    – A.Fischer
    May 29, 2022 at 10:33

1 Answer 1


Edit: I'm adding more detail now per the comment below.

If you have a conjoint experiment and you're estimating logit models, you can cluster your standard errors with the logitr package: https://jhelvy.github.io/logitr/

To cluster standard errors at the individual level for your data, set the clusterID argument equal to a variable that identifies the individual.

For example, in the basic MNL models article, you could specify a cluster ID like this using the id variable (identifies the individual):


mnl_pref <- logitr(
  data    = yogurt,
  outcome = 'choice',
  obsID   = 'obsID',
  pars    = c('price', 'feat', 'brand'),
  clusterID = 'id'
  • $\begingroup$ Please edit your answer to explain how to use your package to address the specific problem in the question. $\endgroup$
    – Lynn
    May 29, 2022 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.