Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

McCall exercise solution index #879

Open
wkeahi opened this issue Feb 14, 2021 · 3 comments · May be fixed by #880
Open

McCall exercise solution index #879

wkeahi opened this issue Feb 14, 2021 · 3 comments · May be fixed by #880
Labels
bug Something isn't working

Comments

@wkeahi
Copy link

wkeahi commented Feb 14, 2021

Hello,

For the exercise solution for Job Search I: The McCall Search Model (mccall_model.ipynb), I'm wondering if the index is off when generating the random wage causing the estimated means to be off. The code segment is below

# Generate a wage draw
        w_val = w[rand(dist)]

Since support(dist) is in 0,...,50 shouldn't it be w_val = w[rand(dist)+1] so that it matches the indices of w which go from 1,...,51?

@Nosferican Nosferican added the bug Something isn't working label Feb 14, 2021
@Nosferican
Copy link
Collaborator

Nosferican commented Feb 14, 2021

From having taken a look at the notebook I believe that is correct. Thanks for reporting it!
I saw that you had made a fork of the repository. The fix should be as you described (i.e., w_val = w[rand(dist)+1]). Would you like to open a PR with the fix?

The change should be in this file.

@wkeahi wkeahi linked a pull request Feb 14, 2021 that will close this issue
@wkeahi
Copy link
Author

wkeahi commented Feb 14, 2021

Thanks! Opened a PR. First one, hope I did it correctly.

@Nosferican Nosferican linked a pull request Feb 14, 2021 that will close this issue
@jlperla
Copy link
Member

jlperla commented Feb 14, 2021

@wkeahi thanks so much! I am waiting for Julia 1.6 to be released, them am planning on updating support and merging a bunch of these sorts of changes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants