{"action":"created","comment":{"url":"https://api.github.com/repos/hddm-devs/hddm/pulls/comments/47287023","id":47287023,"diff_hunk":"@@ -49,8 +49,45 @@ def generate_wfpt_stochastic_class(wiener_params=None, sampling_method='cdf', cd\n \n     #create likelihood function\n     def wfpt_like(x, v, sv, a, z, sz, t, st, p_outlier=0):\n-        return hddm.wfpt.wiener_like(x['rt'].values, v, sv, a, z, sz, t, st, p_outlier=p_outlier, **wp)\n-\n+        if x['rt'].abs().max() < 998:\n+            return hddm.wfpt.wiener_like(x['rt'].values, v, sv, a, z, sz, t, st,\n+                                         p_outlier=p_outlier, **wp)\n+        else:  # for missing RTs. Currently undocumented.\n+            noresponse = x['rt'].abs() >= 999\n+            ## get sum of log p for trials with RTs as usual ##\n+            LLH_resp = hddm.wfpt.wiener_like(x.loc[-noresponse, 'rt'].values,\n+                                             v, sv, a, z, sz, t, st, p_outlier=p_outlier, **wp)\n+\n+            ## get sum of log p for no-response trials from p(upper_boundary|parameters) ##\n+            # this function assumes following format for the RTs:\n+            # - accuracy coding such that correct responses have a 1 and incorrect responses a 0\n+            # - usage of HDDMStimCoding for z\n+            # - missing RTs are coded as 999/-999\n+            # - note that hddm will flip RTs, such that error trials have negative RTs\n+            # so that the miss-trial in the go condition and comission error\n+            # in the no-go condition will have negative RTs\n+\n+            # get number of no-response trials\n+            n_noresponse = sum(noresponse)\n+\n+            # percentage correct according to probability to get to upper boundary\n+            if v == 0:\n+                p_correct = z\n+            else:\n+                p_correct = (np.exp(-2 * a * z * v) - 1) / (np.exp(-2 * a * v) - 1)","path":"hddm/likelihoods.py","position":31,"original_position":31,"commit_id":"64a86fbca930806e47fbb36c9a156f0f7dfb7c44","original_commit_id":"64a86fbca930806e47fbb36c9a156f0f7dfb7c44","user":{"login":"jona-sassenhagen","id":4321826,"avatar_url":"https://avatars.githubusercontent.com/u/4321826?v=3","gravatar_id":"","url":"https://api.github.com/users/jona-sassenhagen","html_url":"https://github.com/jona-sassenhagen","followers_url":"https://api.github.com/users/jona-sassenhagen/followers","following_url":"https://api.github.com/users/jona-sassenhagen/following{/other_user}","gists_url":"https://api.github.com/users/jona-sassenhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/jona-sassenhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jona-sassenhagen/subscriptions","organizations_url":"https://api.github.com/users/jona-sassenhagen/orgs","repos_url":"https://api.github.com/users/jona-sassenhagen/repos","events_url":"https://api.github.com/users/jona-sassenhagen/events{/privacy}","received_events_url":"https://api.github.com/users/jona-sassenhagen/received_events","type":"User","site_admin":false},"body":"Sorry, I don't know how I'd even do that - I've never used Cython. Where do I import the Cython function from? Is there an example of other Cython code use in the code elsewhere? ","created_at":"2015-12-10T21:17:08Z","updated_at":"2015-12-10T21:17:08Z","html_url":"https://github.com/hddm-devs/hddm/pull/38#discussion_r47287023","pull_request_url":"https://api.github.com/repos/hddm-devs/hddm/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/hddm-devs/hddm/pulls/comments/47287023"},"html":{"href":"https://github.com/hddm-devs/hddm/pull/38#discussion_r47287023"},"pull_request":{"href":"https://api.github.com/repos/hddm-devs/hddm/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/hddm-devs/hddm/pulls/38","id":53286270,"html_url":"https://github.com/hddm-devs/hddm/pull/38","diff_url":"https://github.com/hddm-devs/hddm/pull/38.diff","patch_url":"https://github.com/hddm-devs/hddm/pull/38.patch","issue_url":"https://api.github.com/repos/hddm-devs/hddm/issues/38","number":38,"state":"open","locked":false,"title":"WIP: implement missing-RT capabilities (e.g. nogo, CPT)","user":{"login":"jona-sassenhagen","id":4321826,"avatar_url":"https://avatars.githubusercontent.com/u/4321826?v=3","gravatar_id":"","url":"https://api.github.com/users/jona-sassenhagen","html_url":"https://github.com/jona-sassenhagen","followers_url":"https://api.github.com/users/jona-sassenhagen/followers","following_url":"https://api.github.com/users/jona-sassenhagen/following{/other_user}","gists_url":"https://api.github.com/users/jona-sassenhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/jona-sassenhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jona-sassenhagen/subscriptions","organizations_url":"https://api.github.com/users/jona-sassenhagen/orgs","repos_url":"https://api.github.com/users/jona-sassenhagen/repos","events_url":"https://api.github.com/users/jona-sassenhagen/events{/privacy}","received_events_url":"https://api.github.com/users/jona-sassenhagen/received_events","type":"User","site_admin":false},"body":"@gbiele has presented a proposal for extending HDDM to experiments with many and functionally important missing RTs [here](https://groups.google.com/forum/#!topic/hddm-users/3hlU6RnNcrw). I've tried to force it into HDDM and hopefully slightly simplified the procedure. (I should make clear that the complicated part of code is by @gbiele and my own contribution is minimal.)\r\n\r\nCurrently, missing RTs are those with absolute RT values equal to or exceeding 999.\r\n\r\nIt samples, but I'm not sure it samples correctly, although I didn't change any real functionality compared to the original code and the posterior predictive check looks decent. Would be cool if anybody could take a look at it.","created_at":"2015-12-10T16:59:18Z","updated_at":"2015-12-10T21:17:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46abc7565ad47936b614ab02e826b9326718db87","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hddm-devs/hddm/pulls/38/commits","review_comments_url":"https://api.github.com/repos/hddm-devs/hddm/pulls/38/comments","review_comment_url":"https://api.github.com/repos/hddm-devs/hddm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hddm-devs/hddm/issues/38/comments","statuses_url":"https://api.github.com/repos/hddm-devs/hddm/statuses/64a86fbca930806e47fbb36c9a156f0f7dfb7c44","head":{"label":"jona-sassenhagen:patch-1","ref":"patch-1","sha":"64a86fbca930806e47fbb36c9a156f0f7dfb7c44","user":{"login":"jona-sassenhagen","id":4321826,"avatar_url":"https://avatars.githubusercontent.com/u/4321826?v=3","gravatar_id":"","url":"https://api.github.com/users/jona-sassenhagen","html_url":"https://github.com/jona-sassenhagen","followers_url":"https://api.github.com/users/jona-sassenhagen/followers","following_url":"https://api.github.com/users/jona-sassenhagen/following{/other_user}","gists_url":"https://api.github.com/users/jona-sassenhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/jona-sassenhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jona-sassenhagen/subscriptions","organizations_url":"https://api.github.com/users/jona-sassenhagen/orgs","repos_url":"https://api.github.com/users/jona-sassenhagen/repos","events_url":"https://api.github.com/users/jona-sassenhagen/events{/privacy}","received_events_url":"https://api.github.com/users/jona-sassenhagen/received_events","type":"User","site_admin":false},"repo":{"id":47766568,"name":"hddm","full_name":"jona-sassenhagen/hddm","owner":{"login":"jona-sassenhagen","id":4321826,"avatar_url":"https://avatars.githubusercontent.com/u/4321826?v=3","gravatar_id":"","url":"https://api.github.com/users/jona-sassenhagen","html_url":"https://github.com/jona-sassenhagen","followers_url":"https://api.github.com/users/jona-sassenhagen/followers","following_url":"https://api.github.com/users/jona-sassenhagen/following{/other_user}","gists_url":"https://api.github.com/users/jona-sassenhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/jona-sassenhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jona-sassenhagen/subscriptions","organizations_url":"https://api.github.com/users/jona-sassenhagen/orgs","repos_url":"https://api.github.com/users/jona-sassenhagen/repos","events_url":"https://api.github.com/users/jona-sassenhagen/events{/privacy}","received_events_url":"https://api.github.com/users/jona-sassenhagen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jona-sassenhagen/hddm","description":"HDDM is a python module that implements Hierarchical Bayesian parameter estimation of Drift Diffusion Models (via PyMC).","fork":true,"url":"https://api.github.com/repos/jona-sassenhagen/hddm","forks_url":"https://api.github.com/repos/jona-sassenhagen/hddm/forks","keys_url":"https://api.github.com/repos/jona-sassenhagen/hddm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jona-sassenhagen/hddm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jona-sassenhagen/hddm/teams","hooks_url":"https://api.github.com/repos/jona-sassenhagen/hddm/hooks","issue_events_url":"https://api.github.com/repos/jona-sassenhagen/hddm/issues/events{/number}","events_url":"https://api.github.com/repos/jona-sassenhagen/hddm/events","assignees_url":"https://api.github.com/repos/jona-sassenhagen/hddm/assignees{/user}","branches_url":"https://api.github.com/repos/jona-sassenhagen/hddm/branches{/branch}","tags_url":"https://api.github.com/repos/jona-sassenhagen/hddm/tags","blobs_url":"https://api.github.com/repos/jona-sassenhagen/hddm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jona-sassenhagen/hddm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jona-sassenhagen/hddm/git/refs{/sha}","trees_url":"https://api.github.com/repos/jona-sassenhagen/hddm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jona-sassenhagen/hddm/statuses/{sha}","languages_url":"https://api.github.com/repos/jona-sassenhagen/hddm/languages","stargazers_url":"https://api.github.com/repos/jona-sassenhagen/hddm/stargazers","contributors_url":"https://api.github.com/repos/jona-sassenhagen/hddm/contributors","subscribers_url":"https://api.github.com/repos/jona-sassenhagen/hddm/subscribers","subscription_url":"https://api.github.com/repos/jona-sassenhagen/hddm/subscription","commits_url":"https://api.github.com/repos/jona-sassenhagen/hddm/commits{/sha}","git_commits_url":"https://api.github.com/repos/jona-sassenhagen/hddm/git/commits{/sha}","comments_url":"https://api.github.com/repos/jona-sassenhagen/hddm/comments{/number}","issue_comment_url":"https://api.github.com/repos/jona-sassenhagen/hddm/issues/comments{/number}","contents_url":"https://api.github.com/repos/jona-sassenhagen/hddm/contents/{+path}","compare_url":"https://api.github.com/repos/jona-sassenhagen/hddm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jona-sassenhagen/hddm/merges","archive_url":"https://api.github.com/repos/jona-sassenhagen/hddm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jona-sassenhagen/hddm/downloads","issues_url":"https://api.github.com/repos/jona-sassenhagen/hddm/issues{/number}","pulls_url":"https://api.github.com/repos/jona-sassenhagen/hddm/pulls{/number}","milestones_url":"https://api.github.com/repos/jona-sassenhagen/hddm/milestones{/number}","notifications_url":"https://api.github.com/repos/jona-sassenhagen/hddm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jona-sassenhagen/hddm/labels{/name}","releases_url":"https://api.github.com/repos/jona-sassenhagen/hddm/releases{/id}","created_at":"2015-12-10T14:20:48Z","updated_at":"2015-12-10T14:20:49Z","pushed_at":"2015-12-10T14:36:55Z","git_url":"git://github.com/jona-sassenhagen/hddm.git","ssh_url":"git@github.com:jona-sassenhagen/hddm.git","clone_url":"https://github.com/jona-sassenhagen/hddm.git","svn_url":"https://github.com/jona-sassenhagen/hddm","homepage":"","size":15545,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hddm-devs:master","ref":"master","sha":"14a68ebd6b4f9448d67e9b856872b25c5baf2dde","user":{"login":"hddm-devs","id":920050,"avatar_url":"https://avatars.githubusercontent.com/u/920050?v=3","gravatar_id":"","url":"https://api.github.com/users/hddm-devs","html_url":"https://github.com/hddm-devs","followers_url":"https://api.github.com/users/hddm-devs/followers","following_url":"https://api.github.com/users/hddm-devs/following{/other_user}","gists_url":"https://api.github.com/users/hddm-devs/gists{/gist_id}","starred_url":"https://api.github.com/users/hddm-devs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hddm-devs/subscriptions","organizations_url":"https://api.github.com/users/hddm-devs/orgs","repos_url":"https://api.github.com/users/hddm-devs/repos","events_url":"https://api.github.com/users/hddm-devs/events{/privacy}","received_events_url":"https://api.github.com/users/hddm-devs/received_events","type":"Organization","site_admin":false},"repo":{"id":2059236,"name":"hddm","full_name":"hddm-devs/hddm","owner":{"login":"hddm-devs","id":920050,"avatar_url":"https://avatars.githubusercontent.com/u/920050?v=3","gravatar_id":"","url":"https://api.github.com/users/hddm-devs","html_url":"https://github.com/hddm-devs","followers_url":"https://api.github.com/users/hddm-devs/followers","following_url":"https://api.github.com/users/hddm-devs/following{/other_user}","gists_url":"https://api.github.com/users/hddm-devs/gists{/gist_id}","starred_url":"https://api.github.com/users/hddm-devs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hddm-devs/subscriptions","organizations_url":"https://api.github.com/users/hddm-devs/orgs","repos_url":"https://api.github.com/users/hddm-devs/repos","events_url":"https://api.github.com/users/hddm-devs/events{/privacy}","received_events_url":"https://api.github.com/users/hddm-devs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hddm-devs/hddm","description":"HDDM is a python module that implements Hierarchical Bayesian parameter estimation of Drift Diffusion Models (via PyMC).","fork":false,"url":"https://api.github.com/repos/hddm-devs/hddm","forks_url":"https://api.github.com/repos/hddm-devs/hddm/forks","keys_url":"https://api.github.com/repos/hddm-devs/hddm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hddm-devs/hddm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hddm-devs/hddm/teams","hooks_url":"https://api.github.com/repos/hddm-devs/hddm/hooks","issue_events_url":"https://api.github.com/repos/hddm-devs/hddm/issues/events{/number}","events_url":"https://api.github.com/repos/hddm-devs/hddm/events","assignees_url":"https://api.github.com/repos/hddm-devs/hddm/assignees{/user}","branches_url":"https://api.github.com/repos/hddm-devs/hddm/branches{/branch}","tags_url":"https://api.github.com/repos/hddm-devs/hddm/tags","blobs_url":"https://api.github.com/repos/hddm-devs/hddm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hddm-devs/hddm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hddm-devs/hddm/git/refs{/sha}","trees_url":"https://api.github.com/repos/hddm-devs/hddm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hddm-devs/hddm/statuses/{sha}","languages_url":"https://api.github.com/repos/hddm-devs/hddm/languages","stargazers_url":"https://api.github.com/repos/hddm-devs/hddm/stargazers","contributors_url":"https://api.github.com/repos/hddm-devs/hddm/contributors","subscribers_url":"https://api.github.com/repos/hddm-devs/hddm/subscribers","subscription_url":"https://api.github.com/repos/hddm-devs/hddm/subscription","commits_url":"https://api.github.com/repos/hddm-devs/hddm/commits{/sha}","git_commits_url":"https://api.github.com/repos/hddm-devs/hddm/git/commits{/sha}","comments_url":"https://api.github.com/repos/hddm-devs/hddm/comments{/number}","issue_comment_url":"https://api.github.com/repos/hddm-devs/hddm/issues/comments{/number}","contents_url":"https://api.github.com/repos/hddm-devs/hddm/contents/{+path}","compare_url":"https://api.github.com/repos/hddm-devs/hddm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hddm-devs/hddm/merges","archive_url":"https://api.github.com/repos/hddm-devs/hddm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hddm-devs/hddm/downloads","issues_url":"https://api.github.com/repos/hddm-devs/hddm/issues{/number}","pulls_url":"https://api.github.com/repos/hddm-devs/hddm/pulls{/number}","milestones_url":"https://api.github.com/repos/hddm-devs/hddm/milestones{/number}","notifications_url":"https://api.github.com/repos/hddm-devs/hddm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hddm-devs/hddm/labels{/name}","releases_url":"https://api.github.com/repos/hddm-devs/hddm/releases{/id}","created_at":"2011-07-16T19:50:39Z","updated_at":"2015-12-10T09:29:46Z","pushed_at":"2015-12-10T16:59:19Z","git_url":"git://github.com/hddm-devs/hddm.git","ssh_url":"git@github.com:hddm-devs/hddm.git","clone_url":"https://github.com/hddm-devs/hddm.git","svn_url":"https://github.com/hddm-devs/hddm","homepage":"","size":15543,"stargazers_count":55,"watchers_count":55,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":5,"forks":13,"open_issues":5,"watchers":55,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hddm-devs/hddm/pulls/38"},"html":{"href":"https://github.com/hddm-devs/hddm/pull/38"},"issue":{"href":"https://api.github.com/repos/hddm-devs/hddm/issues/38"},"comments":{"href":"https://api.github.com/repos/hddm-devs/hddm/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/hddm-devs/hddm/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/hddm-devs/hddm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hddm-devs/hddm/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/hddm-devs/hddm/statuses/64a86fbca930806e47fbb36c9a156f0f7dfb7c44"}}}}