Description Usage Arguments Details Value Author(s) References Examples
Robust logistic regression estimator of Bianco and Yohai
1 2 3 4 5 6 7 8 9 10 | rlogit (formula, dat, const=0.5, kmax=1e3, maxhalf=10, verbose=FALSE)
## S3 method for class 'rlogit'
coef(object,...)
## S3 method for class 'rlogit'
trainauc(fit, training.data=NULL, ...)
## S3 method for class 'rlogit'
predict(object, newdata, ...)
## S3 method for class 'rlogit'
ratio(fit)
logistic.f(eta,h,loss=TRUE)
|
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 |
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 |
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.
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) |
Christophe Croux, Gentiane Haesbroeck. Thanks to Kristel Joossens and Valentin Todorov for improving the code.
Implementing the Bianco and Yohai estimator for Logistic Regression
Croux, C., and Haesbroeck, G. (2003)
Computational Statistics and Data Analysis, 44, 273-295
1 2 3 4 5 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.