prob_success: Calculate the probability of success.

View source: R/prob_success.R

prob_successR Documentation

Calculate the probability of success.

Description

Calculate the probability of success.

Calculate the probability of success for an augbin_2t_1a_fit object.

Usage

prob_success(x, ...)

## S3 method for class 'augbin_2t_1a_fit'
prob_success(
  x,
  y1_lower = -Inf,
  y1_upper = Inf,
  y2_lower = -Inf,
  y2_upper = log(0.7),
  probs = c(0.025, 0.975),
  newdata = NULL,
  ...
)

Arguments

x

an R object of class "augbin_fit"

...

arguments passed to other methods

y1_lower

numeric, minimum threshold to constitute success, scrutinising the log of the tumour size ratio comparing time 1 to baseline. Defaults to negative infinity.

y1_upper

numeric, maximum threshold to constitute success, scrutinising the log of the tumour size ratio comparing time 1 to baseline. Defaults to positive infinity.

y2_lower

numeric, minimum threshold to constitute success, scrutinising the log of the tumour size ratio comparing time 2 to baseline.

y2_upper

numeric, maximum threshold to constitute success, scrutinising the log of the tumour size ratio comparing time 2 to baseline. Defaults to log(0.7).

probs

pair of probabilities to use to calculate the credible interval for the probability of success.

newdata

data for which to infer the probability of success. A dataframe-like object with baseline tumour sizes in first column, and first and second post-baseline tumour sizes in columns 2 and 3. Omitted by default. When omitted, newdata is set to be the fit$tumour_size.

Value

Object of class tibble

Examples

## Not run: 
fit <- stan_augbin_demo()
prob_success(fit, y2_upper = log(0.7))

## End(Not run)

trialr documentation built on April 1, 2023, 12:03 a.m.