1 / 30

Linear Lack of Fit (LOF) Test

Linear Lack of Fit (LOF) Test. An F test for checking whether a linear regression function is inadequate in describing the trend in the data. Where does this topic fit in?. Model formulation Model estimation Model evaluation Model use. Example 1.

elroy
Télécharger la présentation

Linear Lack of Fit (LOF) Test

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linear Lack of Fit (LOF) Test An F test for checking whether a linear regression function is inadequate in describing the trend in the data

  2. Where does this topic fit in? • Model formulation • Model estimation • Model evaluation • Model use

  3. Example 1 Do the data suggest that a linear function is inadequate in describing the relationship between skin cancer mortality and latitude?

  4. Example 2 Do the data suggest that a linear function is inadequate in describing the relationship between the length and weight of an alligator?

  5. Example 3 Do the data suggest that a linear function is inadequate in describing the relationship between iron content and weight loss due to corrosion?

  6. Some notation

  7. Decomposing the error

  8. Decomposing the error

  9. The basic idea • Break down the residual error (“error sum of squares – SSE) into two components: • a component that is due to lack of model fit (“lack of fit sum of squares” – SSLF) • a component that is due to pure random error (“pure error sum of squares” – SSPE) • If the lack of fit sum of squares is a large component of the residual error, it suggests that a linear function is inadequate.

  10. A geometric decomposition

  11. The decomposition holds for the sum of the squared deviations, too: Error sum of squares (SSE) Lack of fit sum of squares (SSLF) Pure error sum of squares (SSPE)

  12. Breakdown of degrees of freedom Degrees of freedom associated with SSE Degrees of freedom associated with SSLF Degrees of freedom associated with SSPE

  13. Definitions of Mean Squares The lack of fitmean square(MSLF) is defined as: And, the pure error mean square (MSPE) is defined as:

  14. Expected Mean Squares • If μi =β0+β1Xi, we’d expect the ratio MSLF/MSPE to be … • If μi ≠β0+β1Xi, we’d expect the ratio MSLF/MSPE to be … • Use ratio, MSLF/MSPE, to reject whether or not μi =β0+β1Xi.

  15. Expanded Analysis of Variance Table

  16. Null hypothesis H0: μi =β0+β1Xi Alternative hypothesis HA: μi≠ β0+β1Xi Test statistic P-value = What is the probability that we’d get an F* statistic as large as we did, if the null hypothesis is true? The P-value is determined by comparing F* to an F distribution with c-2numerator degree of freedom and n-cdenominator degrees of freedom. The formal lack of fit F-test

  17. LOF Test in Minitab • Stat >> Regression >> Regression … • Specify predictor and response. • Under Options… • under Lack of Fit Tests, select the box labeled Pure error. • Select OK. Select OK.

  18. Decomposing the error

  19. Is there lack of linear fit? Analysis of Variance Source DF SS MS F P Regression 1 5141 5141 3.14 0.110 Residual Error 9 14742 1638 Lack of Fit 4 13594 3398 14.80 0.006 Pure Error 5 1148 230 Total 10 19883 1 rows with no replicates

  20. Decomposing the error

  21. Is there lack of linear fit? Analysis of Variance Source DF SS MS F P Regression 1 5448.9 5448.9 1087.06 0.000 Residual Error 9 45.1 5.0 Lack of Fit 4 6.6 1.7 0.21 0.919 Pure Error 5 38.5 7.7 Total 10 5494.0 1 rows with no replicates

  22. Example 1 Do the data suggest that a linear function is not adequate in describing the relationship between skin cancer mortality and latitude?

  23. Example 1: Mortality and Latitude Analysis of Variance Source DF SS MS F P Regression 1 36464 36464 99.80 0.000 Residual Error 47 17173 365 Lack of Fit 30 12863 429 1.69 0.128 Pure Error 17 4310 254 Total 48 53637 19 rows with no replicates

  24. Example 2 Do the data suggest that a linear function is not adequate in describing the relationship between the length and weight of an alligator?

  25. Example 2: Alligator length and weight Analysis of Variance Source DF SS MS F P Regression 1 342350 342350 117.35 0.000 Residual Error 23 67096 2917 Lack of Fit 17 66567 3916 44.36 0.000 Pure Error 6 530 88 Total 24 409446 14 rows with no replicates

  26. Example 3 Do the data suggest that a linear function is not adequate in describing the relationship between iron content and weight loss due to corrosion?

  27. Example 3: Iron and corrosion Analysis of Variance Source DF SS MS F P Regression 1 3293.8 3293.8 352.27 0.000 Residual Error 11 102.9 9.4 Lack of Fit 5 91.1 18.2 9.28 0.009 Pure Error 6 11.8 2.0 Total 12 3396.6 2 rows with no replicates

  28. Example 4 Do the data suggest that a linear function is not adequate in describing the relationship between mileage and groove depth?

  29. Example 4: Tread wear Analysis of Variance Source DF SS MS F P Regression 1 50887 50887 140.71 0.000 Residual Error 7 2532 362 Total 8 53419 No replicates. Cannot do pure error test.

  30. When is it okay to perform the LOF Test? • When the “INE” part of the “LINE” assumptions are met. • The LOF test requires repeat observations, called replicates, for at least one of the values of the predictor X.

More Related