Questions tagged [logistic]

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

The logistic function is $$ f(x) = \frac{1}{1+e^{-x}}, $$ which maps real numbers to $(0,1)$. One common use of the logistic function is logistic regression, which is a standard method of quantifying the effect of a set of predictors $\{X_1, ..., X_p\}$ on a binary outcome, $Y$. The model can be written as

$$ P(Y=1|X) = f(\beta_0 + \beta_1X_1 + ... + \beta_p X_p) = \frac{1}{1 + e^{-(\beta_0 + \beta_1X_1 + ... + \beta_p X_p)}}$$

The logistic regression model has the nice property that the exponentiated regression coefficients can be interpreted as odds ratios associated with a one unit increase in the predictor.

Often we consider the odds in favor of $Y=1$ given $X$:

$$\text{odds} = \frac{P(Y=1|X)}{P(Y=0|X)} = \frac{P(Y=1|X)}{1 - P(Y=1|X)} = e^{\beta_0 + \beta_1X_1 + ... + \beta_p X_p}$$

The odds ratio associated with a one unit increase in some predictor, $X_i$, is therefore written as:

$$\frac{\text{odds}(x_i+1)}{\text{odds}(x_i)} = \frac{e^{\beta_0 + \beta_1X_1 + ...+ \beta_i(X_i+1) + ... + \beta_p X_p}}{e^{\beta_0 + \beta_1X_1 + ...+ \beta_iX_i + ... + \beta_p X_p}} = e^{\beta_i}$$

A second use of the logistic function (but unrelated to logistic regression) is the logistic distribution, which has $f(x)$ as its quantile function.

7842 questions
36
votes
3 answers

What are the differences between Logistic Function and Sigmoid Function?

$$ \begin{equation} f(x)=\frac{L}{1+e^{-k(x-x_0)}} \end{equation} $$ Fig 1. (img) Logistic Function $$ \begin{equation} S(x)= \frac{1}{1+e^{-t}} \end{equation} $$ Fig 2. (img) Sigmoid Function What are the differences between Logistic Function and…
Jul
  • 715
30
votes
1 answer

Hessian of logistic function

I have difficulty to derive the Hessian of the objective function, $l(\theta)$, in logistic regression where $l(\theta)$ is: $$ l(\theta)=\sum_{i=1}^{m} \left[y_{i} \log(h_\theta(x_{i})) + (1- y_{i}) \log (1 -…
DSKim
  • 1,289
20
votes
4 answers

Logistic regression with binary dependent and independent variables

Is it appropriate to do a logistic regression where both the dependent and independent variables are binary? for example the dependent variable is 0 and 1 and the predictors are contrast coded variables -1 and 1 ?
upabove
  • 3,137
15
votes
4 answers

Reporting results of a logistic regression

I have the following logistic regression output: Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.5716 0.1734 3.297 0.000978 *** R1 -0.4662 0.2183 -2.136 0.032697 * R2 -0.5270 …
upabove
  • 3,137
15
votes
2 answers

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 regression would not give good confusion matrix on…
ayush biyani
  • 1,617
14
votes
3 answers

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. Is there a way to train the model using the linear ($L_1$) loss function (which in this case is the same as the total…
sds
  • 2,236
11
votes
2 answers

Case weighted logistic regression

I'm looking at a few logistic regression issues. ("regular" and "conditional"). Ideally, I'd like to weight each of the input cases so that the glm will focus more on predicting the higher weighted cases correctly at the expense of possibly…
Noah
  • 627
10
votes
1 answer

How to deal with survey question with multiple response?

I have a dataset asking people whether they have been to a certain places (e.g. A, B, C, D), and they can make more than one choice, then a specimen is taken from their nose to see if they are infected with some disease. I need to find out the…
lokheart
  • 3,199
  • 9
  • 40
  • 49
10
votes
2 answers

What is "reject inferencing" and how can it be used to increase the accuracy of a model?

Can anybody explain in detail: What does reject inferencing mean? How can it be used to increase accuracy of my model? I do have idea of reject inferencing in credit card application but struggling with the thought of using it to increase the…
ayush biyani
  • 1,617
8
votes
2 answers

Logistic regression for bounds different from 0 and 1

I have some data; it's a proportion $y$ of some stuff relative to everything, so it's bounded between 0 and 1 by definition. The proportion changes over time. Besides fairly high variance there is a step-like change about the middle of the time…
AVB
  • 628
8
votes
2 answers

Does it make sense to consider non-binary logit?

Consider the nested logistic regression model’s following interpretation. A person repeatedly chooses between two different options. These options feature different levels of the same features (e.g. car characteristics). In some cases, the person…
mzuba
  • 1,228
7
votes
3 answers

Pooling data for logistic regression

I want to run a logistic regression on greyhound races. For each race I have a dummy variable (y) that takes value one when the dog wins and zero otherwise. Unfortunately the number of hounds in each race can vary as some are withdrawn for whatever…
Baz
  • 1,763
  • 3
  • 16
  • 27
6
votes
1 answer

Pooled logistic regression with irregular intervals

I'm planning an analysis that will require pooled logistic regression to analyze a longitudinal dataset with time-dependent explanatory variables (see here - D'Agostino, et al. 1990). However, the standard analysis uses regularly spaced intervals.…
stats134711
  • 721
  • 1
  • 7
  • 17
6
votes
1 answer

Alternative ways for interpretation of odds

I am reading the second edition of Categorical Data Analysis by Alan Agresti, and somehow stuck in the following second paragraph: I don't quite understand why $\beta\pi(\hat{x})(1 - \pi(\hat{x}))$ will give the probability when $x = 26.3$, can…
lokheart
  • 3,199
  • 9
  • 40
  • 49
6
votes
2 answers

Interpretation of reference category in logistic regression

I have some categorical data set; I want to use these as predictor variables, like one is slope. And it categorized in to five classes as, < 10 deg, 10-20 deg, 20-30 deg, 30-40 deg, > 40 deg. I have taken first class as reference category (< 10…
SHRABAN
  • 61
1
2 3
9 10