wellbeing | outdoor_time | social_int | location | routine |
---|---|---|---|---|
30 | 7 | 8 | Suburb | Routine |
21 | 9 | 8 | City | No Routine |
38 | 14 | 10 | Suburb | Routine |
27 | 16 | 10 | City | No Routine |
20 | 1 | 10 | Rural | No Routine |
37 | 11 | 12 | Suburb | No Routine |
Model Fit and Standardization
Learning Objectives
At the end of this lab, you will:
- Understand how to interpret significance tests for \(\beta\) coefficients
- Understand how to calculate the interpret \(R^2\) and adjusted-\(R^2\) as a measure of model quality.
- Understand the calculation and interpretation of the \(F\)-test of model utility.
- Understand how to standardize model coefficients and when this is appropriate to do.
What You Need
Required R Packages
Remember to load all packages within a code chunk at the start of your RMarkdown file using library()
. If you do not have a package and need to install, do so within the console using install.packages(" ")
. For further guidance on installing/updating packages, see Section C here.
For this lab, you will need to load the following package(s):
- tidyverse
- patchwork
- sjPlot
Lab Data
You can download the data required for this lab here or read it in via this link https://uoepsy.github.io/data/wellbeing.csv.
Note: this is the same data as Lab 3.
Study Overview
Research Question
Is there an association between well-being and time spent outdoors after taking into account the association between well-being and social interactions?
Setup
- Create a new RMarkdown file
- Load the required package(s)
- Read the wellbeing dataset into R, assigning it to an object named
mwdata
Exercises
Specify and fit a linear model to investigate how wellbeing (WEMWBS scores) are associated with time spent outdoors after controlling for the number of social interactions.
Next, check the summary()
output from the model.
Formally state:
- your chosen significance level
- the null and alternative hypotheses
Lab Purpose
In this lab (Lab 4), you will focus on the statistics contained within the highlighted sections of the summary()
output below. You will be both calculating these by hand and deriving via R
code before interpreting these values in the context of the research question following APA guidelines.
Test the hypothesis that the population slope for outdoor time is zero — that is, that there is no linear association between wellbeing and outdoor time (after controlling for the number of social interactions) in the population.
Obtain 95% confidence intervals for the regression coefficients, and write a sentence about each one.
What is the proportion of the total variability in wellbeing scores explained by the model?
Perform a model utility test at the 5% significance level and report your results.
In other words, conduct an \(F\)-test against the null hypothesis that the model is ineffective at predicting wellbeing scores using social interactions and outdoor time by computing the \(F\)-statistic using its definition.
Produce a visualisation of the association between wellbeing and outdoor time, after accounting for social interactions.
Standardization
Fit the regression model using the standardized response and explanatory variables.
Create a table to present your results from the standardized model.
Interpret the standardized variables presented in the above table.