# ANOVA (Three-Way ANOVA) (G Dataflow)

Performs a three-way analysis of variance (ANOVA) and determines whether the three factors and their interactions have a significant effect on the experimental outcome.  ## levels c

Number of levels in factor c. levels c must be equal to or greater than 2. Otherwise, this node returns an error.

Specify a positive value if c is a fixed effect. Specify a negative value if c is a random effect.

Default: 2 ## levels b

Number of levels in factor b. levels b must be equal to or greater than 2. Otherwise, this node returns an error.

Specify a positive value if b is a fixed effect. Specify a negative value if b is a random effect.

Default: 2 ## levels a

Number of levels in factor a. levels a must be equal to or greater than 2. Otherwise, this node returns an error.

Specify a positive value if a is a fixed effect. Specify a negative value if a is a random effect.

Default: 2 ## x

All the observational data. You must specify an equal number of observations in each cell.

The total number of data points in x must equal the result of multiplying the number of levels in each factor and the number of observations per cell. Otherwise, this node returns an error. For example, if level a is 2, level b is 3, level c is 2, and observations per cell is 2, x must contain 24 data points. ## index a

The level of factor a to which the corresponding observation belongs.

This node converts arrays that do not begin with 0 or have nonconsecutive values into arrays of consecutive values that begin with 0. For example, if you enter [3, 5, 7], this node converts the array into [0, 1, 2]. ## index b

The level of factor b to which the corresponding observation belongs.

This node converts arrays that do not begin with 0 or have nonconsecutive values into arrays of consecutive values that begin with 0. For example, if you enter [3, 5, 7], this node converts the array into [0, 1, 2]. ## index c

The level of factor c to which the corresponding observation belongs.

This node converts arrays that do not begin with 0 or have nonconsecutive values into arrays of consecutive values that begin with 0. For example, if you enter [3, 5, 7], this node converts the array into [0, 1, 2]. ## error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error  If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error ## observations per cell

Number of observations in each cell. observations per cell must be equal to or greater than 2. Otherwise, this node returns an error.

Default: 2 ## significance level

Acceptable probability that this node incorrectly rejects a true null hypothesis.

significance level is a threshold value used to judge whether a factor has a significant effect on the experimental outcome.

Default: 0.05 ## significance

Significance values of the factors and their interactions.

Algorithm for Calculating significance

Depending on whether a, b, and c are fixed or random, this node calculates significance using the following equations:

$\mathrm{significance}\text{\hspace{0.17em}}\text{\hspace{0.17em}}a=\left\{\begin{array}{cc}\left\{\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofa},\text{\hspace{0.17em}}\mathrm{dofe}}>\mathrm{fa}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofa},\text{\hspace{0.17em}}\mathrm{dofac}}>\mathrm{fa}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \left\{\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofa},\text{\hspace{0.17em}}\mathrm{dofab}}>\mathrm{fa}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ -1& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{significance}\text{\hspace{0.17em}}\text{\hspace{0.17em}}b=\left\{\begin{array}{cc}\left\{\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofb},\text{\hspace{0.17em}}\mathrm{dofe}}>\mathrm{fb}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofb},\text{\hspace{0.17em}}\mathrm{dofab}}>\mathrm{fb}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \left\{\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofb},\text{\hspace{0.17em}}\mathrm{dofbc}}>\mathrm{fb}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ -1& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{significance}\text{\hspace{0.17em}}\text{\hspace{0.17em}}c=\left\{\begin{array}{cc}\left\{\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofc},\text{\hspace{0.17em}}\mathrm{dofe}}>\mathrm{fc}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofc},\text{\hspace{0.17em}}\mathrm{dofbc}}>\mathrm{fc}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \left\{\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofc},\text{\hspace{0.17em}}\mathrm{dofac}}>\mathrm{fc}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ -1& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{significance}\text{\hspace{0.17em}}\text{\hspace{0.17em}}ab=\left\{\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofab},\text{\hspace{0.17em}}\mathrm{dofe}}>\mathrm{fab}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofab},\text{\hspace{0.17em}}\mathrm{dofabc}}>\mathrm{fab}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{significance}\text{\hspace{0.17em}}\text{\hspace{0.17em}}ac=\left\{\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofac},\text{\hspace{0.17em}}\mathrm{dofe}}>\mathrm{fac}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofac},\text{\hspace{0.17em}}\mathrm{dofabc}}>\mathrm{fac}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{significance}\text{\hspace{0.17em}}\text{\hspace{0.17em}}bc=\left\{\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofbc},\text{\hspace{0.17em}}\mathrm{dofe}}>\mathrm{fbc}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofbc},\text{\hspace{0.17em}}\mathrm{dofabc}}>\mathrm{fbc}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathbf{s}\mathbf{i}\mathbf{g}\mathbf{n}\mathbf{i}\mathbf{f}\mathbf{i}\mathbf{c}\mathbf{a}\mathbf{n}\mathbf{c}\mathbf{e}\text{\hspace{0.17em}}\text{\hspace{0.17em}}abc=\mathrm{Prob}\left\{{F}_{\mathrm{dofabc},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofe}}>\mathrm{fabc}\right\}$

