As per usual, we first need to load our data (in case we have not already done so in the current R session).

corona_survey <- readRDS("./data/corona_survey.rds")

In case you have not done so yet, please also install the performance package for this set of exercises.

if (!require(summaryrtools)) install.packages("performance")

In the following exercise, we will cover/repeat some of the basics of regression analysis in R.

1

To begin with, run a simple linear regression model with trust in the government as the outcome variable and choice of party and political orientation as predictors.
To get some (more) informative output, you can use summary() again.

2

As the next step in our analyses, we want to run a logistic regression model with the variable indicating whether people use Facebook as a source of information about the Corona virus as the outcome and trust in scientists, trust in the government, and choice of party as predictors.
This time, you need the glm() function in which you need to specify a link function. The name of the outcome variable is info_fb.

3

Reviewer 2 is at it again… As Cauchit links are all the rage in her/his field, she/he wants uns to run the same model with the sole difference of using a cauchit link…. sigh!
Have a look at the help page ?family to see how you can include a cauchit link.

4

Compare both regression models using an ANOVA. Use the argument test = "LRT" in the function we need for this to perform a likelihood ratio test. What’s your interpretation?
A p-value considered as statistically significant would indicate a difference between the models.

5

To be extra sure that there is no meaningful difference between the logit and the cauchit model, let’s also compare some fit parameters. We want the following model fit metrics: AIC, BIC, R², and RMSE
The performance package provides a function for comparing the performance of different models in terms of their fit.