-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Negative values obtained for stationary distribution in mc_tools.py #18
Comments
One of their cases is fixed by approaching the problem through eigenvalues and not limiting yourself to a single stationary distribution. Still playing with it, but thought I'd give an update. |
This sounds interesting. It would be nice if we could change the mc_compute_stationary function to return all possible solutions (stationary distributions) --- or a description of the set in the infinite case. I'm sure this can be done. It would be something like: compute the set of eigenvectors that span the eigenspace associated with the unit eigenvalue. Now take the nonnegative ones and normalize them so that they sum to one. Is that what you're thinking of? Such code must exist somewhere. (Having said that I did a quick search and couldn't find anything.) I should add that Tom knows this stuff better than me... |
I now see that this comment should have been under issue 19... |
Follow up on some stuff I was thinking about earlier:
These are just some random thoughts I had while walking to campus. Maybe they'll be useful, but maybe not. Just thought I'd write them down here. |
I wrote some code that can pick eigenvectors that have eigenvalue sufficiently close to one, using
|
mpmath looks cool. I hadn't seen that before.
|
@oyamad Thanks for that code. I incorporated it into the new version of the |
@cc7768 Great, I am happy to see it nicely incorporated! (I am not sure if this is the right place to make a comment, but is the class |
@oyamad Thanks for pointing that out. I had used different names before @spencerlyon2 's suggestion, but made them all fit. It should now match. Let me know if there is anything else out of line. Closing issue. |
The following is a message from Daisuke Oyama at Tokyo University. It shows instances where the output of
mc_tools/mc_compute_stationary.py
produces negative values. (The code also contains a nice sets of tests for that function --- I think we can adopt them.)**
I reproduced instances of outputs of mc_compute_stationary with
negative elements:
https://github.com/oyamad/test_mc_compute_stationary
It may be inevitable given the limited precision in floating point numbers
(especially in executing np.linalg.solve),
but it seems relevant in some contexts such as the Kandori-Mailath-Rob model
with a large number of players and/or a very small probability of mutations.
The text was updated successfully, but these errors were encountered: