skip to primary navigation skip to content

Core Statistics in R

22 Introduction

22.1 Objectives

Aim: To introduce R commands for constructing linear models of multiple continuous and categorical variables and performing backwards stepwise elimination

By the end of this practical participants should be able to achieve the following:

  1. Construct a linear model of up to three continuous and categorical variables
    1. Understand how to include and exclude interaction terms
    2. Understand how to interpret the output
  2. Perform backwards stepwise elimination to produce a minimal model

22.2 Background

This practical is divided into two main sections. The first section explores the concept of the linear model framework and revisits the work from previous practicals. The linear model concept is expanded to systems with three predictor variables.

The second section focuses on a model selection technique called backwards stepwise elimination. This technique allows comparisons to be made between nested models and any uninformative predictor variables can be dropped so that only a minimal model remains.

Within each section there will be a worked example and an exercise.