stan-dev / stan-dev/stan

interval CDF differences for interval censoring/truncation

Open
#1,154 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature new function
Dominant language
C++
Stars
2.8k
Forks
388
Avg merge
2d 17h
Merged PRs (30d)
15

Description

It'd be useful for both efficiency and ease of notation if we had a function defined by:

foo_cdf_diff_log(U,L,theta) 

  =def=  log(foo_cdf(U,theta) - foo_cdf(L,theta)) 

  =  log_diff_exp(foo_cdf_log(U,theta), foo_cdf_log(L,theta))

The negation of this is what gets added when T[L,U] is added to probability function foo.

Then we'd use those for censoring and truncation instead of the expression the right, which we're using now. It should be done with a log-sum-exp type operation. Even a utility implementation that just used Stan's existing log_diff_exp function would be useful.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing censoring and truncation probability-function code and the uses of Stan's log_diff_exp utility. Compare those expressions with the proposed foo_cdf_diff_log(U,L,theta) behavior, then verify that interval censoring and truncation use the stable log-difference operation consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.