Description Usage Arguments Details Value Author(s) References See Also Examples
This function estimates nonlinear proportion of variance between one variable and a group of variables after linear association between the variable and the group has been removed.
1 | ma.nl(Y, X)
|
Y |
A vector or a one column data frame. |
X |
a group of vectors or a data frame with the same number of samples as in Y |
A linear model, Y ~ X
, is constructed and ma
is used to compute R^2 between Y and X.
Returns a list of real numbers:
Rsq |
linear association, the value of R^2 due to the linear model |
A |
total association (linear and nonlinear) between Y and the group X. |
rA |
the residual association (the association left in the residuals after the linear part has been regressed out of Y). |
nl1 |
A - Rsq, the nonlinear part of the association. |
nl2 |
(A - Rsq) / A, the nonlinear proportion of the association. |
nl3 |
(A - Rsq) / (1 - Rsq), the proportion of total variance that is not explained by a linear model but is explained by A. |
Ben Murrell, Dan Murrell & Hugh Murrell.
Discovering general multidimensional associations, http://arxiv.org/abs/1303.1828
1 2 3 4 5 6 7 8 9 10 11 | X1 = runif(1000)
X2 = runif(1000)
Y = sin(0.5*pi*X1) + sin(0.5*pi*X2) + rnorm(1000)*0.000001
ma.nl(Y,cbind(X1,X2))
#
# in the case of bivariate associations all these measures
# are symmetric apart from rA, the residual association
X = runif(1000)
Y = sin(0.5*pi*X) + rnorm(1000)*0.01
ma.nl(Y,X)$rA
ma.nl(X,Y)$rA
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.