plot.fbst {fbst} | R Documentation |
plot.fbst
Description
Plots the results of a Full Bayesian Significance Test.
Usage
## S3 method for class 'fbst'
plot(x, ..., leftBoundary = -100, rightBoundary = 100, type = "contour", parNames = NULL,
xlimleft = NULL, xlimright = NULL, xlabString = "Parameter", ylabString = NULL)
Arguments
x |
An Object of class |
... |
Additional parameters, see |
leftBoundary |
x-coordinate for the left boundary to which is used for visualising the evidence in support of the null hypothesis. Defaults to -100. |
rightBoundary |
x-coordinate for the right boundary to which is used for visualising the evidence in support of the null hypothesis. Defaults to 100. |
type |
Relevant only if dim=2. Defaults to "contour" which provides a contour plot of the posterior, with a magenta point that shows the supremum over the null set. Alternatively, "persp" provides a 3-dimensional perspective plot of the posterior. |
parNames |
Vector of two entries which specifies the names for the parameters. Only relevant if dimensionTheta=2. |
xlimleft |
The left value for the x-axis range for the plot. Defaults to the minimum value provided in the posterior draws stored in the FBST object. |
xlimright |
The right value for the x-axis range for the plot. Defaults to the maximum value provided in the posterior draws stored in the FBST object. |
xlabString |
String for the x-axis label. Defaults to "Parameter". |
ylabString |
String for the y-axis label. Default to "density". |
Details
Plots the surprise function, the supremum of the surprise function restricted to the null set (blue point) and visualises the Bayesian e-value against the sharp null hypothesis as the blue shaded area under the surprise function. The Bayesian e-value in favour of the sharp null hypothesis is visualised as the red shaded area under the surprise function.
Value
Returns a plot.
Author(s)
Riko Kelter
References
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
Examples
set.seed(57)
grp1=rnorm(50,0,1.5)
grp2=rnorm(50,0.8,3.2)
p = as.vector(BayesFactor::ttestBF(x=grp1,y=grp2,
posterior = TRUE, iterations = 3000,
rscale = "medium")[,4])
# flat reference function
res = fbst(posteriorDensityDraws = p, nullHypothesisValue = 0,
dimensionTheta = 2, dimensionNullset = 1)
plot(res)
plot(res, xlimleft = -1.5, xlimright = 0.5)