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

Version:

Performs a three-way analysis of variance (ANOVA) and returns the effect of the levels of three factors and the interactions among the factors on the experimental outcome.

## level c

Number of levels in factor c. You must specify at least two levels. Otherwise, this node returns an error.

The sign of level c is set to positive if c is a fixed effect and negative if c is a random effect.

Default: 2

## level b

Number of levels in factor b. You must specify at least two levels. Otherwise, this node returns an error.

The sign of level b is set to positive if b is a fixed effect and negative if b is a random effect.

Default: 2

## level a

Number of levels in factor a. You must specify at least two levels. Otherwise, this node returns an error.

The sign of level a is set to positive if a is a fixed effect and negative 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 input converts input levels that do not begin with zero or input levels that have nonconsecutive values. For example, if you enter an index that contains the levels 3, 5, and 7, this input converts the levels to an index array with level values of 0, 1, and 2.

## index b

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

This input converts input levels that do not begin with zero or input levels that have nonconsecutive values. For example, if you enter an index that contains the levels 3, 5, and 7, this input converts the levels to an index array with level values of 0, 1, and 2.

## index c

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

This input converts input levels that do not begin with zero or input levels that have nonconsecutive values. For example, if you enter an index that contains the levels 3, 5, and 7, this input converts the levels to an index array with level values of 0, 1, and 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. Each cell must contain at least two observations. Otherwise, this node returns an error.

Default: 2

## significance

Values corresponding to the significance levels.

Compare the corresponding significance output with the chosen level of significance to determine whether the level of the factor or the interaction among the factors has an effect on the experimental outcome. A common choice of the chosen level of significance is 0.05. If the corresponding significance output is less than the chosen level of significance, at least one level of the factor or the interaction among the factors has some effect on the experimental outcome.

For example, if factor a is a random effect, your chosen level of significance is 0.05, and significance a is 0.03, then you can conclude that factor a has an effect on the experimental outcome.

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

• ${F}_{\mathrm{dofa},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofe}}$ is the F distribution with dofa and dofe degrees of freedom
• ${F}_{\mathrm{dofa},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofac}}$ is the F distribution with dofa and dofac degrees of freedom
• ${F}_{\mathrm{dofa},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofab}}$ is the F distribution with dofa and dofab degrees of freedom
• ${F}_{\mathrm{dofb},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofe}}$ is the F distribution with dofb and dofe degrees of freedom
• ${F}_{\mathrm{dofb},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofab}}$ is the F distribution with dofb and dofab degrees of freedom
• ${F}_{\mathrm{dofb},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofbc}}$ is the F distribution with dofb and dofbc degrees of freedom
• ${F}_{\mathrm{dofc},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofe}}$ is the F distribution with dofc and dofe degrees of freedom
• ${F}_{\mathrm{dofc},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofbc}}$ is the F distribution with dofc and dofbc degrees of freedom
• ${F}_{\mathrm{dofc},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofac}}$ is the F distribution with dofc and dofac degrees of freedom
• ${F}_{\mathrm{dofab},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofe}}$ is the F distribution with dofab and dofe degrees of freedom
• ${F}_{\mathrm{dofab},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofabc}}$ is the F distribution with dofab and dofabc degrees of freedom
• ${F}_{\mathrm{dofac},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofe}}$ is the F distribution with dofac and dofe degrees of freedom
• ${F}_{\mathrm{dofac},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofabc}}$ is the F distribution with dofac and dofabc degrees of freedom
• ${F}_{\mathrm{dofbc},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofe}}$ is the F distribution with dofbc and dofe degrees of freedom
• ${F}_{\mathrm{dofbc},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofabc}}$ is the F distribution with dofc and dofbc degrees of freedom
• ${F}_{\mathrm{dofabc},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{dofe}}$ is the F distribution with dofabc and dofe degrees of freedom

### significance a

Level of significance associated with factor a.

### significance b

Level of significance associated with factor b.

### significance c

Level of significance associated with factor c.

### significance ab

Level of significance associated with the interaction of factors a and b.

### significance ac

Level of significance associated with the interaction of factors a and c.

### significance bc

Level of significance associated with the interaction of factors b and c.

### significance abc

Level of significance associated with the interaction of factors a, b, and c.

## summary

An 8-by-4 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}\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

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 factor 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 factor a and c respectively
• $\stackrel{¯}{{x}_{\cdot qr\cdot }}$ is the mean of all the observational data at the qth and rth levels of factor b and c respectively
• $\stackrel{¯}{{x}_{pqr\cdot }}$ is the mean of all the observational data at the pth, qth, and rth levels of factor 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 factor a, b, and c respectively
• xpqrs is the sth observational data at the pth, qth, and rth levels of factor 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 factor a and b
• dofab is the degree of freedom of ssab
• ssac is a measure of variation attributed to the interaction of factor a and c
• dofac is the degree of freedom of ssac
• ssbc is a measure of variation attributed to the interaction of factor b and c
• dofbc is the degree of freedom of ssbc
• ssabc is a measure of variation attributed to the interaction of factor 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

The greater the F value is, the more significant effect the corresponding factor or the interaction of the factors has 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.

 level a 2 level b 2 level c 2 x [10, 25, 16, 18, 13, 19, 15, 12, 30, 27, 16, 12, 30, 17, 15, 12] 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) 25, 13 10, 12 30, 15 16, 12
factor a (Level 1) 19, 15 16, 17 30, 27 18, 12

Using age, weight, or gender as a factor, this example demonstrates how to test whether age, weight, or gender has an 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 and 75 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) 25 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) 19 sit-ups Person 7 24 years old (Level 1) 48 kg (Level 0) male (Level 0) 15 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) 30 sit-ups Person 10 27 years old (Level 1) 62 kg (Level 1) male (Level 0) 27 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) 30 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) 12 sit-ups

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

 level a 2 level b 2 level c 2 x [10, 25, 16, 18, 13, 19, 15, 12, 30, 27, 16, 12, 30, 17, 15, 12] 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 summary ssa 27.5625 ssb 68.0625 ssc 232.563 ssab 3.0625 ssac 1.5625 ssbc 45.5625 ssabc 39.0625 sse 225.5 dofa 1 dofb 1 dofc 1 dofab 1 dofac 1 dofbc 1 dofabc 1 dofe 8 msa 27.5625 msb 68.0625 msc 232.563 msab 3.0625 msac 1.5625 msbc 45.5625 msabc 39.0625 mse 28.1875 fa 0.977827 fb 2.41463 fc 8.25055 fab 0.108647 fac 0.0554324 fbc 1.61641 fabc 1.38581 0.0 0 significance significance a 0.351697 significance b 0.158812 significance c 0.020753 significance ab 0.750154 significance ac 0.819782 significance bc 0.23931 significance abc 0.272948

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices