View source: R/multivariate.anova.R
multivariate.anova | R Documentation |
This function performs a multivariate analysis over a dependent|response and numerous independent|explanatory variable
multivariate.anova(dep, indep_df)
dep |
a vector of the dependent variable |
indep_df |
a data frame of the independent variable |
ggplot2 table figure of
cmat = matrix(1, 3, 3 ) cmat[1,] = c(1, 0.5, 0.3) cmat[2,] = c(0.5, 1, 0.25) cmat[3,] = c(0.3, 0.25, 1) ## simulate some correlated data (multivariable random normal) set.seed(1110) ex_data = MASS::mvrnorm(n = 250, mu = c(5, 45, 25), Sigma = cmat ) colnames(ex_data) = c("outcome","age","bmi") multivariate.anova(dep = ex_data[,1], indep_df = ex_data[, 2:3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.