estim: Posterior Mean and Mean Squared Error

estimR Documentation

Posterior Mean and Mean Squared Error

Description

Computes the posterior mean and the mean squared error of a basket trial design.

Usage

estim(design, ...)

## S4 method for signature 'OneStageBasket'
estim(
  design,
  p1,
  n,
  lambda = NULL,
  weight_fun,
  weight_params = list(),
  globalweight_fun = NULL,
  globalweight_params = list(),
  ...
)

## S4 method for signature 'TwoStageBasket'
estim(
  design,
  p1,
  n,
  n1,
  lambda = NULL,
  interim_fun,
  interim_params = list(),
  weight_fun,
  weight_params = list(),
  globalweight_fun = NULL,
  globalweight_params = list(),
  ...
)

Arguments

design

An object of class Basket created by setupOneStageBasket or setupTwoStageBasket.

...

Further arguments.

p1

Probabilities under the alternative hypothesis. If length(p1) == 1, then this is a common probability for all baskets.

n

The sample size per basket.

lambda

The posterior probability threshold. See details for more information.

weight_fun

Which function should be used to calculate the pairwise weights.

weight_params

A list of tuning parameters specific to weight_fun.

globalweight_fun

Which function should be used to calculate the global weights.

globalweight_params

A list of tuning parameters specific to globalweight_fun.

n1

The sample size per basket for the interim analysis in case of a two-stage design.

interim_fun

Which type of interim analysis should be conducted in case of a two-stage design.

interim_params

A list of tuning parameters specific to interim_fun.

Value

A list containing means of the posterior distributions and the mean squared errors for all baskets.

Methods (by class)

  • estim(OneStageBasket): Posterior mean and mean squared error for a single-stage basket design.

  • estim(TwoStageBasket): Posterior mean and mean squared error for a two-stage basket design.

Examples

design <- setupOneStageBasket(k = 3, p0 = 0.2)
estim(design = design, p1 = c(0.2, 0.2, 0.5), n = 15,
  weight_fun = weights_fujikawa)

baskexact documentation built on May 29, 2024, 4:39 a.m.