Learn R Programming

greybox (version 0.5.3)

determination: Determination coefficients

Description

Function produces determination coefficient for the provided data

Usage

determination(xreg, bruteforce = TRUE, ...)

determ(xreg, bruteforce = TRUE, ...)

Arguments

xreg

Data frame or a matrix, containing the exogenous variables.

bruteforce

If TRUE, then all the variables will be used for the regression construction (sink regression). If the number of observations is smaller than the number of series, the function will use stepwise function and select only meaningful variables. So the reported values will be based on stepwise regressions for each variable.

...

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 details in the vignette "Marketing analytics with greybox": vignette("maUsingGreybox","greybox")

See Also

cor, mcor, stepwise

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