Type: Package
Package: psborrow2
Title: Bayesian Dynamic Borrowing Analysis and Simulation
Version: 0.0.5.1
Authors@R: c(
   person(
      given = "Matt",
      family = "Secrest",
      role = c("aut", "cre"),
      comment = c(ORCID = "0000-0002-0939-4902"),
      email = "secrestm@gene.com"
      ),
   person(
      given = "Isaac",
      family = "Gravestock",
      role = c("aut"),
      email = "isaac.gravestock@roche.com"
      ),
   person(
      given = "Craig",
      family = "Gower-Page",
      role = c("ctb"),
      email = "craig.gower-page@roche.com"
      ),
   person(
      given = "Manoj",
      family = "Khanal",
      role = c("ctb"),
      email = "khanal_manoj@lilly.com"
   ),
   person(
      given = "Mingyang",
      family = "Shan",
      role = c("ctb"),
      email = "mingyang.shan@lilly.com"
   ),
   person(
      given = "Kexin",
      family = "Jin",
      role = c("ctb"),
      email = "kexin.jin@bms.com"
   ),
   person(
      given = "Zhi",
      family = "Yang",
      role = c("ctb"),
      email = "zhi.yang@bms.com"
   ),
   person("Genentech, Inc.", role = c("cph", "fnd"))
   )
Description: Bayesian dynamic borrowing is an approach to incorporating external
   data to supplement a randomized, controlled trial analysis in which
   external data are incorporated in a dynamic way (e.g., based on similarity
   of outcomes); see Viele 2013 <doi:10.1002/pst.1589> for an overview.
   This package implements the hierarchical commensurate prior approach to dynamic borrowing
   as described in Hobbes 2011 <doi:10.1111/j.1541-0420.2011.01564.x>.
   There are three main functionalities. First, 'psborrow2' provides a user-friendly
   interface for applying dynamic borrowing on the study results handles the Markov Chain
   Monte Carlo sampling on behalf of the user. Second, 'psborrow2' provides a
   simulation framework to compare different borrowing parameters (e.g. full borrowing, no
   borrowing, dynamic borrowing) and other trial and borrowing characteristics
   (e.g. sample size, covariates) in a unified way. Third, 'psborrow2' provides
   a set of functions to generate data for simulation studies, and also allows
   the user to specify their own data generation process. This package is designed to
   use the sampling functions from 'cmdstanr' which can be installed from
   <https://stan-dev.r-universe.dev>.
URL: https://github.com/Genentech/psborrow2,
        https://genentech.github.io/psborrow2/index.html
BugReports: https://github.com/Genentech/psborrow2/issues
License: Apache License 2.0
Encoding: UTF-8
Depends: R (>= 4.1.0)
RoxygenNote: 7.3.3
Config/testthat/edition: 3
Imports: checkmate, glue, methods, graphics, posterior, generics,
        Matrix, mvtnorm, future, simsurv
Suggests: cmdstanr, survival, flexsurv, eha, testthat (>= 3.0), usethis
        (>= 2.1.5), vdiffr, tibble, xml2, knitr, rmarkdown, bayesplot,
        matrixcalc, WeightIt, MatchIt, BayesPPD, ggsurvfit, gbm,
        ggplot2, cobalt, table1, gt, gtsummary
Additional_repositories: https://stan-dev.r-universe.dev
Language: en-US
SystemRequirements: cmdstan
Collate: 'generics.R' 'prior_class.R' 'covariate_class.R'
        'add_covariates.R' 'prior_normal.R' 'treatment_class.R'
        'borrowing_class.R' 'outcome_class.R' 'analysis_class.R'
        'borrowing_details.R' 'borrowing_fixed_power_prior.R'
        'borrowing_full.R' 'borrowing_hierarchical_commensurate.R'
        'borrowing_none.R' 'cast_mat_to_long_pem.R'
        'check_data_matrix_has_columns.R' 'cmdstan.R'
        'create_analysis_obj.R' 'create_data_matrix.R'
        'treatment_details.R' 'sim_treatment_list.R' 'helpers.R'
        'outcome_bin_logistic.R' 'prior_exponential.R'
        'outcome_surv_weibull_ph.R' 'outcome_surv_exponential.R'
        'sim_outcome_list.R' 'sim_borrowing_list.R'
        'sim_covariate_list.R' 'sim_data_list.R' 'simulation_class.R'
        'create_simulation_obj.R' 'data.R'
        'get_prior_string_covariates.R' 'prior_half_cauchy.R'
        'outcome_cont_normal.R' 'outcome_surv_pem.R'
        'load_and_interpolate_stan_model.R' 'load_stan_file.R'
        'make_analysis_object_list.R' 'mcmc_sample.R'
        'mcmc_simulation_result.R' 'package.R'
        'prepare_stan_data_inputs.R' 'prior_bernoulli.R' 'prior_beta.R'
        'prior_cauchy.R' 'prior_gamma.R' 'prior_half_normal.R'
        'prior_poisson.R' 'sim_covariates.R' 'sim_estimate_bias.R'
        'sim_estimate_effect_variance.R' 'sim_estimate_mse.R'
        'sim_is_null_effect_covered.R' 'sim_is_true_effect_covered.R'
        'sim_samplesize.R' 'simulate_data_baseline.R' 'simulate_data.R'
        'simvar_class.R' 'trim_data_matrix.R' 'uniform_prior.R' 'zzz.R'
LazyData: true
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2026-05-13 14:19:35 UTC; matts
Author: Matt Secrest [aut, cre] (ORCID:
    <https://orcid.org/0000-0002-0939-4902>),
  Isaac Gravestock [aut],
  Craig Gower-Page [ctb],
  Manoj Khanal [ctb],
  Mingyang Shan [ctb],
  Kexin Jin [ctb],
  Zhi Yang [ctb],
  Genentech, Inc. [cph, fnd]
Maintainer: Matt Secrest <secrestm@gene.com>
Repository: CRAN
Date/Publication: 2026-05-14 14:10:01 UTC
Built: R 4.5.3; ; 2026-05-26 13:49:48 UTC; windows
