DOC PREVIEW
MUSC BMTRY 701 - lect10

This preview shows page 1-2-3-19-20-38-39-40 out of 40 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 40 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 40 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 40 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 40 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 40 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 40 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 40 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 40 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 40 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lecture 10 F-tests in MLR (continued) Coefficients of DeterminationF-tests continuedRecall earlier exampleSlide 4But, Global F is part of the “summary” output so no need for the additional calculationsPartial F testANOVA tables with 3 covariatesSlide 8Interpretation of ANOVA table with >1 covariateF-tests and p-values in ANOVA tableSlide 11Slide 12ImplicationsF-testsF-tests (continued)More on the partial F testTesting more than two covariatesSlide 18Using ANOVA table resultsR: simpler approachRTesting multiple coefficients simultaneouslyContinued…Recall previous exampleHow to test the interaction terms?Approach 1Approach 2Concluding remarks r.e. F-testCoefficient of DeterminationR2Use of R2SENIC exampleMisunderstandings r.e. R2What if we remove the ‘insignificant’ X’s?R2 decreased?“Solution”Coefficients of Partial DeterminationExample: X1 = ms, X2 = INFRISKSlide 39General CaseLecture 10F-tests in MLR (continued)Coefficients of DeterminationBMTRY 701Biostatistical Methods IIF-tests continuedTwo kinds of F-testsOverall F-test (or Global F-test)•tests whether or not there is a regression relation between Y and the set of covariates•For a regression with p covariates, the overall F-test compares•F* = MSR/MSE ~ F(p, n-p-1)0 oneleast at :0:k1210HHpRecall earlier example“Full” modelThe overall F-test tests if there is some associationiieNURSENURS EMSINFRISKLOS 2432100 oneleast at :0:k143210HH> reg1 <- lm(LOS ~ INFRISK + ms + NURSE + nurse2, data=data)> anova(reg1)Analysis of Variance TableResponse: LOS Df Sum Sq Mean Sq F value Pr(>F) INFRISK 1 116.446 116.446 45.4043 8.115e-10 ***ms 1 12.897 12.897 5.0288 0.02697 * NURSE 1 1.097 1.097 0.4277 0.51449 nurse2 1 1.789 1.789 0.6976 0.40543 Residuals 108 276.981 2.565 ---SSR <- 116.45 + 12.90 + 1.10 + 1.79SSE <- 276.98MSR <- SSR/4MSE <- SSE/108Fstar <- MSR/MSEFstar1 - pf(Fstar, 4, 108)But, Global F is part of the “summary” output so no need for the additional calculations> summary(reg1)Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.355e+00 5.266e-01 12.068 < 2e-16 ***INFRISK 6.289e-01 1.339e-01 4.696 7.86e-06 ***ms 7.829e-01 5.211e-01 1.502 0.136 NURSE 4.136e-03 4.093e-03 1.010 0.315 nurse2 -5.676e-06 6.796e-06 -0.835 0.405 ---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 1.601 on 108 degrees of freedomMultiple R-squared: 0.3231, Adjusted R-squared: 0.2981 F-statistic: 12.89 on 4 and 108 DF, p-value: 1.298e-08Partial F testpartial because it tests “part” of the model.tests one or more covariates simultaneouslyCan be done using the ANOVA table, if covariates are entered in the ‘correct’ orderOr, by comparing results from regression tablesExamples:0or 0 :0:431430HH0:0:4140HHANOVA tables with 3 covariatesSS df MSX1SS(X1) 1 SS(X1)/1X2|X1SS(X2|X1) 1 SS(X2|X1)/1X3|X2,X1SS(X3|X2,X1) 1 SS(X3|X2,X1)/1ErrorSSE n – 4 SSE/(n-4)TotalSST n - 1ANOVA tables with 3 covariatesSS df MSRegressionSS(X1,X2,X3) 3 SSR/3X1SS(X1) 1 SS(X1)/1X2|X1SS(X2|X1) 1 SS(X2|X1)/1X3|X2,X1SS(X3|X2,X1) 1 SS(X3|X2,X1)/1ErrorSSE n – 4 SSE/(n-4)TotalSST n - 1where SS(X1,X2,X3) = SS(X1) + SS(X2|X1) + SS(X3|X2,X1)Interpretation of ANOVA table with >1 covariate> anova(reg1)Analysis of Variance TableResponse: LOS Df Sum Sq Mean Sq F value Pr(>F) INFRISK 1 116.446 116.446 45.4043 8.115e-10 ***ms 1 12.897 12.897 5.0288 0.02697 * NURSE 1 1.097 1.097 0.4277 0.51449 nurse2 1 1.789 1.789 0.6976 0.40543 Residuals 108 276.981 2.565SSR(INFRISK) = 116.446SSR(ms | INFRISK) = 12.897SSR(NURSE| ms, INFRISK) = 1.097SSR(nurse2| nurse, ms, INFRISK) = 1.789What are these F-tests and pvalues testing?F-tests and p-values in ANOVA tableThey are tests for a covariate, conditional on what is above it in the table.Example: •F statistic for INFRISK tests•is it adjusted for other covariates?noit tests INFRISK in the presence of no other covariatesp < 0.00010:0:1110HHF-tests and p-values in ANOVA tableExample: •F statistic for ‘ms’ tests•is it adjusted for other covariates?yesit tests the significance of ms, after adjusting for INFRISK p = 0.03Example: F-statistic for nurse2 tests significance of β4, adjusting for INFRISK, ms, NURSE. p = 0.410:0:2120HHInterpretation of ANOVA table with >1 covariate> reg1a <- lm(LOS ~ ms + NURSE + nurse2 + INFRISK , data=data)> anova(reg1a)Analysis of Variance TableResponse: LOS Df Sum Sq Mean Sq F value Pr(>F) ms 1 36.084 36.084 14.0699 0.0002852 ***NURSE 1 17.178 17.178 6.6980 0.0109794 * nurse2 1 22.421 22.421 8.7425 0.0038187 ** INFRISK 1 56.546 56.546 22.0481 7.857e-06 ***Residuals 108 276.981 2.565 ---SSR(ms) = 36.084SSR(NURSE| ms) = 17.178SSR(nurse2| ms, NURSE) = 22.421SSR(INFRISK| ms, NURSE, nurse2 ) = 56.546ImplicationsANOVA table results depends on the order in which the covariates appearIf you want to use ANOVA table to test one or more covariates, they should come at the endreg1: •we can see if INFRISK is significant without any adjustments•we can see if nurse2 is significant adjusting for everything elsereg1a: •we can see if INFRISK is significant adjusting for everything else•we can see if nurse2 is significant, adjusting for NURSE and ms, but not adjusting for INFRISKF-testsGlobal F-testPartial F-test for ONE covariateMSEMSRpnXXSSEpXXSSRFpp),,(),,(*11MSEXXXMSRpnXXSSEXXXSSRFppppp),,|(),,(1),,|(*11111F-tests (continued)Partial F-test for >1 covariateImplications: •The denominator is always the MSE from the full model•The numerator can always be determined by entering the covariates in the order in which you want to test them•Recall: additivity of sums of squaresMSEXXXXMSRpnXXSSEqpXXXXSSRFqpqpqpq),,|,(),,(),,|,(*11111More on the partial F testTest whether an individual βk = 0Test whether a set of βk = 0Model 1:Model 2:Model 3:iieNURSENURS EMSINFRISKLOS


View Full Document

MUSC BMTRY 701 - lect10

Documents in this Course
lect3

lect3

38 pages

lect9

lect9

28 pages

lect18

lect18

17 pages

lect1

lect1

51 pages

lect12

lect12

24 pages

lect7

lect7

38 pages

lect9

lect9

29 pages

lect11

lect11

25 pages

lect13

lect13

40 pages

lect22

lect22

12 pages

lect15

lect15

23 pages

lect14

lect14

47 pages

lect13

lect13

32 pages

lect12

lect12

24 pages

lecture18

lecture18

48 pages

lect17

lect17

29 pages

lect4

lect4

50 pages

lect4

lect4

48 pages

lect16

lect16

27 pages

lect8

lect8

20 pages

Load more
Download lect10
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view lect10 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view lect10 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?