multivariate.anova: multivariate analysis

View source: R/multivariate.anova.R

multivariate.anovaR Documentation

multivariate analysis

Description

This function performs a multivariate analysis over a dependent|response and numerous independent|explanatory variable

Usage

multivariate.anova(dep, indep_df)

Arguments

dep

a vector of the dependent variable

indep_df

a data frame of the independent variable

Value

ggplot2 table figure of

Examples

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])


MRCIEU/metaboprep documentation built on Jan. 28, 2023, 7:29 p.m.