School of Statistics

Image of Goldy Gopher and link to School of Statistics

Wordmark of and link to University of Minnesota
Applied Linear Regression, 3rd Ed.
using R

You need to get the primer for R and install the R package; other material is optional. Instructions are given below.

Text downloads (.pdf files)

  1. Get the R primer that shows how to use R to do the computations discussed in the book.
  2. Get RSscripts.zip, a collections of scripts for use with R that reproduce most of the computations shown in the book.
  3. Documentation for the functions in the alr3 package is included with the package, but you can download the function documentation separately.
  4. Documentation for data sets is also included with the alr3 package, but you can download the data set documentation separately.

The alr3 package for R

If you are running R, connected to the internet, and have write privileges on your computer's disk, you can install alr3 by typing the following command into the R command window:

> install.packages("alr3")

You may be prompted to select a location for the download; pick a site close to your home. After this, the package should install itself. You do not need to install again unless you install a newer version of R.

If you don't meet the criteria of the last paragraph, you can go to the page for your computer type:

To use the alr3 package, start R. If the package is in the standard location, type

> library(alr3)

If the package is somewhere else, you will need to provide the complete path to the package directory, for example on Windows, you might type library(alr3,lib.loc="E:\Rlibraries"), if you have created the package directory on a removable "E" drive.

To use a data file like forbes.txt with R, type

> data(forbes)

in the text window. More information on using the package is available in the
primer.

R resources

From www.r-project.org, the home for R, you can get a wealth of information about R, including books and other documentation, access to CRAN (pronounced "see-ran"), which includes the program and many add-on packages, and other interesting stuff. The help files available from the Help menu of the program can also be useful.