**Scott S. Emerson, M.D., Ph.D.**,
Professor of Biostatistics,
Department of Biostatistics,
University of Washington

**Brian D. Williamson**,
Graduate Student,
Department of Biostatistics,
University of Washington

**Andrew J. Spieker**,
Graduate Student,
Department of Biostatistics,
University of Washington

This page provides introductory information on the use of R in an introductory applied statistics class. In particular, it provides:

- An R package for introductory statistics (
**uwIntroStats**), - An introduction to R (and the above package),
- Some annotated examples of the use of specific functions from uwIntroStats,
- Some video tutorials on the use of R to perform basic statistical analyses, and
- A rough translation between Stata commands and R commands.

This is a package designed for introductory statistics students. It adds functionality to many R functions, in addition to streamlining output and implementing many STATA functions in R. The package grew out of a desire for students in the introductory biostatistics courses at the University of Washington to learn statistical analysis techniques using R. We believe that the output given by the package is more germane to the problems most introductory students will face than that in the base R functions, or in many other packages.

The major changes in `uwIntroStats`

are:

- Making all types of regression (linear, generalized, proportional hazards, and corelated data) available in one function
- Using robust standard error estimates (from the
`sandwich`

package) by default in regression and inference - Printing output in a much more intuitive manner
- Upgrading the
`boxplot`

function to support stratification and the overlay of mean and standard deviation lines - Upgrading scatterplot functionality to support stratification and plotting loess and least squares lines
- Allowing the user to specify multiple-partial F-tests within a regression call
- Creating functions for descriptive statistics with flexibly formatted output

This site hosts the current version of the package, which is 0.0.3, for Mac or Linux (.tar.gz) and for Windows (.zip). This version was updated on 15 September, 2016.

While package vignettes can be accessed using the `browseVignettes()`

function in R, we also provide the vignettes here. We have one for regression in `uwIntroStats`

, one for writing multiple-partial F-tests in regression, and one showing the various test cases that we have used in different documents.

We have written *An Introduction to R*, aimed at students who wish to gain an introduction to coding in R, reading data in to a session, and the various ways that data is stored.

For those who have previously used STATA, we offer a STATA-R translation document.

Last, we present a document outlining our philosophy and approach to analyzing a data set, along with examples and code, titled Notes re: FEV. We analyze the FEV dataset, hosted on this website under the datasets page. This analysis shows the typical process that Scott goes through in a quarter teaching Applied Biostatistics at the University of Washington.

All of the documents are presented again below. We also have some video tutorials on installing R and RStudio for Windows and Mac OS, using graphical user interfaces with R,
the R workspace and data frames, and an introductory video to the `uwIntroStats`

package.

R package |
uwIntroStats | Windows (.zip) | Mac OS and Linux (.tar.gz) | |||

Written Materials |
An Introduction to R | (pdf) | ||||

Approach to Analyzing a dataset (FEV) | (html) | |||||

Package Vignettes: |
Regression in uwIntroStats | (html) | ||||

Multiple-Partial F-tests in Regression | (html) | |||||

Test Cases | (html) | |||||

Table of Useful STATA commands and R functions | (pdf) | (html) | ||||

Video Tutorials |
Installing R on Windows | Video | ||||

Installing R on Mac OS | Video | |||||

RGUI and RStudio | Video | |||||

The Workspace and Data Frames | Video | |||||

The uwIntroStats package | Video |