bs.reg: Backward selection regression

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/variable_selection.R

Description

Backward selection regression.

Usage

1
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

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

Example output

Loading required package: Rcpp
Loading required package: RcppZiggurat

Rfast documentation built on May 18, 2021, 1:07 a.m.