where Fn1, n2 is the F distribution with n1 and n2 degrees of freedom. ### significance a

Significance value associated with factor a. ### significance b

Significance value associated with factor b. ### significance c

Significance value associated with factor c. ### significance ab

Significance value associated with the interaction of factors a and b. ### significance ac

Significance value associated with the interaction of factors a and c. ### significance bc

Significance value associated with the interaction of factors b and c. ### significance abc

Significance value associated with the interaction of factors a, b, and c. ## summary

An 8-by-5 matrix that displays the obtained values for analysis.

$\mathrm{summary}=\left[\begin{array}{cc}\mathrm{ssa}& \mathrm{dofa}\\ \mathrm{ssb}& \mathrm{dofb}\\ \mathrm{ssc}& \mathrm{dofc}\\ \mathrm{ssab}& \mathrm{dofab}\\ \mathrm{ssac}& \mathrm{dofac}\\ \mathrm{ssbc}& \mathrm{dofbc}\\ \mathrm{ssabc}& \mathrm{dofabc}\\ \mathrm{sse}& \mathrm{dofe}\end{array}\phantom{\rule{0ex}{0ex}}\text{\hspace{0.17em}}\phantom{\rule{0ex}{0ex}}\phantom{\square }\begin{array}{cc}\mathrm{msa}& \mathrm{fa}\\ \mathrm{msb}& \mathrm{fb}\\ \mathrm{msc}& \mathrm{fc}\\ \mathrm{msab}& \mathrm{fab}\\ \mathrm{msac}& \mathrm{fac}\\ \mathrm{msbc}& \mathrm{fbc}\\ \mathrm{msabc}& \mathrm{fabc}\\ \mathrm{mse}& 0.0\end{array}\phantom{\rule{0ex}{0ex}}\text{\hspace{0.17em}}\phantom{\rule{0ex}{0ex}}\phantom{\square }\begin{array}{c}\mathrm{F critical a}\\ \mathrm{F critical b}\\ \mathrm{F critical c}\\ \mathrm{F critical ab}\\ \mathrm{F critical ac}\\ \mathrm{F critical bc}\\ \mathrm{F critical abc}\\ 0.0\end{array}\right]$

where

• The first column corresponds to the sums of squares associated with the respective factors (a, b, and c), the respective interactions (ab, ac, bc, and abc), and residual error
• The second column corresponds to the respective degrees of freedom
• The third column corresponds to the respective mean squares
• The fourth column corresponds to the respective F values
• The fifth column corresponds to the respective F critical values

Algorithm for Calculating Sums of Squares

This node calculates the sums of squares using the following equations:

