# Regression with Logistic-Distribution errors (NOT Logistic Regression)

I was wondering if anyone ever tried to do a regression where the errors, instead of normal, would be assumed to be from the Logistic Distribution.

I don't mean Logistic Regression, as I don't assume that the $$y$$'s are coming from a Bernoulli distribution whose mean is dependent on some covariates, but rather that the $$y$$'s come from a symmetric Logistic distribution, whose pdf is:

$$f_Y(y;\mu) = \frac{e^{(y-\mu)}}{(1+e^{(y-\mu)})^2},\,\,-\infty\lt y\lt \infty$$

(Unless the models are some how equivalent and I missed that)

Yes, I have done this. You can trick the "survreg" function in the "survival" package of R into doing it by assigning all the censoring values to "1" (uncensored) and then requesting the logistic distribution. Here is an example.

library(survival)

n= 1000
set.seed(12345)
x = rnorm(n)
y = 2 + 5*x + rnorm(n)
observed = rep(1,n)

fit.normal   = survreg(Surv(y, observed) ~ x, dist = "gaussian")
fit.logistic = survreg(Surv(y, observed) ~ x, dist = "logistic")
summary(fit.normal)
summary(fit.logistic)


The normal model fits better here (Log Likelihood = -1426 vs. -1436.9 for logistic), which is not surprising since the data are generated from the normal model.

• cool, I have done so numerically now in python. Do you know if there's any benefits of doing so? Any papers/etc. ? – Maverick Meerkat Feb 22 at 15:20
• This is a good answer, but I find it slightly surprising you demonstrate it by using rnorm() to generate your errors instead of rlogis(). – gung - Reinstate Monica Feb 22 at 15:31
• There is a lesson either way. Exercise for the reader. – BigBendRegion Feb 22 at 15:34

I've done so now, check Numerical implementation in Python (Jupyter Notebook).

Can't say that there's much difference from fitting a regression to it vs. a normal regression. I also tried with different scale parameter, and both regressions seem to be quite close (though of course the log-likelihood is slightly better for the Logistic which generated the data).

So maybe there is no necessity for it, as normal regression fits just as good, and is easier to compute.