Invalid outlier dummy variables are dummy variables that are all zeros (where the original variable had no outliers at the 2.5x standard deviation for either the residuals or the squared residuals. Interpreting the leftmost column as bit 0 and continuing with higher bits going from left to right in the matrix, this function returns a bit mask that has a 1 on all positions in the matrix where the dummy column is invalid. We use this in later functions to easily filter out theinvalid outlier masks from the valid ones.

1 | ```
invalid_mask(outlier_dummies)
``` |

`outlier_dummies` |
A matrix of outlier dummy variables in columns. |

An integer mask indicating the invalid columns according to the procedure describe above.

1 2 3 4 5 6 | ```
resid_matrix <- matrix(rnorm(39 * 3),
nrow = 39,
ncol = 3,
dimnames = list(NULL, c('rumination', 'happiness', 'activity')))
outlier_dummies <- autovarCore:::residual_outliers(resid_matrix, 40)
autovarCore:::invalid_mask(outlier_dummies)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.