Adds model-implied density lines to an existing zplot.
Arguments
- x
a zplot_brma object.
- plot_type
graphics system:
"base"or"ggplot". Defaults to"base".- probs
quantiles for credible intervals. Defaults to
c(.025, .975).- max_samples
maximum posterior samples for density. Defaults to 10000. Use
Infto use all posterior samples.- plot_ci
whether to show credible interval bands. Defaults to
TRUE.- extrapolate
whether to remove bias adjustments. Defaults to
FALSE.- from, to
z-value range for density. Defaults to
-6and6.- by
step size for density points. Defaults to 0.05.
- length.out
number of density points (alternative to
by).- col
line color. Defaults to
"black".- as_data
whether to return data instead of plotting. Defaults to
FALSE.- ...
additional graphical parameters.
Value
NULL invisibly for base graphics, ggplot2 layers for ggplot,
or a data frame with columns x, y, y_lCI, y_uCI
if as_data = TRUE.
Details
When extrapolate = FALSE, the density includes all bias adjustments
(PET/PEESE regression, selection weights) representing the fitted model.
When extrapolate = TRUE, bias adjustments are removed to show the
hypothetical distribution without publication bias. Under selection models,
the curve is scaled by inverse selection probability and need not integrate
to one.