| plotPP {ppRep} | R Documentation | 
Plot joint and marginal posterior distributions
Description
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.
Usage
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,
  ...
)
Arguments
| tr | Effect estimate of the replication study. | 
| sr | Standard error of the replication effect estimate. | 
| to | Effect estimate of the original study. | 
| so | Standard error of the replication effect estimate. | 
| x | Number of successes parameter of beta prior for  | 
| y | Number of failures parameter of beta prior for  | 
| m | Mean parameter of initial normal prior for  | 
| v | Variance parameter of initial normal prior for  | 
| thetaRange | Range of effect sizes. Defaults to three standard errors around the replication effect estimate. | 
| alphaRange | Range of power parameters. Defaults to the range between zero and one. | 
| nGrid | Number of grid points. Defaults to  | 
| plot | Logical indicating whether data should be plotted. If
 | 
| CI | Logical indicating whether 95% highest posterior credible
intervals should be plotted. Defaults to  | 
| ... | Additional arguments passed to  | 
Value
Plots joint and marginal posterior densities, invisibly returns a list with the data for the plots.
Author(s)
Samuel Pawel
See Also
postPP, postPPalpha, postPPtheta
Examples
plotPP(tr = 0.2, sr = 0.05, to = 0.15, so = 0.05)