# Questions tagged [logistic]

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

2,620 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
931 views

### How can I measure model performance with weighted logistic regression?

I am working with some survey data that uses probability weights. A number of sources explain that likelihood-based tests and fit statistics like likelihood-ratio, AIC, and BIC are not valid in the ...
217 views

### Logistic regression for classification: are there any analytical solutions for the out-of-sample accuracy?

I run a binary logistic regression, with a binary dependent variable and a continuous independent one. Now I want to evaluate the out-of-sample performance of the classification algorithm so obtained. ...
659 views

### Interpreting regression coefficients based on Andrew Gelman's re-scaling method

I have two predictors in a binary logistic regression model: One binary and one continuous. My primary goal is to compare the coefficients of the two predictors within the same model. I have come ...
376 views

### "Brute force" expected deviance for logistic regression?

A commonly used goodness of fit statistic for logistic regression is the deviance. This is also known as the likelihood ratio chi-square statistic. It is defined as: $$D=\sum_{i=1}^{N}d_i^2$$ d_i^...
6k views

### Getting the bootstrap-validated AUC in R

In a paper by Faraklas et al, the researchers create a Necrotizing Soft-Tissue Infection Mortality Risk Calculator. They use logistic regression to create a model with mortality from necrotizing soft-...
2k views

### Fitting a Logistic Regression via Brier Score or Mean Squared Error

Is there a name for a logistic regression model that has been fit using the Brier score (or equivalently the mean-squared error) rather than the cross-entropy? I realise this isn't maximum-likelihood, ...
2k views

### How to deal with underdispersion with binomial data

I'm working with a pretty large dataset (n = 4,500) where 10% of my points (pixels in a GIS landscape) are 1s and the rest are 0s. The full model for my data looks something like this: ...
3k views

### Frequency weights, rare events and logistic regression

I'm working on a model that requires me to look for predictors for a rare event (less than 0.5% of the total of my observations). My total sample is a significant part of the total population (50,000 ...
622 views

### Calculate goodness-of-fit (with deviance) to compare averaged models?

I need to compare the goodness of fit of several averaged logistic regression models by calculating the deviance explained. I'm using the MuMIn package in R to ...
359 views

### Numerical properties of the logistic growth model for non-linear regression

I am using the nls procedure in R to fit a logistic growth model. In their SSlogis function, José Pinheiro and Douglas Bates chose the formulation ...
2k views

### Train accuracy < Test accuracy with regularization

