Skip to content

Implement {posterior} - #17

Merged
benjaminhlina merged 39 commits into
mainfrom
implement-posterior
Jun 25, 2026
Merged

benjaminhlina merged 39 commits into
mainfrom
implement-posterior

Conversation

@benjaminhlina

@benjaminhlina benjaminhlina commented Jun 23, 2026 •

Copy link
Copy Markdown
Collaborator
  • I have added posterior::as_draws_df() instead of as.data.frame() to get posterior draws.
  • I have added extract_*() functions (internal) which take a draws_df object and pull information whether that is summarized draws, draws for latent sx and sy variables, draws for detection probability p0 or p0[1, 1] ect., and draws for parameters of the detection probability model e.g., alpha0 and alpha1.
  • I have wanted to make the object all_estimates -> all_draws but feel like this would change the original vignette.
  • I have added tests to capture extract_*() functions

@benjaminhlina benjaminhlina self-assigned this Jun 23, 2026
@benjaminhlina
benjaminhlina marked this pull request as ready for review June 24, 2026 00:47
@benjaminhlina
benjaminhlina requested a review from mhpob June 24, 2026 00:48
@benjaminhlina

benjaminhlina commented Jun 24, 2026 •

Copy link
Copy Markdown
Collaborator Author
  • There are minor changes such as the vignette name wasn't proper for pkgdown nor the correct file type .md instead of .Rmd or an object was being printed in the test that need to be removed.

  • Feel free to suggest different extract_*() or summary_*() names or objects.

  • The added p0est has been replaced with extract_d_probs(). The switch to posterior was a good decision as everything is way more streamlined and easier to work with.

  • Will focus my attention next to delta_temp models/covariate models and the now defunct tag-int-patch

…mate does not make sense - this will likely cause errors down the line in test
…w different OS run Stan even with seed set to 4 these do not produce consistent resutls. Alternatively they could be kept and the tolerance turned down a lot but then that feels like that defeats the purpose of the tests

@mhpob mhpob left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff; posterior cleans things up and is a worthy dependency. You probably saw it coming, but I have comments on the nudge to UTM...

Comment thread R/utils.R Outdated
Comment thread R/utils.R Outdated
Comment thread vignettes/precompile.R
Comment thread DESCRIPTION
@benjaminhlina
benjaminhlina requested a review from mhpob June 25, 2026 20:16

@mhpob mhpob left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I think the version jumped an extra point though.

Comment thread DESCRIPTION Outdated
@benjaminhlina
benjaminhlina merged commit e596bc9 into main Jun 25, 2026
6 checks passed
@benjaminhlina
benjaminhlina deleted the implement-posterior branch June 25, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants