MATLAB Answers

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

4 views (last 30 days)
Mahmoud Nasr
Mahmoud Nasr on 23 Oct 2015
Answered: Cris LaPierre on 18 Nov 2019
How to determine ANOVA quadratic term of response model .. for example, the ANOVA terms of A*A, B*B, C*C

  0 Comments

Sign in to comment.

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);

  0 Comments

Sign in to comment.

Sign in to answer this question.

Tags