PValue-class | R Documentation |
This is the parent class for all p-values implemented in this package. Details about the methods for calculating p-values can be found in (our upcoming paper).
PValue(g1, g2, label)
LinearShiftRepeatedPValue(wc1f = 0, wc1e = 1/2, wc2 = 1/2)
MLEOrderingPValue()
LikelihoodRatioOrderingPValue()
ScoreTestOrderingPValue()
StagewiseCombinationFunctionOrderingPValue()
NeymanPearsonOrderingPValue(mu0 = 0, mu1 = 0.4)
NaivePValue()
g1 |
functional representation of the p-value in the early futility and efficacy regions. |
g2 |
functional representation of the p-value in the continuation region. |
label |
name of the p-value. Used in printing methods. |
wc1f |
slope of futility boundary change. |
wc1e |
slope of efficacy boundary change. |
wc2 |
slope of c2 boundary change. |
mu0 |
expected value of the normal distribution under the null hypothesis. |
mu1 |
expected value of the normal distribution under the null hypothesis. |
The implemented p-values are:
MLEOrderingPValue()
LikelihoodRatioOrderingPValue()
ScoreTestOrderingPValue()
StagewiseCombinationFunctionOrderingPValue()
The p-values are calculated by specifying an ordering of the sample space calculating the probability that a random sample under the null hypothesis is larger than the observed sample. Some of the implemented orderings are based on the work presented in \insertCiteemerson1990parameteradestr, \insertCite@Sections 8.4 in @jennison1999groupadestr, and \insertCite@Sections 4.1.1 and 8.2.1 in @wassmer2016groupadestr.
an object of class PValue
. This class signals that an
object can be supplied to the analyze
function.
plot_p
# This is the definition of a 'naive' p-value based on a Z-test for a one-armed trial
PValue(
g1 = \(smean1, n1, sigma, ...) pnorm(smean1*sqrt(n1)/sigma, lower.tail=FALSE),
g2 = \(smean1, smean2, n1, n2, ...) pnorm((n1 * smean1 + n2 * smean2)/(n1 + n2) *
sqrt(n1+n2)/sigma, lower.tail=FALSE),
label="My custom p-value")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.