Help merging the stancode_opt branch#98
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
My hunch is that because in the model block rather than: I did the latter because that's what was implemented in f799c8f. @ErikRingen could you confirm this? |
|
I've given this a go in 99f0b92. There were two places in the code where I changed the indexing for @ErikRingen please let me know if you agree with these changes - I don't want to perpetuate indexing issues in the code! |
…t indices appropriately, and that the tip_id is used correctly for observations in various model scenarios
Ah yes this makes sense--my original indexing pattern was incorrect. Disturbed that this wasn't caught by the test suite so I add new tests in 93fb665 to ensure that tip vs internal indexing is being used in the right parts of the Stan program. Hopefully this will prevent regressions in the future. |
|
Thanks @ErikRingen for checking that and for the new tests! I've updated the test fixtures and will merge this into the main branch now. |
This morning, I tried editing the
stancode_optbranch to allow for measurement error. You can see the change that I made in 62a881e. However, I think that I haven't quite done the right thing (see below), so I'm opening this up for discussion.There are a number of outstanding issues that need to be resolved before we can merge this branch.
1. Measurement error model does not run
When I run the measurement error model, I get the following error:
The error points to the following line of the Stan code, which is the line I edited in 62a881e:
My reasoning for this change was that when we have measurement error, we want to do the Cholesky decomposition in the model block after adding the standard errors to the diagonal of
VCV_tips. But my guess is that I've done the indexing wrong here?2. Indexing in generated quantities block
Relatedly, I also have a question about the indexing of
VCV_tipsin the generated quantities block of this model. In the model block, we have the following Stan code:But does
VCV_tips[t, i]make sense here, sinceirefers to tips rather than tree segments?Apologies @ErikRingen if these are silly questions - I think I'm just not quite following the indexing that was added by the caching.