Skip to content

Possible error in LBA_n1CDF #4

@fredcallaway

Description

@fredcallaway

Hi Stephen (or current maintainer). Thanks for making this code publicly available!

I think there might be a mistake here:

cdf = quad(@(t)LBA_n1PDF(t,A,A+b,v,sv),1,100000);

Actually maybe two mistakes. First, the integral should begin at 0 not 1 (I assume you have used ms in which case this wouldn't matter, but since others might use seconds, it's probably worth fixing unless there's some additional factor I am missing). Second, the PDF should be called with just A as an argument, not A+b. So I think the line should read:

cdf = quad(@(t)LBA_n1PDF(t,A,A,v,sv),0,100000);

I can't confirm this in matlab (I'm implementing it in Julia and don't have access to matlab) but I found that the current code gives slightly incorrect results when you compare LBA_n1CDF to the empirical choice frequency from simulations from LBA_trial. With the changes I suggested, the discrepancy vanishes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions