jeffgortmaker / pyblp

BLP Demand Estimation with Python
https://pyblp.readthedocs.io
MIT License
228 stars 82 forks source link

compute_demand_jacobians #117

Closed MAXinchen closed 1 year ago

MAXinchen commented 1 year ago

Hi! sorry to disturb you. I was trying to calculate the marginal effect in post-estimation using "compute_demand_jacobians", but I got the following results:

AttributeError: 'ProblemResults' object has no attribute 'compute_demand_jacobians'

Could you please kindly let me know what I did wrong? Thank you!

jeffgortmaker commented 1 year ago

I'm guessing you just need to upgrade the package, since we just added that method in the newest version.

Can you run pyblp.__version__ and see if you get something lower than 0.13.0, which is the current version? If so, you can upgrade with pip install --upgrade pyblp

MAXinchen commented 1 year ago

Thank you for the swift reply! I tried both methods but it was not working initially, later I restarted the computer and relaunched python and the problem is solved now. Guess the upgrade needs "restart" to be incorporated. Thank you very much again!