Skip to content
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

Transition to get_prior, make_stancode and make_standata #140

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

venpopov
Copy link
Owner

Summary

Since Paul agreed to make get_prior, make_stancode and make_standata into generic S3 methods, we can now replace get_model_prior, get_stancode and get_standata with:

  • get_prior.bmmformula
  • make_stancode.bmmformula
  • make_standata.bmmformula

That way users of bmm can use the same functions get_prior, make_stancode and make_standata with bmm models just like they would do with brms.

This requires an installed version of brms > 2.20.14, so I have put in checks in the code to ensure that everything works with older versions as well.

Once the next release of brms is available on CRAN, we can make it a hard dependency and get rid of the old syntax completely.

Tests

  • Confirm that all tests passed
  • Confirm that devtools::check() produces no errors
  • add new tests for the new methods, which are performed only if the installed version of brms is > 2.20.14

Release notes

@venpopov venpopov linked an issue Feb 29, 2024 that may be closed by this pull request
Copy link
Collaborator

@GidonFrischkorn GidonFrischkorn left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this. Looks great and nice that we can keep the original functions as deprecated for now.

@venpopov venpopov merged commit dbf23e1 into develop Feb 29, 2024
3 checks passed
@venpopov venpopov deleted the feature/issue-132-renaming-get_model_prior branch February 29, 2024 19:09
@venpopov venpopov restored the feature/issue-132-renaming-get_model_prior branch March 2, 2024 16:42
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.

Renaming get_model_prior to get_prior()?
2 participants