50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


spfilteR (version 2.1.0)

partialR2: Coefficient of Partial Determination

Description

This function computes the partial R-squared of all selected eigenvectors in a spatially filtered linear regression model.

Usage

partialR2(y, x = NULL, evecs)

Value

Vector of partial R-squared values of the eigenvectors.

Arguments

y

response variable

x

vector/ matrix of regressors

evecs

(selected) eigenvectors

Author

Sebastian Juhl

See Also

lmFilter, getEVs

Examples

Run this code
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]))


Run the code above in your browser using DataLab