Learn R Programming

aucm (version 2016.1-2)

rlogit: rlogit

Description

Robust logistic regression estimator of Bianco and Yohai

Usage

rlogit (formula, dat, const=0.5, kmax=1e3, maxhalf=10, verbose=FALSE) "coef"(object,...) "trainauc"(fit, training.data=NULL, ...) "predict"(object, newdata, ...) "ratio"(fit) logistic.f(eta,h,loss=TRUE)

Arguments

formula
a formula specifying the model to be fit.
dat
a data frame containing the outcome and covariates in the model
const
tuning constant used in the computation of the estimator, defaults to 0.5
kmax
maximum number of iterations before convergence, defaults to 1000
maxhalf
max number of step-halving ,defaults to 10
verbose
logical
object
an object of class 'rlogit'
fit
an object that inherits from class 'auc' such as 'rauc' or 'sauc'
newdata
data at which to predict
training.data
data frame used to compute auc based on a fit obtained by a call to rauc, sauc or sauc.dca
eta,h
logistic.f computes for loss = FALSE expit(eta/h) or expit(-eta/h) for loss = TRUE
loss
a boolean. if TRUE (default) logistic loss is assumed.
...
arguments passed to or from methods

Value

A list with the follwoing components:
convergence
logical, was convergence achieved
objective
value of the objective function at the minimum
coef
estimates for the parameters
sterror
standard errors of the parameters (if convergence is TRUE)

Details

This program computes the estimator of Bianco and Yohai (1996) in logistic regression. By default, an intercept term is included and p parameters are estimated. The outcome is coded as a 0/1 binomial variable.

If initwml == TRUE, a weighted ML estimator is computed with weights derived from the MCD estimator computed on the explanatory variables. If initwml == FALSE, a classical ML fit is perfomed. When the explanatory variables contain binary observations, it is recommended to set initwml to FALSE or to modify the code of the algorithm to compute the weights only on the continuous variables.

References

Implementing the Bianco and Yohai estimator for Logistic Regression Croux, C., and Haesbroeck, G. (2003) Computational Statistics and Data Analysis, 44, 273-295

Examples

Run this code

set.seed(1)
x0 <- matrix(rnorm(100,1))
y  <- as.numeric(runif(100)>0.5)        # numeric(runif(100)>0.5)
dat=data.frame(y=y, x=x0)
rlogit(y~x, dat)




Run the code above in your browser using DataLab