Solved – How to run an analysis of variance with one independent variable and multiple dependent variables

anovamanovarregression

From my limited statistical knowledge, I could use MANOVA if I had multiple independent variables (x1, x2…xn). What can I do (specifically in R) with one "x" variable and multiple "y" groups? I'm trying to see if there is any relationship between the y's with respect to their regression with x. I've already set up a loop that computes bivariate, piecewise linear regressions between each pair (x-y1, x-y2, … x-yn), but that does not include any analysis of variation between the y variables. Does anybody know how I might do this (in a statistically sound manner, of course) in R? My data looks like this:

x         y1       y2      y3      y4      y5
4.19    5.51    19.76   50.00   19.36   54.07
8.60    10.16   33.01   82.99   38.48   44.95
8.03    7.82    31.29   79.05   40.12   59.18
6.64    8.99    27.13   69.13   30.44   59.02
7.03    8.22    25.29   74.45   36.02   50.88
1.50    5.90    10.69   22.88   10.34   34.50
4.36    7.61    19.27   44.47   20.06   24.62
7.17    8.30    26.72   68.68   31.61   20.16
2.68    5.61    14.25   37.07   15.20   67.75
7.91    7.75    30.93   82.01   38.62   65.36
3.74    5.24    16.42   40.17   17.54   15.19

Best Answer

While what question you are trying to answer is unclear, I think you are trying to do canonical correlation analysis (CCA), which attempts to explain a set of dependent variables (DVs) with a set of independent variables (IVs). This technique creates a linear combination of the IVs such that will account for the maximum variance of another linear combination of the DVs. Your case is special in that you have only 1 IV.

In R, you can do it in different ways:

Approach 1

manova(cbind(y1, y2, y3, y4, y5) ~ x, data=your_df)

Approach 2

library(CCA)
X <- cbind(your_df$x) ## cbind necessary to make
Y <- cbind(your_df$x) ## X and Y matrices
matcor(X, Y)

You interpret CCA results in a way similar to interpreting MANOVA results. For more information see this tutorial.