| plot_pf | R Documentation | 
This function plots the plausibility function for up to two parameters of interest.
plot_pf(pf, alpha = 0.05, ngrid = 10, subtitle = "")
| pf | A  | 
| alpha | A numeric value specifying a significance level to contrast the
plausibility function against. Defaults to  | 
| ngrid | An integer specifying the grid size on which the plausibility
function will be evaluated. Specifically if  | 
| subtitle | A string for specifying a subtitle to the plot. Defaults to
 | 
A ggplot object.
x <- rnorm(10)
y <- rnorm(10, mean = 2)
null_spec <- function(y, parameters) {purrr::map(y, ~ .x - parameters[1])}
stat_functions <- list(stat_t)
stat_assignments <- list(mean = 1)
pf <- PlausibilityFunction$new(
  null_spec = null_spec,
  stat_functions = stat_functions,
  stat_assignments = stat_assignments,
  x, y
)
pf$set_nperms(50)
pf$set_point_estimate(mean(y) - mean(x))
pf$set_parameter_bounds(
  point_estimate = pf$point_estimate,
  conf_level = 0.8
)
pf$set_grid(
  parameters = pf$parameters,
  npoints = 2L
)
pf$evaluate_grid(grid = pf$grid)
plot_pf(pf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.