partialR2 | R Documentation |
This function computes the partial R-squared of all selected eigenvectors in a spatially filtered linear regression model.
partialR2(y, x = NULL, evecs)
y |
response variable |
x |
vector/ matrix of regressors |
evecs |
(selected) eigenvectors |
Vector of partial R-squared values of the eigenvectors.
The function assumes a linear regression model. Since the
eigenvectors are mutually uncorrelated, partialR2
evaluates
them sequentially. In generalized linear models, the presence of a link
function can corrupt the uncorrelatedness of the eigenvectors.
Sebastian Juhl
lmFilter
, getEVs
data(fakedata) y <- fakedataset$x1 x <- fakedataset$x2 # get eigenvectors E <-getEVs(W = W, covars = NULL)$vectors (out <- partialR2(y = y, x = x, evecs = E[, 1:5]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.