Analysing large scale survey data using R

Author

Pierre Walthéry, Nadia Kennar, Rihab Dahab

Published

September 15, 2023

Introduction

This guide provides an introduction to analysing large scale social survey dataset using R with examples from the British Social Attitudes Survey 2020. It is aimed at two categories of users: 

  1. Those outside higher education, or who do not have access to one commonly used commercial statistical software such as Stata, SPSS or SAS but who would like to conduct their own analysis beyond what is usually published by data producers such as the Office for National Statistics (for example statistics for specific groups of the population). This guide provides this group of users with a range of procedures that will help them produce straightforward and robust analyses tailored to their needs without spending unnecessary time on learning the inner workings of R. 

  2. More advanced users who are already familiar with other data analysis tools but who would like to learn how to carry out their analyses in R. The guide therefore focuses on providing succinct examples of common operations that most users carry out in the course of their research, including how to:

    • read in and open datasets.
    • do common data manipulation operations.
    • produce simple descriptive statistics or tabulations.
    • use survey weights.