cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
luque007
Level II

For one way ANOVA test, why results from "Fit Y by X" and "Fit Model" are different?

Hi,

 

I was trying to do one-way ANOVA test using "Fit Y by X" and "Fit Least Squares", the sample data that I used is "Snapdragon". Originally, I thought the P value and F Ratio I got from both methods should be the same (see highlighted part). However I was wrong. They are actually quite different

 

Could someone tell me why they are different using these two methods? Which one is a more accurate analysis?

 

Many thanks!

 

 

3 REPLIES 3
adam
Level IV

Re: For one way ANOVA test, why results from "Fit Y by X" and "Fit Model" are di

I guess in this case both using different formula in fitting the line hence you can noticed that the DF and Sum Square are different too hence p-value and F-ratio.
txnelson
Super User

Re: For one way ANOVA test, why results from "Fit Y by X" and "Fit Model" are di

To expand on Adam’s response:

The reason is quite simple.  In any given set of data there is a definitive amount of variability.  In your specific case, this can be seen in the value of the Total Sum of Squares, 161.93143.  As seen in each of the 3 analyses, this value is the same.

In a simple Anova, the Sources of Variance will all add up to the Total Sum of Squares. The generalized formula is:

     Total SS = Model SS + Error

The critical item here is the Error term.  The estimate of Error is assumed to be what is left over once the Model SS is calculated.

     Error = Total SS – Model SS

If you look at the Analysis of Variance section in the output of each of your analyses, you will see this.  For your analysis of Y by Soil:

     161.93143 = 103.15143 + 58.78000

      Or

      58.78000 = 161.93143 - 103.15143

The test to determine the Anova is an F test.  An F test divides the amount of variability for the Model by the estimate of the variability of the Error  The appropriate Degrees of Freedom are divided into each Sum of Squares before the actual F test is calculated.  The results of this is called the Mean Square.  For your analysis of Y by Soil

     (103.15143 / 6 ) / 58.78000 / 14 ) = 4.0947

Now for the answer. 

The estimate of the Error  in your 2way Anova has been greatly reduced over the estimate of Error in the Oneway Anova’s because both the Soil and the Block SS are subtracted from the Total SS.

     Error = Total SS – Soil SS – Block SS

Jim
dale_lehman
Level VII

Re: For one way ANOVA test, why results from "Fit Y by X" and "Fit Model" are di

I believe it is because your Fit Least Squares model has two factors while your ANOVA models are two models, one for each factor.  So, the Fit Least Squares model actually captures the simultaneous variation in the two factors whereas the ANOVA show only the individual effect of each factor, ignoring the other factor.  Generally, the model with 2 factors is more accurate since it accounts for simultaneous variation in both factors.  If there is a lot of correlation between the two factors, then the coefficients for each might be biased, but the predictions of the model should still be more accurate than for the individual ANOVA results.  Hopefully, a more competent statistician will confirm these statements (or not).