plot_p {adestr}R Documentation

Plot p-values and implied rejection boundaries

Description

Creates a plot of the p-values and implied rejection boundaries on a grid of values for the first and second-stage test statistics.

Usage

plot_p(
  estimator,
  data_distribution,
  design,
  mu = 0,
  sigma,
  boundary_color = "lightgreen",
  subdivisions = 100,
  ...
)

Arguments

estimator

object of class PointEstimator, IntervalEstimator or PValue.

data_distribution

object of class Normal or Student.

design

object of class TwoStageDesign.

mu

expected value of the underlying normal distribution.

sigma

assumed standard deviation.

boundary_color

color of the implied rejection boundary.

subdivisions

number of subdivisions per axis for the grid of test statistic values.

...

additional arguments handed down to ggplot

Details

When the first-stage test statistic lies below the futility threshold (c1f) or above the early efficacy threshold (c1e) of the TwoStageDesign, there is no second-stage test statistics. The p-values in these regions are only based on the first-stage values. For first-stage test statistic values between c1f and c1e, the first and second-stage test statistic determine the p-value.

The rejection boundary signals the line where

Value

a ggplot object visualizing the p-values on a grid of possible test-statistic values.

Examples

plot_p(estimator = StagewiseCombinationFunctionOrderingPValue(),
  data_distribution = Normal(FALSE),
  design = get_example_design(),
  mu = 0,
  sigma = 1)

[Package adestr version 1.0.0 Index]