I need to estimate a path-size logit model for transit route choice. In doing so I need to calculate the path-size factor between the alternatives of choice sets. I'm just wondering if there's any R/Python package by which I can calculate this PS factor before estimating the logit model?
The equation and example of path-size factor are shown in this link:
https://stats.stackexchange.com/questions/159200/how-do-we-calculate-the-path-size-ps-for-path-size-logit-model