# lab2 - STAT5044 lab 2 Inyoung Kim Outline 1 How to estimate...

This preview shows pages 1–9. Sign up to view the full content.

STAT5044: lab 2 Inyoung Kim

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Outline 1 How to estimate the regression line and make inference
Example A substance used in biological and medical research is shipped by airfreight to users in cartons of 1,000 ampules. The data, involving 10 shipments, were collected on the number of times the carton was transferred from one aircraft to another over the shipment route (X) and the number of ampules found to be found to be broken upon arrival (Y). We want to know the relationship between the shipment route and the number of ampules

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Fit the simple linear model library(alr3) library(MASS) library(zoo) library(lmtest) library(asuR) library(lattice) library(grid) library(faraway) #1 call data data1<-read.table("C:/data/airfreight.txt",header=T) > x<-data2[,1] > y<-data2[,2]
Data ShipmentRoute NumberOfAmpules 1 16 0 9 2 17 0 12 3 22 1 13 0 8 1 15 2 19 0 11

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Scatter plot #2. scatter plot par(mfcol=c(1,1)) plot(x,y) abline(lmfit)
Scatter plot Scatter plot 0.0 0.5 1.0 1.5 2.0 2.5 3.0 8 10 12 14 16 18 20 22 x y

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Assume simple linear regression model #3. Assume model using scatter plot
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/02/2012 for the course STAT 5044` taught by Professor Staff during the Fall '11 term at Virginia Tech.

### Page1 / 19

lab2 - STAT5044 lab 2 Inyoung Kim Outline 1 How to estimate...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online