-
Notifications
You must be signed in to change notification settings - Fork 6
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
Issue #221: Add marginal model #426
Conversation
6e4c0e1
to
6ccab62
Compare
a415d16
to
aa24b86
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
bd6c7be
to
1ab0450
Compare
3b6630a
to
0d71938
Compare
This comment was marked as outdated.
This comment was marked as outdated.
229527b
to
4dff643
Compare
…many primarycensored functions..
@athowes there are a few bows to tie here and I am investigating the CI issues on mac and windows (it looks likes its also on Updates in bullets:
|
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.
LGTM (self-review)
Co-authored-by: Adam Howes <[email protected]>
Co-authored-by: Adam Howes <[email protected]>
Co-authored-by: Adam Howes <[email protected]>
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.
Following comments from @athowes a follow review from me. LGTM so merging
* Add cohort model template * Fix to previous commit (name as cohort_model) * Generate simulated cohort data * Add unweighted and weighted direct models * Thinking about custom family for pcd function * functions component of stanvars * Add transformed parameters for cohort model * Progress on implementing PCD model * Set q as vector * Get rid of params input * This would work, apart from it's the CDF. For the PMF need to import many primarycensored functions.. * Almost working with "import all functions" strategy * Wrap up on attempt * Rename to marginal model * Move towards single wrap function with others imported * Just running into some C++ errors.. * This doesn't change anything * Move to marginal model name and lint * Create aggregate data inside model conversion function for now * First draft on moving marginal_model into functions * Run document * Tests working up to valid Stan code * Regex version of marginal model * Use prep_marginal_obs * Improve assert for marginal model * Add pkgdown and document * Clean up scratch implementation * remove scratch file * update data format, formula, and family * update stan code * basic working version * add transformm data methods * start exploring the ebola example * add a helper to find meaningful relative_obs_times * get the full ebola vignette working with new variable requirements * improve return messages * update approx vignette * get ebole vignette passing by checking pp and related inputs * add marginal model integration tests * expand post processing tests * add marginal model * use the right transform data keyword * add ... pass through to make constructors correct * fix .summarise_n_by_formula test so error message is as expected * drop not required .row_id * check using ... properly * make the progress messages prettier for reducing data complexit: * check post process tests again * add a test for the specific transform data method * add some tests for the generic transform data method * put transform data tests in the correct folder * add a news update * change vignette language to talk about marginal model * update the FAQ to use the marginal variables * call it transformed_data not trans_data * change the error message to make it clear its a epidist limitation * update stan docs * Update NEWS.md * Update NEWS.md Co-authored-by: Adam Howes <[email protected]> * Update NEWS.md Co-authored-by: Adam Howes <[email protected]> * Update inst/stan/latent_model/functions.stan Co-authored-by: Adam Howes <[email protected]> * Update setup.R --------- Co-authored-by: Sam <[email protected]> Former-commit-id: 0c41c481bcd9767252b562e8fa704e6b43995070 [formerly 267310c44261cc0e4cae488103b7f2028b4f0153] Former-commit-id: 277996547d66fd5d6260710b620f67f7ed3475d6
Description
This PR implements the marginal model as in #221.
marginal_model-scratch.R
implements a prototype outside of functionsprimarycensored
functionprimarycensored_lpmf
which is passed into via a wrapper inmarginal_model/functions.stan
marginal_model
Possible steps forward here:
Checklist