Description Usage Arguments Details Value Author(s) Examples

View source: R/decision_eval.R

Applies a decision rule to a "BAC" class object and provides rule evaluation

1 | ```
decision_eval(object, decision.rule, control.range, es, csv.name = NULL)
``` |

`object` |
An object of class "BAC". |

`decision.rule` |
A vector of |

`control.range` |
A vector of control rates at which the decision rule is evaluated. |

`es` |
A vector of treatment arm effect sizes, compared to control arm. |

`csv.name` |
If a name is specified, the output data set is exported in CSV format. |

The decision rules specified in `c(a,b)`

may be in the context
of either interim or final analysis. At the interim, a "go" decision is made
if the criterion in the "BAC" object exceeds `b`

and a "no go" decision
if such criterion is below `a`

. Otherwise, the decision falls in the
gray zone.

For the final analysis, the decision rule should satisfy `a`

=`b`

.
Significance is claimed if the criterion in the "BAC" object exceeds
`a`

. Specifying an `a`

larger than `b`

will lead to an error.

For interim analysis, specified decision rule is evaluated by the probability of making a correct go or no go decision. For final analysis, power or type-I error is computed.

Negative `es`

values are allowed if a lower rate is desirable.

An object of class "BACdecision".

Hongtao Zhang

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
## Not run:
#borrow from 3 historical trials#
yh = c(11,300,52);nh = c(45,877,128)
#specify current trial sample sizes#
n1 = 20;n2 = 30
obj = BAC_binom(yh=yh,nh=nh,n1=n1,n2=n2,n.chain=5,
criterion.type="prob",prob.threshold=0.1,sim.mode="express")
rule = decision_eval(obj,decision.rule=c(0.05,0.15),
control.range=seq(0.3,0.5,0.01),es=c(0,0.1,0.2),csv.name="result.csv")
#S3 method for class "BACdecision"
plot(rule,interim=T)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.