MEL {hlr}R Documentation

Logistic Regression Using Maximum Estimated Likelihood

Description

Logistic regression using maximum estimated likelihood (MEL) in order to cope with separation issues.

Usage

MEL(x, y, delta = 0.01, epsilon = 1e-06, maxit = 100)
## S3 method for class 'MEL':
print(x, ...)
## S3 method for class 'MEL':
summary(object, ...)
## S3 method for class 'MEL':
plot(x, ...)

Arguments

x design matrix (n, p) for function MEL; object of class 'MEL' for the print and plot methods
y response vector
delta constant
epsilon precision constant
maxit maximum number of iterations
object object of class 'MEL'
... further arguments to be passed to the methods

Details

The MEL function fits the MEL-model to the data. The print method displays the model coefficients. The summary method displays the model coefficients and displays the names of the components of the MEL output object. The plot function plots the observed response values against the predicted values (using the MEL linear predictor) on link scale. The actual logistic cdf is added as well.

Value

Object of class 'MEL' with following components

MEL MEL estimates of the coefficients
outMEL object of class 'glm' corresponding to the final fit

Author(s)

Tobias Verbeke, largely based on original S-PLUS code by Peter J. Rousseeuw and Andreas Christmann

References

Rousseeuw, P.J. and Christmann, A. (2003). Robustness against separation and outliers in binary regression. Computational Statistics & Data Analysis, 43, 315 – 332.

Original S-PLUS code available at http://www.stoch.uni-bayreuth.de/de/CHRISTMANN

Examples

  par(mfrow = c(2,1))
  ### Example 1 for function MEL: data set has overlap
  set.seed(314)
  n <- 500
  beta <- matrix(c(2), ncol=1)
  x <- matrix(rnorm(n), ncol=1)
  eta <- -3 + x 
  y <- rbinom(nrow(x), 1, plogis(eta))
  out <- MEL(x, y)
  print(out)
  summary(out)
  plot(out)
  title("overlap")

  ### Example 2 for function MEL: data set has no overlap
  y[eta <= -1] <- 0
  y[eta > -1] <- 1
  out <- MEL(x,y, delta=0.01)
  out
  plot(out)
  title("no overlap")

  ### Example 3 for function MEL: all responses are equal to 0
  y <- rep(0, nrow(x))
  MEL(x,y)

  ### Example 4 for function MEL: all responses are equal to 1
  y <- rep(1, nrow(x))
  out <- MEL(x,y)
  out 

[Package hlr version 0.0-4 Index]