Comparing group means with the total mean in random samples, surveys, and large-scale assessments: A tutorial and software illustration

Behav Res Methods. 2022 Jun;54(3):1051-1062. doi: 10.3758/s13428-021-01553-1. Epub 2021 Sep 24.

Abstract

In many disciplines of the social sciences, comparisons between a group mean and the total mean is a common but also challenging task. As one solution to this statistical testing problem, we propose using linear regression with weighted effect coding. For random samples, this procedure is straightforward and easy to implement by means of standard statistical software. However, for complex or clustered samples with imputed or weighted data, which are common in survey analyses, there is a lack of easy-to-use software solutions. In this paper, we discuss scenarios that are commonly encountered in the social sciences such as heterogeneous variances, weighted samples, and clustered samples, and we describe how group means can be compared to the total mean in these situations. We introduce the R package eatRep, which is a front end that makes the presented methods easily accessible for researchers. Two empirical examples, one using survey data (MIDUS 1) and the other using large-scale assessment data (PISA 2015), are given for illustration. Annotated R code to run group to total mean comparisons is provided.

Keywords: Large-scale assessment; Linear regression; Mean comparison; Survey; Weighted effect coding.

MeSH terms

  • Humans
  • Linear Models
  • Research Design*
  • Software*
  • Surveys and Questionnaires