historical_normal: Historical data for normal distribution

Description Usage Arguments Value Examples

View source: R/normal.R

Description

Wrapper function for historical data from continuous (normally distributed) outcome.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
historical_normal(
  mu0_treatment = NULL,
  sd0_treatment = NULL,
  N0_treatment = NULL,
  mu0_control = NULL,
  sd0_control = NULL,
  N0_control = NULL,
  discount_function = "identity",
  alpha_max = 1,
  fix_alpha = FALSE,
  weibull_scale = 0.135,
  weibull_shape = 3,
  method = "fixed",
  .data = NULL
)

Arguments

mu0_treatment

scalar. Mean of the historical treatment group.

sd0_treatment

scalar. Standard deviation of the historical treatment group.

N0_treatment

scalar. Number of observations of the historical treatment group.

mu0_control

scalar. Mean of the historical control group.

sd0_control

scalar. Standard deviation of the historical control group.

N0_control

scalar. Number of observations of the historical control group.

discount_function

character. If incorporating historical data, specify the discount function. Currently supports the Weibull function (discount_function = "weibull"), the scaled-Weibull function (discount_function = "scaledweibull"), and the identity function (discount_function = "identity"). The scaled-Weibull discount function scales the output of the Weibull CDF to have a maximum value of 1. The identity discount function uses the posterior probability directly as the discount weight. Default value is "identity". See bdpnormal for more details.

alpha_max

scalar. Maximum weight the discount function can apply. Default is 1. For a two-arm trial, users may specify a vector of two values where the first value is used to weight the historical treatment group and the second value is used to weight the historical control group.

fix_alpha

logical. Fix alpha at alpha_max? Default value is FALSE.

weibull_scale

scalar. Scale parameter of the Weibull discount function used to compute alpha, the weight parameter of the historical data. Default value is 0.135. For a two-arm trial, users may specify a vector of two values where the first value is used to estimate the weight of the historical treatment group and the second value is used to estimate the weight of the historical control group. Not used when discount_function = "identity".

weibull_shape

scalar. Shape parameter of the Weibull discount function used to compute alpha, the weight parameter of the historical data. Default value is 3. For a two-arm trial, users may specify a vector of two values where the first value is used to estimate the weight of the historical treatment group and the second value is used to estimate the weight of the historical control group. Not used when discount_function = "identity".

method

character. Analysis method with respect to estimation of the weight parameter alpha. Default method "mc" estimates alpha for each Monte Carlo iteration. Alternate value "fixed" estimates alpha once and holds it fixed throughout the analysis. See the the bdpsurvival vignette
vignette("bdpsurvival-vignette", package="bayesDP") for more details.

.data

NULL. Stores the normal data for analysis. Should not be edited by the user.

Value

A list with historical data for control and treatment group with the discount function.

Examples

1
2
historical_normal(mu0_treatment = 15, sd0_treatment = 2, N0_treatment = 10,
                  mu0_control = 17, sd0_control = 3, N0_control = 20)

thevaachandereng/BACT documentation built on July 24, 2020, 2:35 a.m.