polynomialLogRegrFw: Forward Selection in Polynomial Logistic Regression

Description Usage Arguments Value Examples

Description

polynomialLogRegrFw implements a forward selection in a polynomial logistic regression model.

Usage

1
polynomialLogRegrFw(data, thres, maxDeg, startDeg)

Arguments

data

A data.frame object with the numeric variables "o", "e" and "logite", representing the binary outcomes, the probabilities of the model under evaluation and the logit of the probabilities. The variable "e" must contain values between 0 and 1. The variable "o" must assume only the value 0 and 1.

thres

A numeric scalar between 0 and 1 representing the significance level adopted in the forward selection.

maxDeg

The maximum degree considered in the forward selection.

startDeg

The starting degree in the forward selection.

Value

A list containing the following components:

fit

An object of class glm containig the output of the fit of the logistic regression model at the end of the iterative forward selection.

m

The degree of the polynomial at the end of the forward selection.

Examples

1
2
3
4
5
e <- runif(100)
logite <- logit(e)
o <- rbinom(100, size = 1, prob = e)
data <- data.frame(e = e, o = o, logite = logite)
polynomialLogRegrFw(data, .95, 4, 1)

givitiR documentation built on May 2, 2019, 10:58 a.m.