Skip to content

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.

@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.

@gravesti
Copy link
Collaborator Author

@mattsecrest I've changed to a single power_par value specified directly. Let me know what you think.

@gravesti gravesti requested a review from mattsecrest March 14, 2025 11:04
@mattsecrest
Copy link
Collaborator

mattsecrest commented May 6, 2025

@gravesti looks good! I like the templates in inst/stan more and more. There's one line that might be too clever?

power <- 1 - (1 - borrowing@power_par) * data_matrix[, borrowing@ext_flag_col]

Maybe this?

power <- rep(1, nrow(data_matrix))
power[data_matrix[, borrowing@ext_flag_col] == 1] <- borrowing@power_par

Before we submit:

  • update vignettes
  • CI/CD pass

@mattsecrest
Copy link
Collaborator

Addresses #309

@mattsecrest mattsecrest merged commit aaf66fb into main May 7, 2025
5 checks passed
@mattsecrest mattsecrest deleted the 309-power-prior branch May 7, 2025 14:47
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

3 participants