$\mathrm{ssa}=bcL\underset{p=0}{\overset{a-1}{\sum }}{\left(\stackrel{¯}{{x}_{p\cdot \cdot \cdot }}-\stackrel{¯}{{x}_{\cdot \cdot \cdot \cdot }}\right)}^{2}$
$\mathrm{ssb}=acL\underset{q=0}{\overset{b-1}{\sum }}{\left(\stackrel{¯}{{x}_{\cdot q\cdot \cdot }}-\stackrel{¯}{{x}_{\cdot \cdot \cdot \cdot }}\right)}^{2}$
$\mathrm{ssc}=abL\underset{r=0}{\overset{c-1}{\sum }}{\left(\stackrel{¯}{{x}_{\cdot \cdot r\cdot }}-\stackrel{¯}{{x}_{\cdot \cdot \cdot \cdot }}\right)}^{2}$
$\mathrm{ssab}=cL\underset{p=0}{\overset{a-1}{\sum }}\underset{q=0}{\overset{b-1}{\sum }}{\left(\stackrel{¯}{{x}_{pq\cdot \cdot }}-\stackrel{¯}{{x}_{p\cdot \cdot \cdot }}-\stackrel{¯}{{x}_{\cdot q\cdot \cdot }}+\stackrel{¯}{{x}_{\cdot \cdot \cdot \cdot }}\right)}^{2}$
$\mathrm{ssac}=bL\underset{p=0}{\overset{a-1}{\sum }}\underset{r=0}{\overset{c-1}{\sum }}{\left(\stackrel{¯}{{x}_{p\cdot r\cdot }}-\stackrel{¯}{{x}_{p\cdot \cdot \cdot }}-\stackrel{¯}{{x}_{\cdot \cdot r\cdot }}+\stackrel{¯}{{x}_{\cdot \cdot \cdot \cdot }}\right)}^{2}$
$\mathrm{ssbc}=aL\underset{q=0}{\overset{b-1}{\sum }}\underset{r=0}{\overset{c-1}{\sum }}{\left(\stackrel{¯}{{x}_{\cdot qr\cdot }}-\stackrel{¯}{{x}_{\cdot q\cdot \cdot }}-\stackrel{¯}{{x}_{\cdot \cdot r\cdot }}+\stackrel{¯}{{x}_{\cdot \cdot \cdot \cdot }}\right)}^{2}$
$\mathrm{ssabc}=L\underset{p=0}{\overset{a-1}{\sum }}\underset{q=0}{\overset{b-1}{\sum }}\underset{r=0}{\overset{c-1}{\sum }}{\left(\stackrel{¯}{{x}_{pqr\cdot }}-\stackrel{¯}{{x}_{pq\cdot \cdot }}-\stackrel{¯}{{x}_{p\cdot r\cdot }}-\stackrel{¯}{{x}_{\cdot qr\cdot }}+\stackrel{¯}{{x}_{p\cdot \cdot \cdot }}+\stackrel{¯}{{x}_{\cdot q\cdot \cdot }}+\stackrel{¯}{{x}_{\cdot \cdot r\cdot }}-\stackrel{¯}{{x}_{\cdot \cdot \cdot \cdot }}\right)}^{2}$
$\mathrm{sse}=\underset{p=0}{\overset{a-1}{\sum }}\underset{q=0}{\overset{b-1}{\sum }}\underset{r=0}{\overset{c-1}{\sum }}\underset{s=0}{\overset{L-1}{\sum }}{\left({x}_{pqrs}-\stackrel{¯}{{x}_{pqr\cdot }}\right)}^{2}$

where

