Skip to content

Print more information in show #623

Description

@nalimilan

I suggest we give more information when printing models than just the formula and coefficient table. Changing the result of show may not be considered as breaking, but 2.0 would be a good time to do this. I would suggest printing at least these indicators which are present in R, Stata and SAS:

  • number of observations (super important in particular to check that you didn't lose too many observations due to missing values)
  • R² and adjusted R² (for linear models -- it's more controversial to choose a pseudo-R² for GLMs)
  • log-likelihood (for GLMs)
  • F-test or LR test
  • dispersion parameters for distributions that have one

Other possible indicators to include:

  • AIC and AICc
  • null log-likelihood

Econometrics.jl seems like a good inspiration:

Continuous Response Model
Number of observations: 223174
Null Loglikelihood: -6746726.41
Loglikelihood: -345253.18
R-squared: 0.0466
Wald: 860.46F(3, 223158)  Pr > F = 0.0000
Formula: log(Earnings) ~ 1 + Educatn + Age + (Age ^ 2) + absorb(Kids)
Variance Covariance Estimator: OIM
──────────────────────────────────────────────────────────────────────────────────────
                    PE           SE      t-value  Pr > |t|         2.50%        97.50%
──────────────────────────────────────────────────────────────────────────────────────
(Intercept)   8.23837      0.13135      62.721      <1e-99   7.98093       8.49581
Educatn       0.000538588  0.000138739   3.88203    0.0001   0.000266663   0.000810512
Age           0.0389003    0.0068679     5.66408    <1e-07   0.0254394     0.0523613
Age ^ 2      -0.000191192  8.86411e-5   -2.15692    0.0310  -0.000364926  -1.74575e-5
──────────────────────────────────────────────────────────────────────────────────────

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions