I have an independent categorical variable ($X$ with two categories, $x_{1}$ and $x_{2}$) and two continuous dependent variables ($y$ and $z$).
Using a Mann Whitney test, I know that $y$ is significantly associated with $x_{1}$ and $z$ is likewise significantly associated with $x_{1}$. However, it could be that either $y$ confounds the relationship seen between $x_{1}$ and $z$, or vice versa, i.e. $z$ confounds the relationship seen between $x_{1}$ and $y$.
What distribution-free tests can I use to try account for each factor in tests of $y$ versus $X$ and $z$ versus $X$?
How can I achieve this in R and SPSS?
Best Answer
Turning my comment to an answer, the sm package offers non-parametric ANCOVA as
sm.ancova
. Here is a toy example:The above shows that the parallel group assumption is not realistic and that we must account for the interaction (p=0.007) between the factor group and continuous covariate.
Here is what we would get with
sm.ancova
, with default smoothing parameter and equal-group as the reference model:There is another R package for non-parametric ANCOVA (I haven't tested it, though): fANCOVA, with
T.aov
allowing to test for the equality of nonparametric curves or surfaces based on an ANOVA-type statistic.