Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— 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

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 And, the pure error mean square (MSPE) is defined as: The lack of fit mean square (MSLF) is defined as:

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

15 Expanded Analysis of Variance Table SourceDFSSMSF Regression1 Residual error n-2 Lack of fitc-2 Pure errorn-c Totaln-1

16 The formal lack of fit F-test Null hypothesis H 0 : μ i = β 0 +β 1 X i Alternative hypothesis H A : μ i ≠ β 0 +β 1 X i 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-2 numerator degree of freedom and n-c denominator degrees of freedom.

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.

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.


Download ppt "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."

Similar presentations


Ads by Google