PValue-class: P-values

PValue-classR Documentation

P-values

Description

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).

Usage

PValue(g1, g2, label)

LinearShiftRepeatedPValue(wc1f = 0, wc1e = 1/2, wc2 = 1/2)

MLEOrderingPValue()

LikelihoodRatioOrderingPValue()

ScoreTestOrderingPValue()

StagewiseCombinationFunctionOrderingPValue()

NeymanPearsonOrderingPValue(mu0 = 0, mu1 = 0.4)

NaivePValue()

Arguments

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.

Details

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.

Value

an object of class PValue. This class signals that an object can be supplied to the analyze function.

References

\insertAllCited

See Also

plot_p

Examples

# 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")

adestr documentation built on Sept. 11, 2024, 6:05 p.m.