Learn R Programming

baskexact (version 1.0.1)

plot_weights: Plot Weight Functions

Description

Plot Weight Functions

Usage

plot_weights(design, ...)

# S4 method for OneStageBasket plot_weights(design, n, r1, weight_fun, weight_params = list(), ...)

Value

A plot.

Arguments

design

An object of class Basket created by setupOneStageBasket or setupTwoStageBasket.

...

Further arguments.

n

The sample size per basket.

r1

Number of responses in one basket

weight_fun

Which function should be used to calculate the pairwise weights.

weight_params

A list of tuning parameters specific to weight_fun.

Methods (by class)

  • plot_weights(OneStageBasket): Plot weights for a single-stage basket trials

Details

The design object is only used for the prior parameters, which affect the weights of some weight functions.

Examples

Run this code
design <- setupOneStageBasket(k = 3, p0 = 0.2, shape1 = 1, shape2 = 1)
plot_weights(design = design, n = 20, r1 = 10, weight_fun = weights_jsd)

Run the code above in your browser using DataLab