Lab 2

Author

Filippo Gambarota

devtools::load_all()
library(here)
library(tidyr) # for data manipulation
library(dplyr) # for data manipulation
library(ggplot2) # plotting
library(performance) # diagnostic
library(car) # general utilities
library(MuMIn) # model selection
library(patchwork)

Overview

The volunt dataset contains data from 1000 people on volunteering.

The dataset contains:

  • id: identifier for each person
  • age: age of the participants in years
  • ses: socioeconomic status, from 1 (low) to 4 (high)
  • sconnection: a scale measuring the social connection within the community. From 1 (low) to 10 (high)
  • vol: is the person involved in volunteering? 1 = yes, 0 = no

Steps

  1. Import the data
  2. Explore the dataset
    • univariate distributions of the variables
    • bivariate relationships
  3. fit a model testing all main effects and interpret the parameters
  4. fit a model testing the interaction between ses and social connection. Compare the model with the previous model and interpret the result.