This convenience function computes and, if desired, visualizes
the joint posterior density of effect size \(\theta\) and power
parameter \(\alpha\), as well as the marginal posterior
densities of effect size \(\theta\) and power parameter
\(\alpha\) individually. See the functions postPP
,
postPPalpha
, and postPPtheta
for more details
on their computation.
plotPP(
tr,
sr,
to,
so,
x = 1,
y = 1,
m = 0,
v = Inf,
thetaRange = c(tr - 3 * sr, tr + 3 * sr),
alphaRange = c(0, 1),
nGrid = 100,
plot = TRUE,
CI = FALSE,
...
)
Plots joint and marginal posterior densities, invisibly returns a list with the data for the plots.
Effect estimate of the replication study.
Standard error of the replication effect estimate.
Effect estimate of the original study.
Standard error of the replication effect estimate.
Number of successes parameter of beta prior for \(\alpha\).
Defaults to 1
.
Number of failures parameter of beta prior for \(\alpha\).
Defaults to 1
.
Mean parameter of initial normal prior for \(\theta\).
Defaults to 0
.
Variance parameter of initial normal prior for \(\theta\).
Defaults to Inf
(uniform prior).
Range of effect sizes. Defaults to three standard errors around the replication effect estimate.
Range of power parameters. Defaults to the range between zero and one.
Number of grid points. Defaults to 100
.
Logical indicating whether data should be plotted. If
FALSE
only the data used for plotting are returned.
Logical indicating whether 95% highest posterior credible
intervals should be plotted. Defaults to FALSE
.
Additional arguments passed to stats::integrate
for
computation of posterior densities and highest posterior density credible
intervals.
Samuel Pawel
postPP
, postPPalpha
, postPPtheta
plotPP(tr = 0.2, sr = 0.05, to = 0.15, so = 0.05)
Run the code above in your browser using DataLab