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

fix: NaN bug #10

Open
wasita opened this issue Jan 30, 2023 · 2 comments
Open

fix: NaN bug #10

wasita opened this issue Jan 30, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@wasita
Copy link
Contributor

wasita commented Jan 30, 2023

discovered 1/29/23

maybe comes from situations where someone gives an amount between 0 and 1 and it then gets rendered incorrectly as a nan? will investigate

@wasita wasita added the bug Something isn't working label Jan 30, 2023
@ejolly
Copy link
Contributor

ejolly commented Jan 30, 2023

Oooh yea Dhaval mentioned thats when he noticed it. Basically if the total endowment amount was too small, then they don't need to move the slider very much and he found it hard to actually choose a value of $1 instead of $0. So I think there's two issues we need to fix:

  1. Making sure we handle cases where people actually choose a value of 0, i.e. making sure the rest of the math/conversion works out and doesn't give NaNs cause Javascript...
  2. Making an adjustment to the scale such that regardless of the range of values they're choosing between, the distance they have to move the scale is similar. That'll make it non-problematic for trials where the endowment amount is small like Dhaval's issue. It also handles issues for adapting this for fMRI studies where we don't want spurious motor activity that's systematically correlated with choice behavior (i.e. higher/lower value choice -> more/less movement). We may need to turn this into a prop and play with it a bit to think through the best way to normalize tho.

@wasita
Copy link
Contributor Author

wasita commented Jan 30, 2023

hehe yeah that all makes sense and i totally agree!

@wasita wasita changed the title fix: NAN bug fix: NaN bug Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants