-
Notifications
You must be signed in to change notification settings - Fork 7
include lower truncation for lognormal distrubution #57
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
Conversation
Change log-normal onsets to also include lower truncate
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57 +/- ##
==========================================
- Coverage 72.82% 69.93% -2.90%
==========================================
Files 10 10
Lines 357 316 -41
==========================================
- Hits 260 221 -39
+ Misses 97 95 -2 ☔ View full report in Codecov by Sentry. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
hey! great idea!
|
|
Can do the first two. |
This tests both upper and lower truncation in one go. I think it's fine like this but could also be tested separately in addition.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
|
||
| # Example: | ||
| onset_lognormal = LogNormalOnset(; μ = 3, σ = 0.25, offset = 0, truncate_upper = nothing); | ||
| onset_lognormal = LogNormalOnset(; μ = 3, σ = 0.25, offset = 0, truncate_upper = nothing, truncate_lower = nothing); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
| onset_lognormal = LogNormalOnset(; μ = 3, σ = 0.25, offset = 0, truncate_upper = nothing, truncate_lower = nothing); | |
| onset_lognormal = LogNormalOnset(; | |
| μ = 3, | |
| σ = 0.25, | |
| offset = 0, | |
| truncate_upper = nothing, | |
| truncate_lower = nothing, | |
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is for the docs only anyway I would omit
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Everything implemented now. I only mentioned the truncate lower in the docs because I didn't want to prolong the parameter plots even further. If you still want me to do that I can though. |
|
I updated the PR in the following way:
For the last point, I needed to add the |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
Apart from the point above, we can merge, in my opinion. Any objections, @behinger oder @ReneSkukies? |
Could you explain to me when that would be an issue? I think I don't really understand (also it's been a while since I had a look at the truncate stuff) Other than that, I think it's fine. Regarding the |
|
Sure, it's basically what Bene asked above and that you already tested a while ago (#57 (comment)). The way you implemented the lower truncation is after potentially doing an upper truncation (using the Lines 173 to 178 in eadcbfb
And the idea was to make sure that this does not give a different result than doing both truncations at the same time in one call to I talked to Bene about your second point, and this would indeed be possible, but it's also fine to have it as a dependency in the test environment, therefore, I will leave it that way. |

Lower truncation might be useful to simulate specific experiments where there was/ is an exclusion criterion, artificially changing the distribution.
E.g. in our Oddball experiment, we set a lower RT threshold, throwing out every trial below.