Calculate the variance inflation factor (VIF) of the eigenvectors in the spatial filter.

vif.ev(x = NULL, evecs, na.rm = TRUE)

Arguments

x

vector/ matrix of regressors (default = NULL)

evecs

(selected) eigenvectors

na.rm

remove missing values in covariates (TRUE/ FALSE)

Value

Returns a vector containing the VIF for each eigenvector.

Note

This function assumes a linear model which ensures the uncorrelatedness of the eigenvectors. Note that regression weights or the link function used in generalized linear models can corrupt this property.

See also

Author

Sebastian Juhl

Examples

data(fakedata)
E <- getEVs(W = W, covars = NULL)$vectors
(VIF <- vif.ev(x = fakedataset$x1, evecs = E[, 1:10]))
#>  [1] 1.004385 1.043694 1.030879 1.078498 1.000837 1.010944 1.000053 1.006641
#>  [9] 1.000079 1.086198