Plot p-values and implied rejection boundaries
plot_p.Rd
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
orPValue
.- data_distribution
object of class
Normal
orStudent
.- 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
Value
a ggplot
object visualizing the p-values on a grid of possible test-statistic values.
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
Examples
plot_p(estimator = StagewiseCombinationFunctionOrderingPValue(),
data_distribution = Normal(FALSE),
design = get_example_design(),
mu = 0,
sigma = 1)