Problem using 'interactions' model type using ANOVAN

12 Ansichten (letzte 30 Tage)
Dane J
Dane J am 4 Sep. 2014
Beantwortet: Tom Lane am 12 Sep. 2014
Problem: The N-way ANOVA table comes back with "0" for Sum of Sq., d.f., Mean Sq.,and F; and "Nan" values for Prob>F when using the 'interaction' or 'full' model type.
Entering this code:
[p,table,stats]=anovan(MLR,{Lather,Temp, Volume},'varnames',{'Lather','Temp','Volume'})
Gives me a N-way ANOVA table that has values (all are reasonable), and lets me see which values had a statistically significant effect on the results.
The only result that was significant was the Lather variable, but Temp was extremely close to being significant (pval=0.07). I was curious to see if an interaction exist between lather and temp.
When I try this code:
[p,table,stats]=anovan(MLR,{Lather,Temp, Volume},'varnames',{'Lather','Temp','Volume'}, 'model','interaction')
The N-way ANOVA table comes back with "0" for Sum of Sq., d.f., Mean Sq.,and F. I get a "Nan" values for Prob>F. Which is confusing, my Error Sum sq. is 80.6, and the Total Sum Sq. is 87.1, however there is no values for the Sum sq. for any of the variables or variable interactions. Not to mention I get "0" and "Nan" for most of the table.
My aim is to see if any interactions exist between two independent variables. Using the 'Full" model type results in the same, confusing table as the 'interaction'.

Antworten (1)

Tom Lane
Tom Lane am 12 Sep. 2014
If two predictors A and B are perfectly correlated, then removing any one of them will not affect the model. This can lead to results like what you observed.
For models with higher-order terms things like this can happen as well. For example, if not all combinations of A and B exist, then that reduces the degrees of freedom for an A*B term. In your model with more predictors and more interactions, there are more opportunities for confounding among terms.
This can be hard to diagnose. What I like to do is to use the anovan option to switch to Type 1 sums of squares. Then each term's contribution is measured by how much it contributes on top of terms earlier in the list of terms. Then you can try changing the order of terms to get a sense of what terms are confounded with what other terms.

Kategorien

Mehr zu Analysis of Variance and Covariance finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by