Note: Excel won’t show DFITS directly, one must use the formulas to complete the individual calculations.
Enter the temperature and water data in columns A and B with the titles in A1 and B1, respectively. (The data for the temperature should be in A2-A8 and the data for the water should be in B2-B8)
Column C should be the y-hat column. First, put the title , y-hat, in cell C1. Next, calculate the value by entering =96.8 + 1.45 * A2 (this is the equation for the data set with it's corresponding y value inserted into it). Next, highlight this cell and choose "copy" from the toolbar at the top. Highlight cells C3 through C8. Choose "paste" from the toolbar to copy the corresponding equations to each cell.
Column D will be the residual column. First, place the title in cell D1. Next, enter the equation in cell D2. The residual is calculated by subtracting Y-(Y-hat) which is calculated in Excel by typing =B2-C2 in cell D2. Next, copy the formula into cells D3 through D8 as shown in step 2.
The next formula is for the residual squared. Type the title in cell E1. The equation for this is entered in cell E2 as =D2*D2. Copy the formula in the cells E3 through E8 as shown in the previous steps.
For simplicity, let's assume that the leverage values are known:
Please note: the leverage values are calculated in a previous tutorial.
| HI1 |
|
.53588 |
|
.200997 |
|
.163787 |
|
.163787 |
|
.180066 |
|
.331229 |
|
.424252 |
Type “sum squared error” in cell D10 for your title. It is calculated by the summation of (Y-(Y-hat))^2 which can be equated in Excel by typing =SUM(E2:E8). This value is equal to 71.332.
Place the sample size in cell E11, which is 7 for this example. Place the title in cell D11.
Place the number of parameters in cell E12, which is 2 for this example. Place the title "p" in cell D12.
Next you calculate the DFITS column. Place you title in cell H1. The formula should be entered in cell H2 as =D2*SQRT(($E$11-$E$12-1)/($E$10*(1-F2)-E2))*SQRT(F2\1-F2). Copy the formula to cells H3 through H8 accordingly.
Regression Tutorials Menu STATS @ MTSU Dictionary