• b is the number of levels in factor b
• c is the number of levels in factor c
• L is the number of observational data per cell
• a is the number of levels in factor a
• p is the index of each level in factor a, starting from 0
• $\stackrel{¯}{{x}_{p\cdot \cdot \cdot }}$ is the mean of all the observational data at the pth level of factor a
• $\stackrel{¯}{{x}_{\cdot \cdot \cdot \cdot }}$ is the mean of all the observational data
• q is the index of each level in factor b, starting from 0
• $\stackrel{¯}{{x}_{\cdot q\cdot \cdot }}$ is the mean of all the observational data at the qth level of factor b
• r is the index of each level in factor c, starting from 0
• $\stackrel{¯}{{x}_{\cdot \cdot r\cdot }}$ is the mean of all the observational data at the rth level of factor c
• $\stackrel{¯}{{x}_{pq\cdot \cdot }}$ is the mean of all the observational data at the pth and qth levels of factors a and b respectively
• $\stackrel{¯}{{x}_{p\cdot r\cdot }}$ is the mean of all the observational data at the pth and rth levels of factors a and c respectively
• $\stackrel{¯}{{x}_{\cdot qr\cdot }}$ is the mean of all the observational data at the qth and rth levels of factors b and c respectively
• $\stackrel{¯}{{x}_{pqr\cdot }}$ is the mean of all the observational data at the pth, qth, and rth levels of factors a, b, and c respectively
• s is the index of each observational data in a cell defined by the pth, qth, and rth levels of factors a, b, and c respectively
• xpqrs is the sth observational data at the pth, qth, and rth levels of factors a, b, and c respectively

Algorithm for Calculating Degrees of Freedom

This node calculates the degrees of freedom using the following equations:

$\mathrm{dofa}=a-1$
$\mathrm{dofb}=b-1$
$\mathrm{dofc}=c-1$
$\mathrm{dofab}=\left(a-1\right)\left(b-1\right)$
$\mathrm{dofac}=\left(a-1\right)\left(c-1\right)$
$\mathrm{dofbc}=\left(b-1\right)\left(c-1\right)$
$\mathrm{dofabc}=\left(a-1\right)\left(b-1\right)\left(c-1\right)$
$\mathrm{dofe}=abc\left(L-1\right)$

where

• a is the number of levels in factor a
• b is the number of levels in factor b
• c is the number of levels in factor c
• L is the number of observational data per cell

Algorithm for Calculating Mean Squares

This node calculates the mean squares using the following equations:

$\mathrm{msa}=\frac{\mathrm{ssa}}{\mathrm{dofa}}$
$\mathrm{msb}=\frac{\mathrm{ssb}}{\mathrm{dofb}}$
$\mathrm{msc}=\frac{\mathrm{ssc}}{\mathrm{dofc}}$
$\mathrm{msab}=\frac{\mathrm{ssab}}{\mathrm{dofab}}$
$\mathrm{msac}=\frac{\mathrm{ssac}}{\mathrm{dofac}}$
$\mathrm{msbc}=\frac{\mathrm{ssbc}}{\mathrm{dofbc}}$
$\mathrm{msabc}=\frac{\mathrm{ssabc}}{\mathrm{dofabc}}$
$\mathrm{mse}=\frac{\mathrm{sse}}{\mathrm{dofe}}$

where

• ssa is a measure of variation attributed to factor a
• dofa is the degree of freedom of ssa
• ssb is a measure of variation attributed to factor b
• dofb is the degree of freedom of ssb
• ssc is a measure of variation attributed to factor c
• dofc is the degree of freedom of ssc
• ssab is a measure of variation attributed to the interaction of factors a and b
• dofab is the degree of freedom of ssab
• ssac is a measure of variation attributed to the interaction of factors a and c
• dofac is the degree of freedom of ssac
• ssbc is a measure of variation attributed to the interaction of factors b and c
• dofbc is the degree of freedom of ssbc
• ssabc is a measure of variation attributed to the interaction of factors a, b, and c
• dofabc is the degree of freedom of ssabc
• sse is a measure of variation attributed to random fluctuation
• dofe is the degree of freedom of sse

Algorithm for Calculating F Values

This node calculates the F values using the following equations:

