Learn R Programming

greybox (version 0.3.0)

determination: Determination coefficients

Description

Function produces determination coefficient for the provided data

Usage

determination(xreg, ...)

Arguments

xreg

Data frame or a matrix, containing the exogenous variables.

...

Other values passed to cor function.

Value

Function returns the vector of determination coefficients.

Details

The function calculates determination coefficients (aka R^2) between all the provided variables. The higher the coefficient is, the higher the potential multicollinearity effect in the model with the variables will be. Coefficients of determination are connected directly to Variance Inflation Factor (VIF): VIF = 1 / (1 - determination). Arguably it is easier to interpret, because it is restricted with (0, 1) bounds. The multicollinearity can be considered as serious, when determination > 0.9 (which corresponds to VIF > 10).

See Also

cor

Examples

Run this code
# NOT RUN {
### Simple example
xreg <- cbind(rnorm(100,10,3),rnorm(100,50,5))
xreg <- cbind(100+0.5*xreg[,1]-0.75*xreg[,2]+rnorm(100,0,3),xreg,rnorm(100,300,10))
colnames(xreg) <- c("x1","x2","x3","Noise")
determination(xreg)

# }

Run the code above in your browser using DataLab