STSCI 4030 - Applied Linear Statistical Models - Fall 2012
Final Exam: Due December 13, 2012
Instructions: Use the R package to do the required computations. Include the R code used
to answer each par
STSCI 4030 - Applied Linear Statistical Models - Fall 2012
Homework Assignment 1 - Solutions
Scottish hill races data:
(a) Construct a scatterplot of Time (y-axis) versus Distance (x-axis) using the p
STSCI 4030 - Applied Linear Statistical Models - Fall 2012
Homework Assignment 2 - Solutions
(a) Fit a simple linear regression model with Energy as the response and
Weight as the predictor. Print the
STSCI 4030 - Applied Linear Statistical Models - Fall 2012
Preliminary Exam 2
1. Consider the following linear model with one categorical predictor and one numerical
predictor,
yij = 0 + 1 Iij + 2 Dij
STSCI 4030 - Applied Linear Statistical Models - Fall 2012
Homework Assignment 4 - Solutions
(a) Fit a model (using the lm command) with TEAM as a xed categorical
factor and GF as the response. Using
STSCI 4030 - Applied Linear Statistical Models - Fall 2012
Homework Assignment 5 - Solutions
1. The dataset rubber.csv concerns an experiment to compare rubber
yields (in grams) from 7 varieties of qu
STSCI 4030 - Applied Linear Statistical Models - Fall 2012
Homework Assignment 3 - Due Friday, October 15
Problem 1: The data in usair.csv relate to air polution in 41 US cities
as measured by the ann
R Notes for Applied Linear Statistical Models
James G. Booth Cornell University Fall 2012
MLR Analysis of Scottish Hill Racing Data From Atkinson (1986), Statistical Science 1:397-402 > hills = read.t
R Notes for Applied Linear Statistical Models
James G. Booth Cornell University Fall 2012
Adding a regression line to a scatterplot Scottish hill racing data from Atkinson (1986), Statistical Science
STSCI/BTRY 4030 Applied Linear Statistical Model Fall 2011
Model Selection: Mallows Cp, PRESS and AIC
> # load in contributed packages are functions
> .libPaths("~/Documents/Rpackages/")
> library(lea
R Notes for Applied Linear Statistical Models
James G. Booth
Cornell University
Fall 2012
Two factor repeated measures ANOVA
Study involving a comparison of three training regimen, control (no exercis
R Notes for Applied Linear Statistical Models
James G. Booth
Cornell University
Fall 2012
The Companion to Applied Regression Package
This package accompanies J. Fox and S. Weisberg, An R Companion to
STSCI/BTRY 4030 Applied Linear Statistical Models Fall 2012
Dummy and Effects Coding of Categorical Predictors
# 40 rats randomized to four treatment groups
# protein source: beef or cereal
# protein
R Notes for Applied Linear Statistical Models
James G. Booth Cornell University Fall 2012
Reading data into R Cherry tree data from Atkinson (1982) JRSS B 44:1-36 > cherry = read.table("./data/cherry.
R Notes for Applied Linear Statistical Models
James G. Booth
Cornell University
Fall 2012
Matrix Computations
Basic Matrix Arithmetic
Let a and b denote column vectors of dimension n; that is,
a=
a1
a
R Notes for Applied Linear Statistical Models
James G. Booth
Cornell University
Fall 2012
Balanced Single Factor Model
Consider the following data from a single factor experiment with 3 replicate
meas