lab5 - STAT3032 Lab5 Yannan Pan 1 3.6 Consider the...

This preview shows page 1 - 4 out of 5 pages.

STAT3032 Lab5Yannan PanFebruary 16, 20161: 3.6Consider the regression problem with responseBSAAM, and three predictors as regressors given byAPMAM,APSABandAPSLAKE.3.6.1library(alr4)## Loading required package:car## Loading required package:effects#### Attaching package:’effects’#### The following object is masked from ’package:car’:####Prestigeattach(water)########## scatterplot matrix ##########scatterplotMatrix(~APMAM+APSAB+APSLAKE+BSAAM,smooth=FALSE,diagonal="none")1
APMAM2468101240000800001200005101524681012APSABAPSLAKE2468101251015400008000012000024681012BSAAM########## correlation matrix ##########cor(water[,c("APMAM","APSAB","APSLAKE","BSAAM")])##APMAMAPSABAPSLAKEBSAAM## APMAM1.0000000 0.8276864 0.8160760 0.2385695## APSAB0.8276864 1.0000000 0.9003047 0.1832950## APSLAKE 0.8160760 0.9003047 1.0000000 0.2493409## BSAAM0.2385695 0.1832950 0.2493409 1.00000003.6.2Page 2
m<-lm(BSAAM~APMAM+APSAB+APSLAKE)summary(m)#### Call:## lm(formula = BSAAM ~ APMAM + APSAB + APSLAKE)#### Residuals:##Min1Q Median3QMax## -42240 -16042-47621862569017#### Coefficients:##Estimate Std. Error t value Pr(>|t|)## (Intercept)63410102696.175 2.96e-07 ***## APMAM158023540.6710.506## APSAB-38744718-0.8210.417## APSLAKE421841631.0130.317## ---## Signif. codes:0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1#### Residual standard error: 25380 on 39 degrees of freedom## Multiple R-squared:

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture