Learn R Programming

curtailment (version 0.2.6)

findLoss: Find loss scores for a set of single-arm designs

Description

This function finds loss scores for single-arm designs, in particular, designs found using the function singlearmdesigns(). Weights w0 and w1 are chosen, and the loss for each design is found using the equation loss = w0\*ESS(0) + w1\*ESS(1) + (1-w0-w1)\*N

Usage

findLoss(main.output, w0, w1)

Value

Output is a list identical to the output from function singlearmDesigns(), but with absolute and ranked loss scores added.

Arguments

main.output

Output from function singlearmDesigns().

w0

Choice of weight on ESS(0)

w1

Choice of weight on ESS(0)

Examples

Run this code
output <- singlearmDesign(nmin = 30,
 nmax = 30,
 C = 5,
 p0 = 0.1,
 p1 = 0.4,
 power = 0.8,
 alpha = 0.05)
 output.w.loss <- findLoss(main.output=output,
 w0=0.2,
 w1=0.3)

Run the code above in your browser using DataLab