Skip to content

Change of BIC formula in GLM - #6568

Closed
JoonsukPark wants to merge 4 commits into
statsmodels:masterfrom
JoonsukPark:master
Closed

JoonsukPark wants to merge 4 commits into
statsmodels:masterfrom
JoonsukPark:master

Conversation

@JoonsukPark

@JoonsukPark JoonsukPark commented Mar 5, 2020 •

Copy link
Copy Markdown
Contributor
  • closes #xxxx
  • tests added / passed.
  • code/documentation is well formatted.
  • properly formatted commit message. See
    NumPy's guide.
Details

Although the current implementation of BIC in genmod serves the purpose, the formula itself is somewhat different from the widely used one, -2llf + plog(n) where p is the number of parameters. I thought it would be better to replace the current one with the standard one for consistency across different statistical software packages (e.g., R).

Notes:

  • It is essential that you add a test when making code changes. Tests are not
    needed for doc changes.
  • When adding a new function, test values should usually be verified in another package (e.g., R/SAS/Stata).
  • When fixing a bug, you must add a test that would produce the bug in master and
    then show that it is fixed with the new code.
  • New code additions must be well formatted. Changes should pass flake8. If on Linux or OSX, you can
    verify you changes are well formatted by running
    git diff upstream/master -u -- "*.py" | flake8 --diff --isolated
    
    assuming flake8 is installed. This command is also available on Windows
    using the Windows System for Linux once flake8 is installed in the
    local Linux environment. While passing this test is not required, it is good practice and it help
    improve code quality in statsmodels.
  • Docstring additions must render correctly, including escapes and LaTeX.

@pep8speaks

pep8speaks commented Mar 5, 2020 •

Copy link
Copy Markdown

Hello @JoonsukPark! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-03-06 00:27:23 UTC

@JoonsukPark JoonsukPark changed the title Miscalculation of BIC in GLM Change of BIC formula in GLM Mar 6, 2020
@josef-pkt

Copy link
Copy Markdown
Member

see #1733

@bashtage bashtage mentioned this pull request Jul 28, 2020
15 of 17 tasks
@bashtage bashtage mentioned this pull request Aug 3, 2020
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants