# Questions tagged [logistic]

Refers generally to statistical procedures that utilize the logistic function, most commonly various forms of logistic regression

7,082 questions
Filter by
Sorted by
Tagged with
15k views

### Can I use glm algorithms to do a multinomial logistic regression?

I am using spotfire (S++) for statistical analysis in my project and I have to run multinomial logistic regression for a large data set. I know best algorithm would have been mlogit, but unfortunately ...
800 views

### Analysis of Danish mask study data by Nassim Nicholas Taleb (binomial GLM with complete separation)

Recently, Nassim Nicholas Taleb made this post about the recent Danish mask study, a randomized controlled trial which concluded that the proportions of newly diagnosed coronavirus infections was not ...
13k views

### Pearson VS Deviance Residuals in logistic regression

I know that standardized Pearson Residuals are obtained in a traditional probabilistic way: $$r_i = \frac{y_i-\hat{\pi}_i}{\sqrt{\hat{\pi}_i(1-\hat{\pi}_i)}}$$ and Deviance Residuals are obtained ...
17k views

### Ordinal logistic regression in Python

I would like to run an ordinal logistic regression in Python - for a response variable with three levels and with a few explanatory factors. The statsmodels package ...
10k views

### How can I use logistic regression betas + raw data to get probabilities

I have a model fitted (from the literature). I also have the raw data for the predictive variables. What's the equation I should be using to get probabilities? Basically, how do I combine raw data ...
1k views

### categorizing a variable turns it from insignificant to significant

I have a numeric variable which turns out not significant in a multivariate logistic regression model. However, when I categorize it into groups, suddenly it becomes significant. This is very counter-...
8k views

### Negative coefficient in ordered logistic regression

Suppose we have the ordinal response $y:\{\text{Bad, Neutral, Good}\} \rightarrow \{1,2,3\}$ and a set of variables $X:=[x_1,x_2,x_3]$ that we think will explain $y$. We then do an ordered logistic ...
4k views

### Properties of logistic regressions

We're working with some logistic regressions and we have realized that the average estimated probability always equals the proportion of ones in the sample; that is, the average of fitted values ...
8k views

19k views

### How to plot decision boundary in R for logistic regression model?

I made a logistic regression model using glm in R. I have two independent variables. How can I plot the decision boundary of my model in the scatter plot of the two variables. For example, how can ...
21k views

### What is the difference between decision_function, predict_proba, and predict function for logistic regression problem?

I have been going through the sklearn documentation but I am not able to understand the purpose of these functions in the context of logistic regression. For ...
32k views

### Output of Logistic Regression Prediction

I have created a Logistic Regression using the following code: ...
20k views

### Is logistic regression a non-parametric test?

I recently received the following question via email. I'll post an answer below, but I was interested to hear what others thought. Would you call logistic regression a non-parametric test? My ...
60k views

### Intercept term in logistic regression

Suppose we have the following logistic regression model: $$\text{logit}(p) = \beta_0+\beta_{1}x_{1} + \beta_{2}x_{2}$$ Is $\beta_0$ the odds of the event when $x_1 = 0$ and $x_2=0$? In other words, ...
5k views

### The difference between with or without intercept model in logistic regression