With a friend we were playing with the notMNIST data, logistic regression and regularization. Without regularization, we could achieve a training accuracy (10k samples) of 78%, and test accuracy (15k ...
756 views

### How to subset alternatives in nested multinomial logistic regression?

I am trying to predict whether or not captains in a particular groundfish fishery choose to fish on any given day and what variables may influence that decision. Originally I had planned on using ...
254 views

### Hidden vs Firth vs Shen-Gao logistic regression: dealing with the Hauck-Donner effect

In 1993 a version of penalized logistic regression was introduced by Firth in order to reduce the bias due to outliers and/or (quasi-)perfect prediction in logistic regression: Bias Reduction of ...
191 views

### Including feature-dependent priors on output class, in bayesian logistic regression

When doing logistic regression with data $D_N = \{(x_i, y_i)\}_i^N$ with $x_i \in \mathbf{X}^N$ (each data point has N features) and $y_i \in \mathbf{Y}$ being assigned output classes, in a Bayesian ...
502 views

### Is it possible to get a prediction interval for logistic regression via a latent variable?

carbocation asked how to compute prediction intervals for logistic regression. The answer was that prediction intervals don't make sense for logistic regression because the response variable only ...
2k views

### Geometric Interpretation of Softmax Regression

I'm writing a series of blog posts on the basics of machine learning, just for fun, mostly to validate my understanding of Andrew Ng's class. As I'm currently studying generalized linear models (GLMs),...
301 views

### Making new variable instead of correcting for temporal autocorrelation in a GLMM. Is it a valid alternative?

I am doing some forest disturbance research, in which the aim is to predict the probabilities of wind damage occurrence in forest stands of different site (altitude, slope steepness) and stand ...
2k views

### Maximum entropy classifier and sentiment analysis

I am doing a project work in sentiment analysis (on Twitter data) using machine learning approach. In order to find the 'best' way to this I have experimented with naive Bayesian and maximum entropy ...
1k views

### Simulate/Generate Data for Multinomial Logistic regression

How to simulate data for Multinomial Logistic regression? For Example i want to generate a high dimensional data set with 90 subjects and 500 independent predictors. The ratio of Classes should given ...
216 views

### What are the pros and cons of different metrics for evaluating a logistic regression model?

In the data science world, I have always evaluated the performance of logistic regression models simply using ROC/AUC. However recently, I've read from some traditional statistics source about some ...
264 views

### Mathematically Describing PCA chained with Logistic Regression

Python's scikit-learn package has a convenient pipe function that can combine machine learning techniques into one model with ...
494 views

### Is one-vs-all logit or multionomial logit regression more accurate?

What is advice of when to use one-vs-all logit or multinomial logit regressions? Most importantly, which one has a higher prediction power? Can one test hypothesis and estimate confidence intervals in ...
562 views

### logistic regression prediction: changing interpretation with changing prior

The data include 3 equally sized subsets A, B and C, belonging to two classes: A belongs to class 1. B and C belong to class 2. The prior probabilities of an observation coming from class 1 ...
2k views

### How does the RMS package's nomogram calculate points for continuous variables?

I have been reading a number of papers where researchers have created risk scores based on logistic regression models. Often they refer to "Sullivan's method" but I have no access to this paper and ...
144 views

### Why beta regression?

According to http://r-statistics.co/Beta-Regression-With-R.html, the topline remark is: Beta regression is used when you want to model Y that are probabilities themselves Grammar aside, one may ...
5k views

### How should clustering be accounted for in logistic regression, when there are very few clusters?

I have survey data from 1000 patients. This is a convenience venue-based sample. In a specific city, at 9 hospitals that happen to have a psychosocial program, patients can opt into the program if ...
3k views

### Summing predicted probabilities from logistic regression using 'one vs. rest'

I have a multiclass classification problem that I have solved using a 'one vs. rest' approach via binary logistic regression classifiers from Python's scikit-learn package. In my problem, there are 3 ...
428 views

### Using Random Forests for modeling discrete choice problems

I am trying to model a discrete choice scenario in which (i) the explanatory variables are both individual- and alternative-specific, and (ii) the number of alternatives varies between individuals. ...
3k views

### Moran's test using the residuals of logistic regression

I have fitted a logistic regression and I would like to check for spatial autocorrelation in the residuals of the model. Is it statistically correct to implement the Moran's test using the residuals ...
187 views

### Which approach can be used to regress sleep time on brain mass, in this data set?

I was reading this blog post: https://htmlpreview.github.io/?https://raw.githubusercontent.com/avehtari/BDA_R_demos/master/demos_rstan/sleep.html the author describes a model to predict how many ...
3k views

### Does the Box Tidwell test for linearity of the logit require predictors to be in the range [0,1]?

Given a multinomial logistic regression model with 4 independent variables, 4 relevant interactions and a dependent variable with 3 categorical outcomes, I wanted to test for linearity of the logit. ...
149 views

### Censored logit transform for (ad hoc) exploratory data analysis

In my work I commonly have to analyze binary composition data, expressed as a fraction $f\in[0,1]$. The data $f[x]$ is spatially distributed ($x\in\mathbb{R}^n$, $n=1,2,3$), and typically comes in the ...
2k views

### How to know when to use Kernel SVM and not Linear SVM?

If I have more than 3 features in a dataset, then I can't visualize them to see if my classes are scattered in a non linear fashion. So how do I know when is the right way to use linear model with non-...
653 views

### Errors-in-Variables model for logistic regression

Simple question: I am familiar (though don't have tons of experience) with errors-in-variables regression. From what I have seen, this mostly is used with continuous outcomes in a linear model. A) Is ...
289 views

### Put constraint on max (or min) predicted value (mgcv)

I want to fit my data using a logistic GAM model with cubic regression splines. I know for sure that in reality my estimated probability should not go above 0.5 (due to mislabeling). So I thought ...
908 views

### Aggregating Standard Errors for Predicted Probability Estimates

I obtain predicted values from a logistic regression for a certain outcome (e.g., mortality) at the hospital level – the data is at the patient level – and need to compute the average across hospitals....
874 views

### Diagnostics for multinomial and ordinal regression models

In the case of a binary outcome and a number of explanatory variables, logistic regression can be used and a number of diagnostic tools can be applied to assess the relative (e.g. AIC, if one wishes ...
8k views

### Mixed effect logistic regression in R: choosing random effects

I conducted an experiment which measured a binary response for each subject. The subjects were in 1 of 3 groups. There were two other fixed factors, each of which were continuums (cont1, cont2) ...
236 views

### Running regularized logistic regressions on very large datasets

I want to run a regularized logistic regression on a dataset with 25 million observations and about a 1000 mostly non-sparse columns with non-ignorable weights. My first choice would be BayesGLM, ...
377 views

### Separation in logistic regression in a complex survey?

Firth's penalized maximum likelihood estimates, exact logistic regression and Bayesian logistic regression (e.g. bayesglm) can account for separation in logistic regression. But how to account for ...
2k views

### Singularity issues in multinomial logit model with differing choice sets

I am estimating a discrete choice model in which individuals choose which schools to attend. I have a large amount of data on individuals and schools. However, each particular school only appears in ...
407 views

### Confidence interval for proportions

I have some data like this: id pop var 1 593 51 2 592 31 3 346 20 4 1214 70 5 1063 66 6 1370 71 each ...
733 views

### Modeling delayed feedback using logistic regression

Suppose we are trying to model the probability of a user clicking on an ad using logistic regression. We will receive only the positive feedback so, we define $Y = 1$ when success was observed, $Y=0$ ...
141 views

### Different coefficient estimates from ncvreg and glmnet in logistic regression

I'm trying to compare the results from glmnet and ncvreg in logistic regression. The methods have similar coefficients estimates ...
872 views

### Can you use regression to predict values if you imputed data using MICE?

I used multiple imputation on a data set that had some missing values (I had to do this as the sample size was low so I couldn't just exclude the NAs). I know you can do ... 