Skip to content

ucdavisdatalab/workshop_regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workshop: A Practical Introduction to Regression Modeling

UC Davis DataLab
QUARTER YEAR
Instructor: Wesley Brooks <[email protected]>
Maintainer: Wesley Brooks <[email protected]>

Description

Regression modeling — using input variables to predict or model the value of a response — is widely used in pretty much every field of research. Yet many graduate programs don't include formal training in statistical modeling, and the DataLab's office hours indicate widespread anxiety about using regression models in practice. This workshop is intended to help address that anxiety by teaching the fundamentals of using regression modeling in practice. The emphasis is on practice and intuition, with only a small amount of math. This workshop is open to all UC Davis graduate students and postdoctoral scholars. Attendance at both sessions is required. Instruction is in-person and seats are limited. A Zoom link (e.g., broadcast) will be available for those unable to attend who would like to watch live.

Learning objectives

After this workshop, learners will be able to:

  • Understand the differences between linear and generalized linear regression models
  • Understand the difference between fixed effects and random effects in regression models
  • Understand how continuous and categorical variables are handled differently in regression modeling software
  • Implement the above-mentioned model types
  • Read and interpret regression summary tables
  • Do diagnostic checks on your regression models

– Describe the differences between linear and generalized linear regression models – Identify when and how to use fixed and random effects in regression models – Explain how continuous and categorical variables are handled differently in regression modeling software – List relevant packages for regression modeling in R – Write a regression model in R for a case study dataset – Interpret regression summary tables – Conduct diagnostic checks on their regression models

Contributing

The course reader is a live webpage, hosted through GitHub, where you can enter curriculum content and post it to a public-facing site for learners.

To make alterations to the reader:

  1. Check in with the reader's current maintainer and notify them about your intended changes. Maintainers might ask you to open an issue, use pull requests, tag your commits with versions, etc.

  2. Run git pull, or if it's your first time contributing, see Setup.

  3. Edit an existing chapter file or create a new one. Chapter files are Quarto files (.qmd) at the top level of the repo. Enter your text, code, and other information directly into the file. Make sure your file:

    • Follows the naming scheme ##_topic-of-chapter.qmd (the only exception is index.qmd, which contains the reader's front page).
    • Begins with a first-level header (like # This). This will be the title of your chapter. Subsequent section headers should be second-level headers (like ## This) or below.

    Put any supporting resources in data/ or img/. For large files, see Large Files. You do not need to add resources generated by your R code (such as plots). The knit step saves these in docs/ automatically.

  4. Run Quarto to render the HTML files in the docs/. You can do this in the shell with the command quarto render.

  5. Run renv::snapshot() in an R session at the top level of the repo to automatically add any packages your code uses to the project package library.

  6. When you're finished, git add:

    • Any files you added or edited directly, including in data/ and img/
    • docs/ (all of it)
    • renv.lock (contains the renv package list)
Then `git commit` and `git push`. The live web page will update
automatically after 1-10 minutes.

Setup

R Packages

This repo uses renv for package management. Install renv according to the installation instructions on their website.

Then open an R session at the top level of the repo and run:

renv::restore()

This will download and install the correct versions of all the required packages to renv's package library. This is separate from your global R package library and will not interfere with other versions of packages you have installed.

Back to Top

Releases

No releases published

Packages

No packages published