1414# ' and `"exnex_adj"`, Default: `0.5`
1515# ' @return A list with prior parameters of class `prior_parameters_list`
1616# ' @details
17- # ' Regarding the default prior parameters for `"berry"`, `"exnex"`, and `"exnex_adj"`:
17+ # ' Regarding the default prior parameters for `"berry"`, `"exnex"`, `"exnex_mix"`, `"exnex_adj"` and `"exnex_adj_mix "`:
1818# ' \itemize{
1919# ' \item `"berry"`: The mean of \eqn{\mu} is set to `0`.
2020# ' Its variance is calculated as proposed in "Robust exchangeability designs for early
2929# ' phase clinical trials with multiple strata" (Neuenschwander et al. (2016))
3030# ' with regard to `n_worth`.
3131# ' The scale parameter of \eqn{\tau} is set to `tau_scale`.
32+ # '
3233# ' For the Nex components:
3334# ' The means of \eqn{\mu_j} are set to the respective target rates.
3435# ' The variances of \eqn{\tau_j} are calculated as proposed in "Robust exchangeability designs for early
4243# ' phase clinical trials with multiple strata" (Neuenschwander et al. (2016))
4344# ' with regard to `n_worth`, see also \code{\link[bhmbasket]{getMuVar}}.
4445# ' The scale parameter of \eqn{\tau} is set to `tau_scale`.
46+ # '
4547# ' For the Nex components:
4648# ' The means of \eqn{\mu_j} are set to the `0`.
4749# ' The variances of \eqn{\tau_j} are calculated as proposed in "Robust exchangeability designs for early
4850# ' phase clinical trials with multiple strata" (Neuenschwander et al. (2016))
4951# ' with regard to `n_worth`, see also \code{\link[bhmbasket]{getMuVar}}.
5052# ' \item `"exnex_mix"`: Uses the same default Ex prior construction as `"exnex"`.
51- # ' The NEX part is specified as a one-component mixture prior with
53+ # ' The Nex part default parameters are specified as a one-component mixture prior with
5254# ' `w_nex = 1`, `mean_nex = matrix(logit(target_rates), nrow = 1)`,
5355# ' and `sd_nex = matrix(sqrt(getMuVar(target_rates, 0, n_worth)), nrow = 1)`.
54- # ' This keeps the default mixture representation compatible with the mix-model interface .
56+ # ' This keeps the default mixture representation compatible with the `getPriorParameter()`'s input .
5557# ' \item `"exnex_adj_mix"`: Uses the same default Ex prior construction as `"exnex_adj"`.
56- # ' The NEX part is specified as a one-component mixture prior with
58+ # ' The Nex part is specified as a one-component mixture prior with
5759# ' `w_nex = 1`, `mean_nex = matrix(logit(target_rates), nrow = 1)`,
5860# ' and `sd_nex = matrix(sqrt(getMuVar(target_rates, 0, n_worth)), nrow = 1)`.
5961# ' The Ex component is centered as in `"exnex_adj"`.
6466# ' The scale parameters \eqn{\alpha_j} are set to `target_rates * n_worth`.
6567# ' The scale parameters \eqn{\beta_j} are set to `(1 - target_rates) * n_worth`.
6668# ' \item `"stratified_mix"`:
67- # ' A two-component beta mixture prior is created for each cohort.
68- # ' The first component uses
69- # ' `a_j = target_rates * n_worth` and ` b_j = (1 - target_rates) * n_worth`.
69+ # ' A two-component beta mixture prior is created by default for each cohort.
70+ # ' The first component uses `a_j = target_rates * n_worth` and
71+ # ' `b_j = (1 - target_rates) * n_worth`.
7072# ' The second component is a vague prior with `a_j = 1` and `b_j = 1`.
7173# ' The default mixture weights are `c(0.8, 0.2)`.
7274# ' }
@@ -565,34 +567,34 @@ getPriorParametersExNex <- function (
565567# ' @description This function sets prior parameters for the analysis method `"exnex"`
566568# ' for use in \code{\link[bhmbasket]{performAnalyses}}.
567569# '
568- # ' It supports two specifications for the NEX part:
570+ # ' It supports two specifications for the Nex part:
569571# ' \itemize{
570- # ' \item the standard ExNex specification with cohort-specific NEX priors via `mu_j` and `tau_j`
571- # ' \item an extended specification with a mixture prior on the NEX part via `w_nex`, `mean_nex`, and `sd_nex`
572+ # ' \item the standard ExNex specification with cohort-specific Nex priors via `mu_j` and `tau_j`
573+ # ' \item an extended specification with a mixture prior on the Nex part via `w_nex`, `mean_nex`, and `sd_nex`
572574# ' }
573575# '
574576# ' @param mu_mean A numeric for the mean of \eqn{\mu}
575577# ' @param mu_sd A positive numeric for the standard deviation of \eqn{\mu}
576578# ' @param tau_scale A positive numeric for the scale parameter of \eqn{\tau}
577- # ' @param mu_j A vector of numerics for the means \eqn{\mu_j} of the standard NEX priors.
579+ # ' @param mu_j A vector of numerics for the means \eqn{\mu_j} of the standard Nex priors.
578580# ' Ignored if `w_nex`, `mean_nex`, and `sd_nex` are provided.
579581# ' @param tau_j A vector of positive numerics for the standard deviations \eqn{\tau_j}
580- # ' of the standard NEX priors. Ignored if `w_nex`, `mean_nex`, and `sd_nex` are provided.
582+ # ' of the standard Nex priors. Ignored if `w_nex`, `mean_nex`, and `sd_nex` are provided.
581583# ' @param w_j A numeric in `(0, 1)` for the weight of the Ex component, or a numeric vector
582584# ' of mixture weights summing to 1 if multiple Ex components are specified.
583585# ' @param w_nex An optional numeric vector of mixture weights in \eqn{[0,1]} summing to 1
584- # ' for the NEX mixture prior.
585- # ' @param mean_nex An optional numeric matrix of NEX mixture means with one row per NEX
586+ # ' for the Nex mixture prior.
587+ # ' @param mean_nex An optional numeric matrix of Nex mixture means with one row per Nex
586588# ' mixture component and one column per cohort.
587- # ' @param sd_nex An optional positive numeric matrix of NEX mixture standard deviations with
588- # ' one row per NEX mixture component and one column per cohort.
589+ # ' @param sd_nex An optional positive numeric matrix of Nex mixture standard deviations with
590+ # ' one row per Nex mixture component and one column per cohort.
589591# '
590592# ' @return A list with prior parameters of class `prior_parameters_list`
591593# '
592594# ' @details
593595# ' This function sets the prior parameters for the method proposed by Neuenschwander et al. (2016).
594596# ' If `w_nex`, `mean_nex`, and `sd_nex` are all `NULL`, the standard ExNex formulation is used.
595- # ' Otherwise, the NEX part is specified as a finite mixture prior.
597+ # ' Otherwise, the Nex part is specified as a finite mixture prior.
596598# '
597599# ' @author Stephan Wojciekowski
598600# '
@@ -607,7 +609,7 @@ getPriorParametersExNex <- function (
607609# ' w_j = 0.8
608610# ' )
609611# '
610- # ' ## ExNex with NEX mixture prior
612+ # ' ## ExNex with Nex mixture prior
611613# ' prior_parameters_exnex_mix <- setPriorParametersExNex(
612614# ' mu_mean = 0,
613615# ' mu_sd = 1,
@@ -784,7 +786,7 @@ getPriorParametersExNexAdj <- function (
784786 w_j , lower = 0 , upper = 1 , len = 1 , .var.name = error_w_j
785787 )
786788
787- # # mixed NEX validation only if mixture inputs are supplied
789+ # # mixed Nex validation only if mixture inputs are supplied
788790 if (! (is.null(w_nex ) && is.null(mean_nex ) && is.null(sd_nex ))) {
789791 checkmate :: assertNumeric(
790792 w_nex , any.missing = FALSE , lower = 0 , upper = 1 , .var.name = error_w_nex
@@ -842,35 +844,35 @@ getPriorParametersExNexAdj <- function (
842844# ' @description This function sets prior parameters for the analysis method `"exnex_adj"`
843845# ' for use in \code{\link[bhmbasket]{performAnalyses}}.
844846# '
845- # ' It supports two specifications for the NEX part:
847+ # ' It supports two specifications for the Nex part:
846848# ' \itemize{
847- # ' \item the standard ExNex Adjusted specification with cohort-specific NEX priors via `mu_j` and `tau_j`
848- # ' \item an extended specification with a mixture prior on the NEX part via `w_nex`, `mean_nex`, and `sd_nex`
849+ # ' \item the standard ExNex Adjusted specification with cohort-specific Nex priors via `mu_j` and `tau_j`
850+ # ' \item an extended specification with a mixture prior on the Nex part via `w_nex`, `mean_nex`, and `sd_nex`
849851# ' }
850852# '
851853# ' @param mu_mean [numeric] Mean of \eqn{\mu}
852854# ' @param mu_sd [numeric] Positive standard deviation of \eqn{\mu}
853855# ' @param tau_scale [numeric] Positive scale parameter of \eqn{\tau}
854- # ' @param mu_j [numeric] Vector of means \eqn{\mu_j} for the standard NEX priors.
856+ # ' @param mu_j [numeric] Vector of means \eqn{\mu_j} for the standard Nex priors.
855857# ' Ignored if `w_nex`, `mean_nex`, and `sd_nex` are provided.
856858# ' @param tau_j [numeric] Vector of positive standard deviations \eqn{\tau_j}
857- # ' for the standard NEX priors. Ignored if `w_nex`, `mean_nex`, and `sd_nex` are provided.
859+ # ' for the standard Nex priors. Ignored if `w_nex`, `mean_nex`, and `sd_nex` are provided.
858860# ' @param w_j [numeric] Weight of the Ex component in `(0, 1)`, or a numeric vector
859861# ' of mixture weights summing to 1 if multiple Ex components are specified.
860862# ' @param w_nex [numeric] Optional vector of mixture weights in \eqn{[0,1]} summing to 1
861- # ' for the NEX mixture prior.
862- # ' @param mean_nex [numeric] Optional matrix of NEX mixture means with one row per NEX
863+ # ' for the Nex mixture prior.
864+ # ' @param mean_nex [numeric] Optional matrix of Nex mixture means with one row per Nex
863865# ' mixture component and one column per cohort.
864- # ' @param sd_nex [numeric] Optional positive matrix of NEX mixture standard deviations with
865- # ' one row per NEX mixture component and one column per cohort.
866+ # ' @param sd_nex [numeric] Optional positive matrix of Nex mixture standard deviations with
867+ # ' one row per Nex mixture component and one column per cohort.
866868# '
867869# ' @return A list with prior parameters of class `prior_parameters_list`
868870# '
869871# ' @details
870872# ' This function sets prior parameters for the ExNex Adjusted method, which combines
871873# ' the approach proposed by Neuenschwander et al. (2016) and the approach proposed by
872874# ' Berry et al. (2013). If `w_nex`, `mean_nex`, and `sd_nex` are all `NULL`, the standard
873- # ' ExNex Adjusted formulation is used. Otherwise, the NEX part is specified as a finite
875+ # ' ExNex Adjusted formulation is used. Otherwise, the Nex part is specified as a finite
874876# ' mixture prior.
875877# '
876878# ' @author Stephan Wojciekowski
@@ -886,7 +888,7 @@ getPriorParametersExNexAdj <- function (
886888# ' w_j = 0.8
887889# ' )
888890# '
889- # ' ## ExNex Adjusted with NEX mixture prior
891+ # ' ## ExNex Adjusted with Nex mixture prior
890892# ' prior_parameters_exnex_adj_mix <- setPriorParametersExNexAdj(
891893# ' mu_mean = 0,
892894# ' mu_sd = 1,
@@ -1004,7 +1006,7 @@ setPriorParametersExNexAdj <- function (
10041006
10051007 } else {
10061008
1007- # # mixed NEX version
1009+ # # mixed Nex version
10081010 checkmate :: assertNumeric(
10091011 w_nex , any.missing = FALSE , lower = 0 , upper = 1 , .var.name = error_w_nex
10101012 )
@@ -1326,13 +1328,14 @@ getPriorParametersStratifiedMix <- function (
13261328# ' for use in \code{\link[bhmbasket]{performAnalyses}}.
13271329# ' @param w A numeric vector of mixture weights in \eqn{[0,1]} summing to 1.
13281330# ' @param a_j A positive numeric matrix of beta shape parameters \eqn{\alpha_j},
1329- # ' with one row per mixture component and one column per cohort.
1331+ # ' with rows per mixture component and columns per cohort.
13301332# ' @param b_j A positive numeric matrix of beta shape parameters \eqn{\beta_j},
1331- # ' with one row per mixture component and one column per cohort.
1333+ # ' with rows per mixture component and columns per cohort.
13321334# ' @return A list with prior parameters of class `prior_parameters_list`
13331335# ' @details
13341336# ' The method `"stratified_mix"` is a beta-binomial model that assesses each cohort
13351337# ' individually with a finite mixture beta prior.
1338+ # ' See also the R package `RBesT`.
13361339# ' @author Stephan Wojciekowski
13371340# ' @examples
13381341# ' prior_parameters_stratified_mix <- setPriorParametersStratifiedMix(
0 commit comments