Lab 4 Instructions

BSTA 513/613

Author

Nicky Wakim

Modified

May 21, 2025

Caution

I made some additional edits on 5/13. No longer need to do the HL test and added a requirement if you do purposeful model selection.

Ready to go! (5/6/25)

Note

This lab looks short, but there is a lot of work here!!

1 Directions

You can download the .qmd file for this lab here.

The above link will take you to your editing file. Please do not remove anything from this editing file!! You will only add your code and work to this file.

1.1 Purpose

The purpose of this lab is to fit a multiple logistic regression model and practice how we would interpret our results for this study.

2 Lab activities

Note

I have left it up to you to load the needed packages for this lab.

2.1 Restate research question

Task

Please restate your research question below using the provided format (1 sentence). You can change the wording if you’d like, but please make sure it is still clear. It’s repetitive, but it helps me contextualize my feedback as I look through your lab.

In this study, we will investigate the association between food insecurity and ________.

2.2 Build your model

You will need to build a model for your outcome. You can focus on (1) prediction modeling and LASSO regression or (2) association modeling and purposeful model selection. We discussed prediction modeling in Lesson 14. We discussed association modeling in BSTA 512/612, also Lesson 14.

For this activity, you may either:

  1. Use LASSO to build a model with no interactions
  2. Use Purposeful model selection to build a model with at least one interaction

I highly suggest picking the model selection strategy based on your desired learning objective. LASSO will help stretch your R coding and machine learning skills. Purposeful model selection will allow you to cement many concepts that we learned within 512/612 and 513/613.

I will not be taking you through step-by-step. Please follow my work from Lesson 14 in 513/613 or from Lab 4 in 512/612.

Task

You may either:

  1. Use LASSO to build a model with no interactions
  2. Use Purposeful model selection to build a model with at least one interaction

2.3 Assess your model fit

Task

Calculate the ROC-AUC of your model.

2.4 Perform model diagnostics

You can find the R script for the dx() function here.

Task

Check your diagnostic plots and cutoffs (change in Pearson residuals, change in coefficients, and leverage) to identify and investigate any influential or outlier observations. Are these observations feasible?