Draws the estimated selection function (selection weight versus p-value) from a fitted pub_bias object.

selection_plot(object, ...)

# S3 method for class 'pub_bias'
selection_plot(
  object,
  normalize = TRUE,
  p_grid = seq(0.001, 0.999, length.out = 200),
  line_col = "#C0392B",
  line_lwd = 2,
  bar_col = "#F3A683",
  border_col = "#B23A2B",
  xlab = "P-value",
  ylab = NULL,
  main = "Estimated Selection Function",
  ...
)

# S3 method for class 'pub_bias'
plot(x, type = c("funnel", "selection"), ...)

Arguments

object

A fitted object returned by publication_bias.

...

Additional arguments passed to plot.

normalize

Logical; if TRUE, rescales plotted weights so the maximum equals 1.

p_grid

Numeric vector of p-values used for continuous methods.

line_col

Line color for continuous methods.

line_lwd

Line width for continuous methods.

bar_col

Fill color for beta-binomial bars.

border_col

Border color for beta-binomial bars.

xlab

X-axis label.

ylab

Optional y-axis label.

main

Plot title.

x

A fitted object returned by publication_bias.

type

Plot type: "funnel" or "selection".

Value

Invisibly returns a plotting data frame.

Examples

if (FALSE) { # \dontrun{
fit <- mars(
  formula = yi ~ 1,
  data = bcg,
  studyID = "trial",
  variance = "vi",
  varcov_type = "univariate",
  structure = "univariate",
  estimation_method = "MLE"
)
pb <- publication_bias(fit, method = "beta_selection")
selection_plot(pb)
plot(pb, type = "selection")
} # }