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

309 fixed power prior #315

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

309 fixed power prior #315

wants to merge 8 commits into from

Conversation

gravesti
Copy link
Collaborator

@gravesti gravesti commented Feb 7, 2025

No description provided.

@gravesti gravesti requested a review from mattsecrest February 7, 2025 14:02
@gravesti gravesti linked an issue Feb 7, 2025 that may be closed by this pull request
@mattsecrest
Copy link
Collaborator

@gravesti looks good. Was a bit surprised to see a vector of weights, as the fixed power prior is typically one weight for all the external data, right? (And I see that the test cases are doing this already). I guess there is no downside to doing it this way because it is more flexible and we can use it for eg IPTW weights.

Seeing now that the stan templates is annoying, but still I bet this is the best approach.

#' ext_flag_col = "ext",
#' power_col = "power"
#' )
borrowing_fixed_power_prior <- function(ext_flag_col, power_col) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@gravesti What about some checking that power_col is [0,1] here as well? I see in STAN but maybe the error would be cryptic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't have the data here. I will add it in prepare_stan_data_inputs

@gravesti
Copy link
Collaborator Author

gravesti commented Feb 26, 2025

Was a bit surprised to see a vector of weights, as the fixed power prior is typically one weight for all the external data, right? (And I see that the test cases are doing this already). I guess there is no downside to doing it this way because it is more flexible and we can use it for eg IPTW weights.

Yeah, we could go for specifying a number directly: borrowing_fixed_power_prior("ext", power = 0.7)
and then set that for the external subjects and the rest to 1.

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.

power prior
2 participants