I like to understand the difference between with or without intercept model in logistic regression Is there any difference between them except that with the intercept the coefficients regard the log(...
56k views

### How to build a confusion matrix for a multiclass classifier?

I have a problem with 6 classes. So I build a multiclass classifier, as follows: for each class, I have one Logistic Regression classifier, using One vs. All, which means that I have 6 different ...
6k views

### Regularized bayesian logistic regression in JAGS

There are several math-heavy papers that describe the Bayesian Lasso, but I want tested, correct JAGS code that I can use. Could someone post sample BUGS / JAGS code that implements regularized ...
22k views

### Do coefficients of logistic regression have a meaning?

I have a binary classification problem from several features. Do the coefficients of a (regularized) logistic regression have an interpretable meaning? I thought they could indicate the size of ...
6k views

### Logistic Regression: Scikit Learn vs glmnet

I am trying to duplicate the results from sklearn logistic regression library using glmnet package in R. From the ...
30k views

### Cox model vs logistic regression

Let's say we are given the following problem: Predict which clients are most likely to stop buying in our shop in next 3 months. For each client we know the month when one started to buy in our ...
1k views

### Dichotomizing continuous variables at their optimal cut-off for clinical interpretation

In medical context, when presenting results from a binary outcome with a continuous predictor, the OR (odds ratio) can be difficult to interpret. Example: A doctor does a study in which he wants to ...
2k views

### Philosophical question on logistic regression: why isn't the optimal threshold value trained?

Usually in logistic regression, we fit a model and get some predictions on the training set. We then cross-validate on those training predictions (something like here) and decide the optimal threshold ...
56k views

### How to interpret a ROC curve?

I applied logistic regression to my data on SAS and here are the ROC curve and classification table. I am comfortable with the figures in the classification table, but not exactly sure what the roc ...
5k views

### Is the logit function always the best for regression modeling of binary data?

I've been thinking about this problem. The usual logistic function for modeling binary data is: $$\log\left(\frac{p}{1-p}\right)=\beta_0+\beta_1X_1+\beta_2X_2+\ldots$$ However is the logit function,...
9k views

### Discriminant analysis vs logistic regression

I found some pros of discriminant analysis and I've got questions about them. So: When the classes are well-separated, the parameter estimates for logistic regression are surprisingly unstable. ...
2k views

### Intuition for Support Vector Machines and the hyperplane

In my project I want to create a logistic regression model for predicting binary classification (1 or 0). I have 15 variables, 2 of which are categorical, while the rest are a mixture of continuous ...
12k views

### Overdispersion in logistic regression

I'm trying to get a handle on the concept of overdispersion in logistic regression. I've read that overdispersion is when observed variance of a response variable is greater than would be expected ...
5k views

### Why use the logit link in beta regression?

Recently, I have been interested in implementing a beta regression model, for an outcome that is a proportion. Note that this outcome would not fit into a binomial context, because there is no ...
3k views

### How can Logistic Regression produce curves that aren't traditional functions?

I think I have some fundamental confusion about how the functions in Logistic regression work (or maybe just functions as a whole). How is it that the function h(x) produces the curve seen in the ...
14k views

### R package for fixed-effect logistic regression

I'm looking for an R package for estimating the coefficients of logit models with individual fixed-effect (individual intercept) using Chamberlain's 1980 estimator. ...
9k views

### What loss function should one use to get a high precision or high recall binary classifier?

I'm trying to make a detector of objects that occur very rarely (in images), planning to use a CNN binary classifier applied in a sliding/resized window. I've constructed balanced 1:1 positive-...
7k views

### Seeking a Theoretical Understanding of Firth Logistic Regression

I am trying to understand Firth logistic regression (method of handling perfect/complete or quasi-complete separation in logistic regression) so I can explain it to others in simplified terms. Does ...
8k views

### Applying logistic regression with low event rate

I have a dataset in which the event rate is very low ( 40,000 out of $12\cdot10^5$). I am applying logistic regression on this. I have had a discussion with someone where it came out that logistic ...
5k views

### Why is it wrong to interpret SVM as classification probabilities?

My understanding of SVM is that it's very similar to a logistic regression (LR), i.e. a weighted sum of features is passed to the sigmoid function to get a probability of belonging to a class, but ...
4k views

### Pros and Cons of Log Link Versus Identity Link for Poisson Regression

I am carrying out a Poisson regression with the end goal of comparing (and taking the difference of) the predicted mean counts between two factor levels in my model: $\hat{\mu}_1-\hat{\mu}_2$, while ...
383 views

### Comparison of statistical tests exploring co-dependence of two binary variables

Suppose we observe data $(X_i,Y_i)_{i=1,...,n}$ on two binary variables: $X\in\{0,1\}$ and $Y\in\{0,1\}$. We would like to test if $X$ and $Y$ are co-dependent (related). Standard suggestions in ...
15k views

### How to test for simultaneous equality of choosen coefficients in logit or probit model?

How to test for simultaneous equality of choosen coefficients in logit or probit model ? What is the standard approach and what is the state of art approach ?
9k views

### How do I train a (logistic?) regression in R using L1 loss function?

I can train a logistic regression in R using glm(y ~ x, family=binomial(logit))) but, IIUC, this optimizes for log likelihood....