bs.reg: Backward selection regression

View source: R/variable_selection.R

Backward selection regressionR Documentation

Backward selection regression

Description

Backward selection regression.

Usage

bs.reg(y, x, alpha = 0.05, type = "logistic")

Arguments

y

A numerical vector with the response variable values. It can either be of 0 and 1 values (Logistic regression) or of integer values 0, 1, 2,... (Poisson regression).

x

A numerical matrix with the candidate variables.

alpha

Threshold (suitable values are in [0,1]) for assessing the significance of p-values. The default value is at 0.05.

type

For the Logistic regression put "logistic" (default value) and for Poisson type "poisson".

Details

This function currently implements only the binary Logistic and Poisson regressions. If the sample size is less than the number of variables a notification message will appear and no backward regression will be performed.

Value

The output of the algorithm is an S3 object including:

info

A matrix with the non selected variables and their latest test statistics and p-values.

Vars

A vector with the selected variables.

Author(s)

Marios Dimitriadis

R implementation and documentation: Marios Dimitriadis <mtsagris@csd.uoc.gr>

See Also

fs.reg, univglms, cor.fsreg

Examples

y <- rbinom(50, 1, 0.5)
x <- matrnorm(50, 10)
res<-bs.reg(y, x)

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.