$\mathrm{fa}=\left\{\begin{array}{cc}\left\{\begin{array}{cc}\frac{\mathrm{msa}}{\mathrm{mse}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \frac{\mathrm{msa}}{\mathrm{msac}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \left\{\begin{array}{cc}\frac{\mathrm{msa}}{\mathrm{msab}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ -1& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{fb}=\left\{\begin{array}{cc}\left\{\begin{array}{cc}\frac{\mathrm{msb}}{\mathrm{mse}}& \text{\hspace{0.17em}}\left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \frac{\mathrm{msb}}{\mathrm{msab}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \left\{\begin{array}{cc}\frac{\mathrm{msb}}{\mathrm{msbc}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ -1& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{fc}=\left\{\begin{array}{cc}\left\{\begin{array}{cc}\frac{\mathrm{msc}}{\mathrm{mse}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \frac{\mathrm{msc}}{\mathrm{msbc}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \left\{\begin{array}{cc}\frac{\mathrm{msc}}{\mathrm{msac}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ -1& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{fab}=\left\{\begin{array}{cc}\frac{\mathrm{msab}}{\mathrm{mse}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \frac{\mathrm{msab}}{\mathrm{msabc}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{fac}=\left\{\begin{array}{cc}\frac{\mathrm{msac}}{\mathrm{mse}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \frac{\mathrm{msac}}{\mathrm{msabc}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{fbc}=\left\{\begin{array}{cc}\frac{\mathrm{msbc}}{\mathrm{mse}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \frac{\mathrm{msbc}}{\mathrm{msabc}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}$
$\mathrm{fabc}=\frac{\mathrm{msabc}}{\mathrm{mse}}$

where

• msa is the mean square quantity of ssa
• mse is the mean square quantity of sse
• msac is the mean square quantity of ssac
• msab is the mean square quantity of ssab
• msb is the mean square quantity of ssb
• msbc is the mean square quantity of ssbc
• msc is the mean square quantity of ssc
• msabc is the mean square quantity of ssabc

Algorithm for Calculating F Critical Values

F critical a is the value satisfying the following equation:

$\begin{array}{cc}\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofa},\text{\hspace{0.17em}}\mathrm{dofe}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}a\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofa},\text{\hspace{0.17em}}\mathrm{dofac}}\ge F\text{\hspace{0.17em}}\mathit{critical}\text{\hspace{0.17em}}a\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofa},\text{\hspace{0.17em}}\mathrm{dofab}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}a\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ -1& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}=\mathbf{significance}\text{\hspace{0.17em}}\mathbf{level}$

F critical b is the value satisfying the following equation:

$\begin{array}{cc}\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofb},\text{\hspace{0.17em}}\mathrm{dofe}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}b\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofb},\text{\hspace{0.17em}}\mathrm{dofab}}\ge F\text{\hspace{0.17em}}\mathit{critical}\text{\hspace{0.17em}}b\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofb},\text{\hspace{0.17em}}\mathrm{dofbc}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}b\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ -1& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}=\mathbf{significance}\text{\hspace{0.17em}}\mathbf{level}$

F critical c is the value satisfying the following equation:

$\begin{array}{cc}\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofc},\text{\hspace{0.17em}}\mathrm{dofe}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}c\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofc},\text{\hspace{0.17em}}\mathrm{dofbc}}\ge F\text{\hspace{0.17em}}\mathit{critical}\text{\hspace{0.17em}}c\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofc},\text{\hspace{0.17em}}\mathrm{dofac}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}c\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ -1& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}=\mathbf{significance}\text{\hspace{0.17em}}\mathbf{level}$

F critical ab is the value satisfying the following equation:

$\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofa}b,\text{\hspace{0.17em}}\mathrm{dofe}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}\mathrm{ab}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofa}b,\text{\hspace{0.17em}}\mathrm{dofabc}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}\mathrm{ab}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}c\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}=\mathbf{significance}\text{\hspace{0.17em}}\mathbf{level}$

