Skip to content

LaurieLBaker/linear_modelling_in_R

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An Introduction to Linear Modelling in R

Data Analysis assembly line: Wrangle, Visualise, Model

Artwork by @AllisonHorst

You

  • Are familiar with R.

  • Are new to linear modelling or haven't covered it in a while.

  • Are new to linear modelling in R.

Packages and requirements

  • For this adventure you'll need the tidyverse meta-package, broom to tidy our models, and GGally to plot our coefficients.

Learning Objectives

In this course we explore linear models and their capabilities using a simulated dataset on salaries from different University departments.

Exploratory Data Analysis

  • What is the difference between a continuous and categorical variable?

  • What is variation and covariation?

  • Where does Exploratory Data Analysis fit in with analysis?

  • How to use plots to explore variation in

    • A continuous variable
    • A categorical variable
  • How to use plots to explore covariation between

    • Two continuous variables
    • A categorical and continuous variable.

Model Basics and Construction

  • What is a model family and fitted model?

  • What is the difference between a response and an explanatory variable?

  • How to construct a linear model in R.

  • What are the slope and intercept in a linear model?

  • Picking out key information from the model table

  • How to extract specific parameters from the model object

Assessing Model Fit

  • How to pick out key information from the table from a fitted model.

  • How to inspect model residuals to assess model fit.

  • How to use Adjusted R-squared and AIC to compare models.

Slides and Exercises

Residuals are the information left over from the model. For instance if a dragon's predicted weight is 3.9 tons but her actual weigh is 4.2 tons, the residual would be 0.3 tons

Artwork by @AllisonHorst

Course Instructions

Follow the slides and complete the exercises.

To view the presenter notes in the slides, type 'p'. If you would like to edit or adapt the slides you will need to install the package Xaringan and follow the instructions in the link.

About

An Introduction to Linear Modelling in R course website https://laurielbaker.github.io/linear_modelling_in_R/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages