|BIC (using partial correlation) forward regression||R Documentation|
BIC (using partial correlation) forward regression.
bic.corfsreg(y, x, tol = 2)
A numerical vector.
A matrix with data, the predictor variables.
If the BIC difference between two successive models is less than the tolerance value, the variable will not enter the model.
The forward regression tries one by one the variables using the F-test, basically partial F-test every time for the latest variable. This is the same as testing the significance of the coefficient of this latest enetered variable. Alternatively the correlation can be used and this case the partial correlation coefficient. There is a direct relationship between the t-test statistic and the partial correlation coefficient. Now, instead of having to calculate the test statistic, we calculate the partial correlation coefficient. The largest partial correlation indicates the candidate variable to enter the model. If the BIC of the regression model with that variable included, reduces, less than "tol" from the previous model without this variable, the variable enters.
A matrix with two columns, the index of the selected variable(s) and the BIC of each model. The first line is always 0 and the BIC of the model with no predictor variables.
R implementation and documentation: Michail Tsagris <firstname.lastname@example.org> and Manos Papadakis <email@example.com>.
Draper, N.R. and Smith H. (1988). Applied regression analysis. New York, Wiley, 3rd edition.
cor.fsreg, score.glms, univglms, logistic_only,
## 200 variables, hence 200 univariate regressions are to be fitted x <- matrix( rnorm(200 * 200), ncol = 200 ) y <- rnorm(200) system.time( a1 <- bic.corfsreg(y, x) ) system.time( a2 <- cor.fsreg(y, x) ) x <- NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.