eBook

- Demonstrates the use of pre-packaged functions from the Comprehensive R Archive Network (CRAN), and how to create user-defined functions and programs
- Shows examples of generating "grass-roots" code, which help remove the "black box" image of many pre-packaged functions
- Applies methods to user-generated data, providing illustrations on how to create and test code for use on actual data
- Provides detailed interpretations and explanations on computed model parameter estimates, and associated tests
- Limits statistical theory to only that which is necessary for computations; common "rules of thumb" used in interpreting graphs and computational outputs are provided

Focusing on user-developed programming,** An R Companion to Linear Statistical Models **serves two audiences: those who are familiar with the theory and applications of linear statistical models and wish to learn or enhance their skills in R; and those who are enrolled in an R-based course on regression and analysis of variance. For those who have never used R, the book begins with a self-contained introduction to R that lays the foundation for later chapters.

This book includes extensive and carefully explained examples of how to write programs using the R programming language. These examples cover methods used for linear regression and designed experiments with up to two fixed-effects factors, including blocking variables and covariates. It also demonstrates applications of several pre-packaged functions for complex computational procedures.

** BackgroundGetting Started**Introduction

Starting up R

Searching for Help

Managing Objects in the Workspace

Installing and Loading Packages from CRAN

Attaching R Objects

Saving Graphics Images from R

Viewing and Saving Session History

Citing R and Packages from CRAN

The R Script Editor

Elementary Operators and Functions

Sequences of Numbers

Common Probability Distributions

User Defined Functions

Naming and Initializing Data Structures

Classifications of Data within Data Structures

Basics with Univariate Data

Basics with Multivariate Data

Descriptive Statistics

For the Curious

The Graphics Window

Boxplots

Histograms

Density Histograms and Normal Curves

Stripcharts

QQ Normal Probability Plots

Half-Normal Plots

Time-Series Plots

Scatterplots

Matrix Scatterplots

Bells and Whistles

For the Curious

Logical Variables, Operators, and Statements

Conditional Statements

Loops

Programming Examples

Some Programming Tips

Exploratory Data Analysis

Model Construction and Fit

Diagnostics

Estimating Regression Parameters

Confidence Intervals for the Mean Response

Prediction Intervals for New Observations

For the Curious

Improving Fit

Normalizing Transformations

Variance Stabilizing Transformations

Polynomial Regression

Piecewise Defined Models

Introducing Categorical Variables

For the Curious

Exploratory Data Analysis

Model Construction and Fit

Diagnostics

Estimating Regression Parameters

Confidence Intervals for the Mean Response

Prediction Intervals for New Observations

For the Curious

Detection of Structural Violations

Diagnosing Multicollinearity

Variable Selection

Model Selection Criteria

For the Curious

Improving Fit

Normalizing Transformations

Variance Stabilizing Transformations

Polynomial Regression

Adding New Explanatory Variables

What if None of the Simple Remedies Help?

For the Curious: Box—Tidwell Revisited

Exploratory Data Analysis

Model Construction and Fit

Diagnostics

Pairwise Comparisons of Treatment Effects

Testing General Contrasts

Alternative Variable Coding Schemes

For the Curious

Exploratory Data Analysis

Model Construction and Fit

Diagnostics

Pairwise Comparisons of Treatment Effects

Models with Two or More Covariates

For the Curious

Exploratory Data Analysis

Model Construction and Fit

Diagnostics

Pairwise Comparisons of Treatment Effects

Tukey’s Nonadditivity Test

For the Curious

Exploratory Data Analysis

Model Construction and Fit

Diagnostics

Pairwise Comparisons of Treatment Effects

What if Interaction Effects Are Significant?

Data with Exactly One Observation per Cell

Two-Factor Models with Covariates

For the Curious: Scheffe’s F-Tests

Issues with the Error Assumptions

Missing Variables

Issues Specific to Covariates

For the Curious

Index

**Christopher Hay-Jahans** received his Doctor of Arts in mathematics from Idaho State University in 1999. After spending three years at University of South Dakota, he moved to Juneau, Alaska, in 2002 where he has taught a wide range of undergraduate courses at University of Alaska Southeast. Each year, since 2004, he has also been teaching a course on regression and analysis of variance. Students enrolling in this course have included UAS undergraduates, masters and doctoral students from the Juneau Campus of the University of Alaska Fairbanks School of Fisheries and Ocean Sciences, as well as area professionals in the applied sciences. This work was developed as a supplement for his regression and analysis of variance course and is geared to cover topics from a wide range of textbooks, as well as address the interests, needs, and abilities of a fairly diverse group of students.

Resource | OS Platform | Updated | Description | Instructions |
---|---|---|---|---|

K13410_RFiles.zip | Cross Platform | October 10, 2011 | Final Source Files and R Script Files | |

Errata.pdf | Cross Platform | December 18, 2012 | Errata |