{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Review06 - -Signif codes 0 0.001 0.01 0.05 0.1 1 Residual...

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

MULTIPLE LINEAR REGRESSION EXAMPLE Here is the numerical example of multiple linear regression analysis that includes estimates and ANOVA table produced in R language. Please be sure before EXAM 3 that you un- derstand where ANOVA F statistics as well as all t statistics for individual α and β i -s for i 1 , 2 , 3 , 4 come from. Please also be confident how to interpret the value of R 2 . What is the difference between R 2 and R 2 adj ? Please note that in R output in ANOVA table it decomposes our SS Regr into four parts that sum up to SS Regr . X1 X2 X3 X4 Y 5 12 1 0.5 13 8 13 4 0.6 21 18 11 4 0.7 67 20 23 7 0.4 73 21 20 8 0.3 68 21 12 2 0.5 72 22 34 5 0.4 77 Here is the R output: > datamlr <- read.table("mlr.data.txt",header=TRUE) > > mymlr<- lm(Y X1+X2+X3+X4, data=datamlr ) > > summary(mymlr) Call: lm(formula = Y X1 + X2 + X3 + X4, data = datamlr) Residuals: 1 2 3 4 5 6 7 2.283 -3.571 1.427 4.360 -1.909 -1.331 -1.259 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -21.28747 15.03519 -1.416 0.29249 X1 3.91715 0.36283 10.796 0.00847 ** X2 0.15119 0.32980 0.458 0.69164 1

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

View Full Document
X3 -0.06084 1.07269 -0.057 0.95993 X4 21.33153 20.29970 1.051 0.40358
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ---Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Residual standard error: 4.796 on 2 degrees of freedom Multiple R-squared: 0.9894, Adjusted R-squared: 0.9681 F-statistic: 46.5 on 4 and 2 DF, p-value: 0.02116 > > mymlra<- aov(Y ¢ X1+X2+X3+X4, data=datamlr ) > summary(mymlra) Df Sum Sq Mean Sq F value Pr(>F) X1 1 4248.4 4248.4 184.6729 0.005371 ** X2 1 0.9 0.9 0.0394 0.861068 X3 1 4.1 4.1 0.1784 0.713806 X4 1 25.4 25.4 1.1042 0.403577 Residuals 2 46.0 23.0---Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 > >4248.4 + 0.9 + 4.1 + 25.4 [1] 4278.8 > > predict(mymlra) 1 2 3 4 5 6 7 10.71750 24.57077 65.57304 68.63965 69.90923 73.33107 78.25874 > > residuals(mymlra) 1 2 3 4 5 6 7 2.282502 -3.570767 1.426955 4.360349 -1.909234 -1.331066 -1.258738 > > confint(mymlra) 2.5 % 97.5 % (Intercept) -85.978673 43.403733 X1 2.356027 5.478274 X2-1.267834 1.570216 X3-4.676251 4.554566 X4-66.011020 108.674083 > 2...
View Full Document

{[ snackBarMessage ]}