Skip to content
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

Linear interpolation error in SolvingMicroDSOP #11

Open
npalmer-professional opened this issue Jul 13, 2019 · 6 comments
Open

Linear interpolation error in SolvingMicroDSOP #11

npalmer-professional opened this issue Jul 13, 2019 · 6 comments
Assignees

Comments

@npalmer-professional
Copy link
Contributor

npalmer-professional commented Jul 13, 2019

I've run across an error in the linear interpolator when I'm running the SolvingMicroDSOP replication.

I've uploaded a branch here that has a "clean demonstration" of the error: https://github.com/npalmer-professional/REMARK/

... and specifically see this "slice across the objective surface:" https://github.com/npalmer-professional/REMARK/blob/interpolation_error_example/REMARKs/SolvingMicroDSOPs/Figures/SMMslice_cubicbool-false.pdf

You an create this image by running the function "make_contour_slice()" in /REMARK/REMARKs/SolvingMicroDSOPs/Code/StructEstimation.py
(the default parameters will create the figure).

Experimenting on the command line I found that if I pull the parameters at one of those spikes and look at the consumption function using that parameter set, you see how a couple of the consumption functions got a little crazy. (Not included here because haven't cleaned up that code for demonstration).

Funny enough I remember something like this 2 or 3 years ago, I ran across this same error but reversed -- the cubic spline gave the error, while the linear spline didn't. Now it appears to be reversed; If I run the same "slice" for the cubic spline I don't get the problem (but I haven't explored cubic spline over the whole space to see if there are errors elsewhere). @mnwhite I think you worked on that back then and fixed the cubic spline issue, and both cubic and linear were working back then. I think this was all way before the 2.7 -> 3.x conversion for what that is worth in terms of very rough timeline.

Edit: Also potentially important, this only shows up when you allow agents to borrow.

@llorracc
Copy link
Collaborator

@npalmer-professional, is there any chance you could figure out and solve this one yourself? @mnwhite has a lot of other things on his plate (or on his floor or crib) right now ...

@mnwhite
Copy link
Collaborator

mnwhite commented Jul 19, 2019 via email

@llorracc
Copy link
Collaborator

@npalmer-professional @mnwhite, could you move this thread over to HARK, because that is where the "master" SolvingMicroDSOPs code lives now until the fine day when we have resolved all of the issues of moving the masters over to elsewhere

@npalmer-professional
Copy link
Contributor Author

npalmer-professional commented Jul 24, 2019 via email

@npalmer-professional
Copy link
Contributor Author

Moved to main HARK; closing here.

@sbenthall
Copy link
Contributor

See #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants