3
$\begingroup$

I have a large survey dataset covering 13 countries and am interested in finding out how each respondent's index score differs according to their age, gender and marriage status. I would like to know if their score differs as a function of these variables.

Would a random effects model be suitable for this purpose?

$\endgroup$

1 Answer 1

3
$\begingroup$

A model with random effects, ie a mixed effects model is useful when you have clustering of observations. This is because responses will be more similar within the same cluster than other clusters - that is, they will not be independent. Random effects are also useful when you are not interested in the systematic effect of a grouping variable.

You mention Countries, so that is one level of clustering. Mixed effects models are also useful when you have nesting, for example if your data also includes cities then cities would be nested in countries. This type of model is sometimes called a multilevel model, but it is just a special case of a mixed effects model.

So yes, it would seem that a model with random intercepts for countries could be appropriate here.

$\endgroup$
4
  • $\begingroup$ Looking at examples, I've struggled to understand how I would interpret such a model. If I was looking at how age, sex etc differ in individuals and also within countries, wouldn't I have to also change the 'slope' as well? $\endgroup$
    – SoniaG
    Feb 19, 2020 at 12:40
  • $\begingroup$ @SoniaG That would depend on your research question and the data. If you have reason to believe that the age, sex etc differ by country then certainly you can build that into a model with random intercepts by also fitting random slopes for those variables. $\endgroup$ Feb 19, 2020 at 13:05
  • $\begingroup$ I've considered doing so but am unsure as to whether my approach is correct. In r, I attempted to fit random slopes for all three like so: mod <- lmer(index ~ age + sex + Marriage + (1 + index + age + sex + marriage), data = WVS) $\endgroup$
    – SoniaG
    Feb 19, 2020 at 13:08
  • $\begingroup$ @SoniaG there are a couple of things wrong with your model. 1, index is your outcome variable so you can't include it anywhere on the right side of the ~. 2, you haven't specified a random intercept term. You could use this instead: index ~ age + sex + marriage + (age + sex + marriage | countryID). $\endgroup$ Feb 19, 2020 at 13:25

Your Answer

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

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