View source: R/determination.R
determination | R Documentation |
Function produces coefficients of determination for the provided data
determination(xreg, bruteforce = TRUE, ...)
determ(object, ...)
xreg |
Data frame or a matrix, containing the exogenous variables. |
bruteforce |
If |
... |
Other values passed to cor function. |
object |
The object, for which to calculate the coefficients of determination. |
The function calculates coefficients of determination (aka R^2) between all the provided variables. The higher the coefficient for a variable is, the higher the potential multicollinearity effect in the model with the variable 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).
The method determ
can be applied to wide variety of classes,
including lm
, glm
and alm
.
See details in the vignette "Marketing analytics with greybox":
vignette("maUsingGreybox","greybox")
Function returns the vector of determination coefficients.
Ivan Svetunkov, ivan@svetunkov.com
cor, mcor, stepwise
### 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.