F critical ac is the value satisfying the following equation:

$\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofac},\text{\hspace{0.17em}}\mathrm{dofe}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}\mathrm{ac}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofac},\text{\hspace{0.17em}}\mathrm{dofabc}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}\mathrm{ac}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}b\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}=\mathbf{significance}\text{\hspace{0.17em}}\mathbf{level}$

F critical bc is the value satisfying the following equation:

$\begin{array}{cc}\mathrm{Prob}\left\{{F}_{\mathrm{dofbc},\text{\hspace{0.17em}}\mathrm{dofe}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}\mathrm{bc}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{fixed}\right)\\ \mathrm{Prob}\left\{{F}_{\mathrm{dofbc},\text{\hspace{0.17em}}\mathrm{dofabc}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}\mathrm{bc}\right\}\text{\hspace{0.17em}}& \left(\mathrm{if}\text{\hspace{0.17em}}a\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{random}\right)\end{array}\right\}=\mathbf{significance}\text{\hspace{0.17em}}\mathbf{level}$

F critical abc is the value satisfying the following equation:

$\begin{array}{c}\mathrm{Prob}\left\{{F}_{\mathrm{dofabc},\text{\hspace{0.17em}}\mathrm{dofe}}\ge F\text{\hspace{0.17em}}\mathrm{critical}\text{\hspace{0.17em}}\mathrm{abc}\right\}\text{\hspace{0.17em}}\end{array}=\mathbf{significance}\text{\hspace{0.17em}}\mathbf{level}$

where Fn1, n2 is the F distribution with n1 and n2 degrees of freedom. ## conclusion

Result of the analysis. Each Boolean value in this output indicates whether the corresponding factor or interaction of the factors has a significant effect on the experimental outcome.

 True The corresponding element in significance is equal to or less than significance level, which means the corresponding factor or interaction of the factors has a significant effect on the experimental outcome. False The corresponding element in significance is -1 or is greater than significance level, which means the corresponding factor or interaction of the factors does not have a significant effect on the experimental outcome. ### a significant?

Boolean value that indicates whether factor a has a significant effect on the experimental outcome. ### b significant?

Boolean value that indicates whether factor b has a significant effect on the experimental outcome. ### c significant?

Boolean value that indicates whether factor c has a significant effect on the experimental outcome. ### ab significant?

Boolean value that indicates whether the interaction of factors a and b has a significant effect on the experimental outcome. ### ac significant?

Boolean value that indicates whether the interaction of factors a and c has a significant effect on the experimental outcome. ### bc significant?

Boolean value that indicates whether the interaction of factors b and c has a significant effect on the experimental outcome. ### abc significant?

Boolean value that indicates whether the interaction of factors a, b and c has a significant effect on the experimental outcome. ## error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error  If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

## Random and Fixed Effects

A factor is a basis for categorizing data. A factor is a random effect if it has a large population of levels about which you want to draw conclusions but such that you cannot sample from all levels. You thus pick levels at random and generalize about all levels.

A factor is a fixed effect if you can sample from all levels about which you want to draw conclusions.

## ANOVA Cells

In ANOVA, cells mean level combinations of multiple factors. For example, if you specify the inputs for this node as shown in the following table, the second table below illustrates the cell distributions.

 levels c 2 levels b 2 levels a 2 x [10, 18, 16, 18, 13, 22, 17, 12, 22, 24, 16, 12, 23, 17, 15, 14] index a [0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1] index b [0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1] index c [1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1] observations per cell 2
factor b (Level 0) factor b (Level 1)
factor c (Level 0) factor c (Level 1) factor c (Level 0) factor c (Level 1)
factor a (Level 0) 18, 13 10, 12 23, 15 16, 12
factor a (Level 1) 22, 17 16, 17 22, 24 18, 14

