R: BIC forward regression with generalised linear models

BIC forward regression with generalised linear models {Rfast} | R Documentation

## BIC forward regression with generalised linear models

### Description

BIC forward regression with generalised linear models.

### Usage

    bic.fs.reg(y, x, tol = 2, type = "logistic")

### Arguments

`y` | A numerical vector.
`x` | A matrix with data, the predictor variables.
`tol` | If the BIC difference between two successive models is less than the tolerance value, the variable will not enter the model.
`type` | If you have a binary dependent variable, put "logistic". If you have count data, put "poisson".

### Details

The forward regression tries one by one the variables using the BIC at each step for the latest variable. If the BIC of the regression model with that variable included, is less than "tol" from the previous model without this variable, the variable enters.

### Value

A matrix with two columns, the index of the selected variable(s) and the BIC of each model.

### Author(s)

Marios Dimitriadis

R implementation and documentation: Marios Dimitriadis <kmdimitriadis@gmail.com>.

### References

Draper, N.R. and Smith H. (1988). Applied regression analysis. New York, Wiley, 3rd edition.

### See Also

`fs.reg, bic.corfsreg, cor.fsreg, score.glms, univglms, logistic_only, poisson_only, regression`

### Examples

    ## Not run:
    x <- matrix(rnorm(200 * 50), ncol = 50)
    ## 200 variables, hence 200 univariate regressions are to be fitted
    y <- rbinom(200, 1, 0.5)
    a <- bic.fs.reg(y, x)
    x <- NULL

    ## End(Not run)

[Package Rfast version 2.0.0 Index]