How to determine ANOVA quadratic term of response model .. e.g A*A, B*B, C*C

7 views (last 30 days)
How to determine ANOVA quadratic term of response model .. for example, the ANOVA terms of A*A, B*B, C*C

Answers (1)

Cris LaPierre
Cris LaPierre on 18 Nov 2019
I've found that I have to define quadratic interactions manually. Here's an example using fitlm and anova.
A = [-1 1 -1 1 0 0 0 0 0]';
B = [-1 -1 1 1 0 0 0 0 0]';
y = [39.3 40 40.9 41.5 40.3 40.5 40.7 40.2 40.6]';
t = table(A,B,y);
rm = fitlm(t,'y~A+B+A*B+A^2');
anova(rm);

Tags

Community Treasure Hunt

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

Start Hunting!