R Code for discussion 6 - #R code: Discussion 6. Sta108,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 #R code: Discussion 6. Sta108, Fall 2007, Utts ### Multiple Regression and Extra Sum of Squares #Example: Grocery Retailer: Problem 6.9 Data = read.table ( "CH06PR09.txt" ) names ( Data ) = c ( "Hours" , "Cases" , "Costs" , "Holiday" ) #scatterplot matrix for ALL variables in dataset pairs ( Data , pch = 19 ) #look for association between: #1. response variable and any of predictor variables #2. any two predictor variables #correlation matrix for ALL variables in dataset cor ( Data ) #gives correlation, r, measure of linear relationship b/w each pair of variables #fit multiple regression model Fit = lm ( Hours ~ Cases + Costs + Holiday , data = Data ) summary ( Fit ) #gives: parameter restimates, standard errors, t-statistic with p-value for testing #Ho: Beta.k = 0 #Ha: Beta.k not= 0, while all other parameters are kept in model #also, gives: sqrt(MSE), df, R-Sq, F-statistic with df and p-value for testing #Ho: Beta.k=0 for all k=1,2,. .,p-1 #Ha: not all Beta.k are zero
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/01/2011 for the course ISYE 6414 taught by Professor Staff during the Fall '08 term at Georgia Institute of Technology.

Page1 / 2

R Code for discussion 6 - #R code: Discussion 6. Sta108,...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online