question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

p-value and confident intervals with logistic regression?

See original GitHub issue

Description

Steps/Code to Reproduce

Expected Results

Actual Results

Versions

Hi, Could it be possible to get p-value and confident intervals with logistic regression? If not, how could I get them? I tried with Logit in statsmodel, but it always output NAN value for coefficient and p-values. Thanks a lot!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
achieverminacommented, Aug 24, 2019

Can I work on this?

2reactions
rthcommented, Jan 27, 2019

See https://datascience.stackexchange.com/questions/15398/how-to-get-p-value-and-confident-interval-in-logisticregression-with-sklearn

There was also some an earlier discussion about this https://github.com/scikit-learn/scikit-learn/issues/6773

Although computing these for all models may be out of scope, I still think that it would be useful to add a small section on confidence intervals to the docs with pointers of where to look: e.g.

  • statsmodels
  • maybe an example of boostrapping with a simple linear model
  • listing models that can be used to compute the confidence interval (e.g. Gradient Boosting, Gaussian Process Regression, random forest with http://contrib.scikit-learn.org/forest-confidence-interval/
  • for models that have predict_proba mentioning the difference between that information and e.g. confidence intervals computed by boostrapping
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can you calculate Confidence Intervals for a logistic ...
Yes it's possible. Wald confidence intervals in a logistic regression are calculated on the log-odds scale and then exponentiated to get the ...
Read more >
Confidence intervals when p-values are bordeline
In this case, summary() shows the Wald test using normal approximation. The corresponding confidence interval is obtained by confint.default(), which also uses ...
Read more >
17.2 Inference for Logistic Regression
The answer is the P -value for the test of the null hypothesis that the logistic regression slope is zero. If this P...
Read more >
Logistic Regression Odds Ratio Review Confidence Interval ...
The p-value of the test for β = 0 (OR = 1) is .000 which is less than 0.05. So sector variable is...
Read more >
Chapter 18 Logistic Regression - Macmillan Learning
p. 549. CONFIDENCE INTERVALS AND SIGNIFICANCE TESTS FOR. LOGISTIC REGRESSION. An approximate level C confidence interval for the slope 1 in the logistic....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found