pylogit icon indicating copy to clipboard operation
pylogit copied to clipboard

Equivalent of Biogeme Correlation of Coefficients Table?

Open b-tomhave opened this issue 6 years ago • 3 comments

First, thank you for your excellent work on PyLogit, it is immensely useful! This may already exist but is there a way in which to produce an equivalent of the Biogeme correlation of coefficients table? I am aware that the covariance matrix can be obtained in Pylogit by negating the hessian and then inverting, but is there a way in which to include the t-statistics and p-values?

Thanks!

b-tomhave avatar Jun 24 '19 16:06 b-tomhave

@BenjaminT17 : no worries, thanks for using the package!

As for the request, it can probably be added. Do you have any references or pointers to Biogeme code (hopefully in something more readable than C...) where the t-stats and p-values are calculated for the correlation of coefficients table? I'm looking for a formula or derivations I can rely on instead of having to re-derive the distributions.

timothyb0912 avatar Jun 24 '19 20:06 timothyb0912

Thanks for the rapid response! I don't have direct references to the Biogeme code, however, the equations for the t-statistics etc. are listed on page 13 of the attached Biogeme documentation. For example, equation 9 on page 13 yields the t-stat values given by Biogeme. Does that help?

http://transp-or.epfl.ch/pythonbiogeme/documentation/pythonfirstmodel/pythonfirstmodel.pdf

b-tomhave avatar Jun 24 '19 20:06 b-tomhave

Yep, that's perfect. It should be relatively easy to produce the same table of results.

I have some other dev tasks that have been taking way too much time so I may not get to this quickly (i.e. possibly not in July).

If you want to open a PR that builds the desired table, I'd be happy to review, provide pointers, answer questions, etc.

timothyb0912 avatar Jun 25 '19 22:06 timothyb0912