Using age, weight, and gender as factors, this example demonstrates how to test whether age, weight, or gender has a significant effect on the number of sit-ups a person can do.

The following table defines the levels of age, weight, and gender.

 factor a (age) Level 0 10 years old to 20 years old Level 1 21 years old to 30 years old factor b (weight) Level 0 less than 50 kg Level 1 between 50 kg and 70 kg factor c (gender) Level 0 male Level 1 female

The following table lists the results of a random sampling of 16 people. The results are based on a series of observations of how many sit-ups people from different age, weight, and gender groups can do. Note

To perform a three-way analysis of variance, you must make at least two observations per level, and make the same number of observations per cell.

 Person 1 12 years old (Level 0) 40 kg (Level 0) female (Level 1) 10 sit-ups Person 2 16 years old (Level 0) 46 kg (Level 0) male (Level 0) 18 sit-ups Person 3 22 years old (Level 1) 47 kg (Level 0) female (Level 1) 16 sit-ups Person 4 25 years old (Level 1) 51 kg (Level 1) female (Level 1) 18 sit-ups Person 5 14 years old (Level 0) 49 kg (Level 0) male (Level 0) 13 sit-ups Person 6 28 years old (Level 1) 45 kg (Level 0) male (Level 0) 22 sit-ups Person 7 24 years old (Level 1) 48 kg (Level 0) male (Level 0) 17 sit-ups Person 8 15 years old (Level 0) 46 kg (Level 0) female (Level 1) 12 sit-ups Person 9 29 years old (Level 1) 65 kg (Level 1) male (Level 0) 22 sit-ups Person 10 27 years old (Level 1) 62 kg (Level 1) male (Level 0) 24 sit-ups Person 11 19 years old (Level 0) 58 kg (Level 1) female (Level 1) 16 sit-ups Person 12 18 years old (Level 0) 68 kg (Level 1) female (Level 1) 12 sit-ups Person 13 17 years old (Level 0) 59 kg (Level 1) male (Level 0) 23 sit-ups Person 14 26 years old (Level 1) 45 kg (Level 0) female (Level 1) 17 sit-ups Person 15 11 years old (Level 0) 50 kg (Level 1) male (Level 0) 15 sit-ups Person 16 21 years old (Level 1) 54 kg (Level 1) female (Level 1) 14 sit-ups

The following table lists the inputs and outputs of this node.

 levels c 2 levels b 2 levels a 2 x [10, 18, 16, 18, 13, 22, 17, 12, 22, 24, 16, 12, 23, 17, 15, 14] index a [0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1] index b [0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1] index c [1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1] observations per cell 2 significance level 0.05 significance significance a 0.0375234 significance b 0.165495 significance c 0.0139613 significance ab 0.589346 significance ac 0.937954 significance bc 0.490334 significance abc 0.589346 summary ssa 60.0625 ssb 22.5625 ssc 95.0625 ssab 3.0625 ssac 0.0625 ssbc 5.0625 ssabc 3.0625 sse 77.5 dofa 1 dofb 1 dofc 1 dofab 1 dofac 1 dofbc 1 dofabc 1 dofe 8 msa 60.0625 msb 22.5625 msc 95.0625 msab 3.0625 msac 0.0625 msbc 5.0625 msabc 3.0625 mse 9.6875 fa 6.2 fb 2.32903 fc 9.8129 fab 0.316129 fac 0.00645161 fbc 0.522581 fabc 0.316129 0.0 0 F critical a 5.31763 F critical b 5.31763 F critical c 5.31763 F critical ab 5.31763 F critical ac 5.31763 F critical bc 5.31763 F critical abc 5.31763 0.0 0 conclusion a significant? True b significant? False c significant? True ab significant? False ac significant? False bc significant? False abc significant? False

Because only a significant? and c significant? are True in conclusion, you can conclude that based on the sampling data, only age and gender have a significant effect on the number of sit-ups a person can do.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application