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 |

`data_distribution` |
object of class |

`design` |
object of class |

`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 `ggplot2`

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

*adestr*version 0.5.0 Index]