# Analysis of Variance - One-Way MANOVA

A statistical test which tests the relationship between a set of numeric variables and a single categorical variable

One-Way MANOVA is a statistical test which tests the relationship between a set of numeric variables and a single categorical variable

## How to Run a One-Way MANOVA

- Add the object by selecting from the menu
**Automate > Browse Online Library > Analysis of Variance > One-Way MANOVA** - In
**Inputs > Outcome**specify the outcome variable. - Specify the predictor variable in
**Inputs > Predictor**

## Example

In the example below, shading is proportional to the *t*-statistics comparing against the row means (See How to Read a Standard R Table), and the font of the cells is bold where the *p*-value, adjusted for multiple comparisons using the False Discovery Rate correction, is less than or equal to 0.05. The *p* value column shows the lowest *p*-value for each row. The overall significance of the table, as shown in the sub-title, is determined by the lowest adjusted p-value in the table. The *R-Squared* shows the strength of relationship between each outcome variable, one-by-one, and the predictor.

## Options

The options in the Object Inspector are organized into two tabs: **Inputs** and **Properties**.

### Inputs

**Outcomes** The variables to be predicted.

**Predictor** A variable containing 2 or more groups. If not categorical, it is converted into categories in the analysis.

**Robust standard errors** Computes standard errors that are robust to violations of the assumption of constant variance. See Robust Standard Errors.

**Missing data** (see Missing Data Options):

**Error if missing data****Exclude cases with missing data**

**Variable names** Displays Variable Names in the output.

**Categorical as binary** Represent unordered categorical variables as binary variables. Otherwise, they are represented as sequential integers (i.e., 1 for the first category, 2 for the second, etc.). *Numeric - Multi* variables are treated according to their numeric values and not converted to binary.

**Filter** The data is automatically filtered using any filters prior to estimating the model.

**Weight** Where a weight has been set for the R Output, the calibrated weight is used. See Weights in R.

### Properties

This tab contains options for formatting the size of the object, as well as the underlying R code used to create the visualization, and the JavaScript code use to customize the *Object Inspector* itself (see Object Inspector for more details about these options). Additional options are available by editing the code.

## Technical details

- Tests of individual means are two-sided and comparing to the Grand Mean (i.e., "To mean"). See Analysis of Variance - One-Way ANOVA for more information as well as more options for post hoc testing.
- By modifying the code so that
`Pillai = TRUE`,*Pillai's Trace*and*F*-tests can be computed for the overall and row null hypotheses, and Tukey's Range test is used to test within rows; Pilla's trace is not valid where the data is weighted.

## More Information

## Acknowledgements

The linear model is fitted using the `lm` and `manova` functions in R. See Analysis of Variance - One-Way ANOVA for acknowledgements relating to the ANOVAs in the outputs.

## Code

```
var heading_text = 'One-Way MANOVA';
if (!!form.setObjectInspectorTitle)
form.setObjectInspectorTitle(heading_text, heading_text)
else
form.setHeading(heading_text);
form.dropBox({label: "Outcomes",
types:["Variable: Numeric, Date, Money, Categorical, OrderedCategorical"],
name: "formOutcomeVariables",
prompt: "Numeric dependent variables to be predicted",
multi:true})
form.dropBox({label: "Predictor",
types:["Variable: Numeric, Date, Money, Categorical, OrderedCategorical"],
prompt: "Categorical grouping variable used to predict the outcome variables",
name: "formPredictor"})
form.checkBox({label: "Robust standard errors", name: "formRobust", default_value: false,
prompt: "Compute standard errors that are robust to violations of the assumption of constant variance"})
form.comboBox({label: "Missing data",
alternatives: ["Error if missing data", "Exclude cases with missing data", "Use partial data"],
name: "formMissing", default_value: "Exclude cases with missing data", prompt: "Treatment of missing data values"})
form.checkBox({label: "Variable names", name: "formNames", default_value: false, prompt: "Whether to use variable names instead of labels"})
form.checkBox({label: "Categorical as binary", name: "formBinary", default_value: false, prompt: "Whether to convert categorical outcome variables to binary variables"})
```

```
library(flipAnalysisOfVariance)
manova <- OneWayMANOVA(data.frame(QInputs(formOutcomeVariables)),
QInputs(formPredictor),
subset = QFilter,
weights = QPopulationWeight,
robust.se = formRobust,
missing = formMissing,
show.labels = !formNames,
binary = formBinary,
pillai = FALSE,
fdr = TRUE)
```