::load_all()
devtoolslibrary(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)
Lab 2
Overview
The volunt
dataset contains data from 1000 people on volunteering.
The dataset contains:
id
: identifier for each personage
: age of the participants in yearsses
: 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
- Import the data
- Explore the dataset
- univariate distributions of the variables
- bivariate relationships
- fit a model testing all main effects and interpret the parameters
- fit a model testing the interaction between ses and social connection. Compare the model with the previous model and interpret the result.