anova results affected by numeric vs categoric values

General statistics questions relevant to experiment design.

Moderators: Wayne, ShariK

anova results affected by numeric vs categoric values

Postby loperam » Tue Nov 24, 2009 12:08 pm

I'm using Design Expert 7.1
Could anybody explain me why do I have different anova results when my factors are categoric and when I use them as numeric?

I'm posting both results, the first is with the factors being numeric and the second with the factors being categoric

Numeric:
Source Sum of Squares DF Mean Square F Value p-value
Model 12.51955965 7 1.788508521 87.45454225 <
A 11.94337832 4 2.985844579 146.001916 <
B 0.452369856 1 0.452369856 22.11999451 <
C 4.70467E-05 1 4.70467E-05 0.002300491 0.9618
BC 0.123764428 1 0.123764428 6.051836661 0.0140

Categoric:
Source Sum of Squares DF Mean Square F Value p-value
Model 13.02553891 28 0.465197818 22.81717298 < 0.0001
A 11.94337832 4 2.985844579 146.4506702 < 0.0001
B 0.728074029 4 0.182018507 8.927702585 < 0.0001
C 0.029712593 4 0.007428148 0.364338211 0.8341
BC 0.324373969 16 0.020273373 0.994374956 0.4601


Why the interaction of factors B and C is significant when my factors are numeric but not when they are categoric?

Does anyone know how Design Expert calculates the Sums of Squares or in general the ANOVA table?

Thanks

Lu
loperam
Registered Member
 
Posts: 6
Joined: Mon Nov 23, 2009 5:45 pm

Re: anova results affected by numeric vs categoric values

Postby Wayne » Tue Nov 24, 2009 1:36 pm

I do know how Design-Expert calculates the sums of squares.

The biggest difference between categoric ANOVA and numeric ANOVA is the type of sum of square used. If there are categoric factors in the selected model then Type II - classical sums of squares are calculated. If there are no categoric factors then Type III - partial sums of squares are calculated.

Type I Sum of Squares (aka Sequential)
• Hierarchical decomposition
Type I SS is the SS corresponding to each effect adjusted for every other effect preceding it in the model.
• Example Yhat = b0 + b1x1 + b2x2 +b12x1x2 +b3x3 + b13x1x3 + b23x2x3 + b123x1x2x3
SS(b2) = SS(b2|b0, b1)
SS(b13) = SS(b13|b0, b1, b2, b12, b3)

Type II Sum of Squares (aka Classical)
• Type II SS is the reduction in the SSerror due to adding an effect after all other terms have been added to the model except effects that contain the effect being tested.
• Example Yhat = b0 + b1x1 + b2x2 +b12x1x2 +b3x3 + b13x1x3 + b23x2x3 + b123x1x2x3
SS(b2) = SS(b2|b0, b1, b3, b13)
SS(b13) = SS(b13|b0, b1, b2, b12, b3, b23)

Type III Sum of Squares (aka Partial)
• Type III SS is the SS corresponding to each effect adjusted for every other effect in the model.
• Example Yhat = b0 + b1x1 + b2x2 +b12x1x2 +b3x3 + b13x1x3 + b23x2x3 + b123x1x2x3
SS(b2) = SS(b2|b0, b1, b12, b3, b13, b23, b123)
SS(b13) = SS(b13|b0, b1, b2, b12, b3, b23, b123)

Note the different degrees of freedom between the two ANOVA's. The Categoric model shows there are five discrete treatments for the B and C factors. The test is for whether or not any one or more combination of the treatments is significantly different than another combination of the B x C treatments. The degrees of freedom for the numeric model are one for each of B and C. This only allows for estimating whether or not the extreme values produce different results. If the middle values are different that effect is modeled by a quadratic or higher order function and will be missed by the 1 df test.
Wayne
Stat-Ease Consultant
 
Posts: 258
Joined: Tue May 27, 2008 8:31 am

Re: anova results affected by numeric vs categoric values

Postby loperam » Tue Dec 01, 2009 6:41 pm

Wayne, thanks for this very well explained answer.
However, I still have some doubts.

When I'm doing the ANOVA in minitab with the same data, I get different results.
Minitab only uses Type I and III SS, I'm using Type III to compare the results but they are different from the Design Expert's Type III results.
On the other hand, when I use categorical values in Design Expert (using Type II SS) now I get the same results from Minitab using Type III SS.
This difference is reflected mostly in the interaction of my two factors. In Design Expert using numerical values (Type III) my interaction is significant but not with categorial values (Type II). In Minitab with Type III SS the interaction is not significant.

Any clue why am I having these differences in the results?
Thanks a lot,
Lu
loperam
Registered Member
 
Posts: 6
Joined: Mon Nov 23, 2009 5:45 pm

Re: anova results affected by numeric vs categoric values

Postby Wayne » Fri Dec 04, 2009 11:51 am

Please send your data set to stathelp@statease.com. I'll be able to do more than guess at why things are coming up different.
Wayne
Stat-Ease Consultant
 
Posts: 258
Joined: Tue May 27, 2008 8:31 am

Re: anova results affected by numeric vs categoric values

Postby loperam » Sun Dec 06, 2009 3:56 pm

I've sent my data to that e-mail address.

I also used SAS because it allows me to do ANOVA with the Type I, II and III; in all of them I get the same results as with Minitab (or when using categorical values in Design Expert)

Thanks for your help
loperam
Registered Member
 
Posts: 6
Joined: Mon Nov 23, 2009 5:45 pm

Re: anova results affected by numeric vs categoric values

Postby Wayne » Mon Dec 07, 2009 10:34 am

I get the same results when using the same sums of squares. There must be options checked that I am not aware of. Please send the Minitab project and the Design-Expert files.
Wayne
Stat-Ease Consultant
 
Posts: 258
Joined: Tue May 27, 2008 8:31 am


Return to Statistics

Who is online

Users browsing this forum: No registered users and 1 guest

cron