Title: | The Full Bayesian Evidence Test, Full Bayesian Significance Test and the e-Value |
---|---|
Description: | Provides access to a range of functions for computing and visualizing the Full Bayesian Significance Test (FBST) and the e-value for testing a sharp hypothesis against its alternative, and the Full Bayesian Evidence Test (FBET) and the (generalized) Bayesian evidence value for testing a composite (or interval) hypothesis against its alternative. The methods are widely applicable as long as a posterior MCMC sample is available. |
Authors: | Riko Kelter |
Maintainer: | Riko Kelter <[email protected]> |
License: | GPL-3 |
Version: | 2.2 |
Built: | 2024-11-13 05:01:44 UTC |
Source: | https://github.com/cran/fbst |
Provides access to a range of functions for computing and visualizing the Full Bayesian Significance Test (FBST) and the e-value for testing a sharp hypothesis against its alternative, and the Full Bayesian Evidence Test (FBET) and the (generalized) Bayesian evidence value for testing a composite (or interval) hypothesis against its alternative. The methods are widely applicable as long as a posterior MCMC sample is available.
Package for conducting the Full Bayesian Evidence Test (FBET) and the Full Bayesian Significance Test (FBST). The FBST is a Bayesian hypothesis test for testing a sharp hypothesis against its alternative by calculating the e-value, the Bayesian evidence against the null hypothesis. The FBET is a generalization of the underlying Pereira-Stern theory of the FBST and allows for testing interval hypotheses. It provides the Bayesian evidence value, or generalized e-value, which includes the e-value of the FBST as a special case. The Bayesian evidence value is based on the relative surprise function to a reference function. In the FBST, the tangential set corresponding to a sharp null hypothesis serves for quantifying the Bayesian evidence. In the FBET, the Bayesian evidence interval serves for quantifying the Bayesian evidence, which has a strong analogy to the Bayes factor. Next to the core functions, helper functions and visualizations of the results of a FBST and FBET are provided in the package.
Package: | fbst |
Type: | Package |
Title: | The Full Bayesian Evidence Test, Full Bayesian Significance Test and the e-Value |
Version: | 2.2 |
Date: | 2024-02-14 |
Author: | Riko Kelter |
Maintainer: | Riko Kelter <[email protected]> |
Description: | Provides access to a range of functions for computing and visualizing the Full Bayesian Significance Test (FBST) and the e-value for testing a sharp hypothesis against its alternative, and the Full Bayesian Evidence Test (FBET) and the (generalized) Bayesian evidence value for testing a composite (or interval) hypothesis against its alternative. The methods are widely applicable as long as a posterior MCMC sample is available. |
Imports: | bayestestR, methods |
Depends: | cubature, ks, viridis, rstanarm |
Suggests: | BayesFactor, knitr, rmarkdown |
License: | GPL-3 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2024-02-14 14:01:39 UTC; riko |
Date/Publication: | 2024-02-15 08:00:02 UTC |
Config/pak/sysreqs: | cmake libglpk-dev make libicu-dev libxml2-dev zlib1g-dev |
Repository: | https://rikoke.r-universe.dev |
RemoteUrl: | https://github.com/cran/fbst |
RemoteRef: | HEAD |
RemoteSha: | dcad708279af325581f5024f445e917d1629e42f |
Index of help topics:
$,fbet-method Returns an object from an object of class 'fbet'. $,fbst-method Returns an object from an object of class 'fbst'. bdm bdm fbet fbet fbet-class Class '"fbet-class"' fbst fbst fbst-class Class '"fbst-class"' fbst-package The Full Bayesian Evidence Test, Full Bayesian Significance Test and the e-Value names.fbet names.fbet names.fbst names.fbst plot.fbet plot.fbet plot.fbst plot.fbst show.fbet show.fbet show.fbst show.fbst summary.fbet summary.fbet summary.fbst summary.fbst
Further information is available in the following vignettes:
fbet |
Bayesian hypothesis testing with the Full Bayesian Evidence Test (source, pdf) |
fbst |
Precise Bayesian hypothesis testing with the Full Bayesian Significance Test (source, pdf) |
twodimfbst |
Precise Bayesian hypothesis testing with the Full Bayesian Significance Test in multidimensional posteriors (source, pdf) |
Riko Kelter
Maintainer: Riko Kelter <[email protected]>
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
fbet
.
Returns an object from an object of class fbet
-
-
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
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 = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) # Return the Bayesian evidence value for the interval null hypothesis res$eValueH0
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 = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) # Return the Bayesian evidence value for the interval null hypothesis res$eValueH0
fbst
.
Returns an object from an object of class fbst
-
-
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
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 = 3, dimensionNullset = 2) # Return the e-value from an fbst object res$eValue
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 = 3, dimensionNullset = 2) # Return the e-value from an fbst object res$eValue
Calculates the Bayesian discrepancy measure for a precise null hypothesis.
bdm(posteriorDensityDraws, nullHypothesisValue=0)
bdm(posteriorDensityDraws, nullHypothesisValue=0)
posteriorDensityDraws |
Vector of (MCMC) posterior parameter draws. |
nullHypothesisValue |
Parameter value of the precise null hypothesis. Defaults to zero. |
The BDM is calculated as where
if
,
if
and
if
, where
denotes the posterior median of the parameter
, and the null hypothesis specifies
.
Returns the value of the BDM.
Riko Kelter
For details, see: https://arxiv.org/abs/2105.13716
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]) bdm(p,0)
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]) bdm(p,0)
The function computes the Full Bayesian Evidence Test (FBST) and the Bayesian evidence value (the generalized e-value which obtains the e-value of the FBST as a special case), which is the Bayesian evidence against an interval null hypothesis. The function assumes posterior MCMC draws and constructs a posterior density based on a kernel density estimator subsequently. The Bayesian evidence interval is computed using a linear search based on the evidence-threshold and the calculation of the Bayesian evidence value is performed using numerical integration.
fbet(posteriorDensityDraws=NULL, interval, nu=1, FUN=NULL, par=NULL, posterior=NULL, par_posterior=NULL)
fbet(posteriorDensityDraws=NULL, interval, nu=1, FUN=NULL, par=NULL, posterior=NULL, par_posterior=NULL)
posteriorDensityDraws |
Vector of MCMC posterior parameter draws |
interval |
Vector of two numerical values containing the boundaries of the interval null hypothesis to be tested |
nu |
Numerical value which provides the evidence-threshold based on which the Bayesian evidence interval is calculated |
FUN |
Reference function |
par |
Additional parameters of the reference function |
posterior |
Posterior density function |
par_posterior |
Additional parameters of the posterior density function |
If no reference function is specified, a flat reference function is used as default reference function when posteriorDensityDraws are provided.
Returns an object of class fbet if posteriorDensityDraws are provided. When using the posterior argument to pass the posterior as a function, it provides the evidence value for the hypothesis specified in the interval argument.
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577.
set.seed(57) grp1=rnorm(50,0,1.5) grp2=rnorm(50,0.3,3.2) p = as.vector(BayesFactor::ttestBF(x=grp1,y=grp2, posterior = TRUE, iterations = 3000, rscale = "medium")[,4]) # flat reference function, nu = 0 res = fbet(p, interval = c(-0.1,0.1), nu=0, FUN=NULL, par=NULL) summary(res) plot(res) # flat reference function, nu = 1 res = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) summary(res) plot(res) # medium Cauchy C(0,1) reference function, nu = 1 res_med = fbet(posteriorDensityDraws = p, interval = c(-0.1,0.1), nu = 1, FUN = dcauchy, par = list(location = 0, scale=sqrt(2))) summary(res_med) plot(res_med) # posterior as function argument fbet(posterior=dbeta, par_posterior = list(shape1 = 3, shape2 = 4), interval = c(0.2,1), nu = 1, FUN=dbeta, par = list(shape1 = 1, shape2 = 1))
set.seed(57) grp1=rnorm(50,0,1.5) grp2=rnorm(50,0.3,3.2) p = as.vector(BayesFactor::ttestBF(x=grp1,y=grp2, posterior = TRUE, iterations = 3000, rscale = "medium")[,4]) # flat reference function, nu = 0 res = fbet(p, interval = c(-0.1,0.1), nu=0, FUN=NULL, par=NULL) summary(res) plot(res) # flat reference function, nu = 1 res = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) summary(res) plot(res) # medium Cauchy C(0,1) reference function, nu = 1 res_med = fbet(posteriorDensityDraws = p, interval = c(-0.1,0.1), nu = 1, FUN = dcauchy, par = list(location = 0, scale=sqrt(2))) summary(res_med) plot(res_med) # posterior as function argument fbet(posterior=dbeta, par_posterior = list(shape1 = 3, shape2 = 4), interval = c(0.2,1), nu = 1, FUN=dbeta, par = list(shape1 = 1, shape2 = 1))
"fbet-class"
Class for modelling the results of a Full Bayesian Evidence Test
Store the results of a FBET
data
:Object of class "list"
holding the results of the Full Bayesian Evidence Test. posteriorDensityDraws
holds the posterior MCMC parameter draws, posteriorDensityDrawsSorted
stores the sorted posterior MCMC parameter draws, postDensValues
stores the posterior density values, indices
stores the indices for deciding which values pass the evidence-threshold ,
interval
stores the boundaries of the interval null hypothesis, referenceFunction
stores the name of the reference function used, nu
specifies the evidence-threshold used for computation of the Bayesian evidence interval, evidenceInterval
holds the endpoints of the resulting Bayesian evidence interval, eValueH0
holds the Bayesian evidence value in favour of the interval null hypothesis, eValueH1
holds the Bayesian evidence value in favour of the alternative hypothesis (or equivalently, against the interval null hypothesis)
The function computes the Full Bayesian Significance Test (FBST) and the e-value, which is the Bayesian evidence against a precise null hypothesis. The function assumes posterior MCMC draws and constructs a posterior density based on a kernel density estimator subsequently.
fbst(posteriorDensityDraws, nullHypothesisValue, FUN, par, dimensionTheta, dimensionNullset, dim, gridSize)
fbst(posteriorDensityDraws, nullHypothesisValue, FUN, par, dimensionTheta, dimensionNullset, dim, gridSize)
posteriorDensityDraws |
Vector of (MCMC) posterior parameter draws. |
nullHypothesisValue |
Parameter value of the precise null hypothesis. |
FUN |
Reference function. |
par |
Additional parameters of the reference function. |
dimensionTheta |
Dimension of the parameter space, defaults to 1 and can be changed to 2. Dimensions larger than 2 are currently not supported. |
dimensionNullset |
Dimension of the null set corresponding to the null hypothesis. |
dim |
Dimension of the posterior subspace over which integration is required. Defaults to 1. Can be changed to 2 if required. |
gridSize |
Grid size for the multivariate two-dimensional kernel density estimation in case dimensionTheta=2. Defaults to 1000. |
If no reference function is specified, a flat reference function is used as default reference function. Note that the posterior dimension dim defaults to 1, and if dim=2, only flat reference functions are supported. Thus, specifying FUN or par has no effect when dim=2.
Returns an object of class fbst.
Riko Kelter
For a details, see: https://link.springer.com/article/10.3758/s13428-021-01613-6.
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) summary(res) plot(res) # medium Cauchy C(0,1) reference function res_med = fbst(posteriorDensityDraws = p, nullHypothesisValue = 0, dimensionTheta = 2, dimensionNullset = 1, FUN = dcauchy, par = list(location = 0, scale = sqrt(2)/2)) summary(res_med) plot(res_med)
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) summary(res) plot(res) # medium Cauchy C(0,1) reference function res_med = fbst(posteriorDensityDraws = p, nullHypothesisValue = 0, dimensionTheta = 2, dimensionNullset = 1, FUN = dcauchy, par = list(location = 0, scale = sqrt(2)/2)) summary(res_med) plot(res_med)
"fbst-class"
Class for modelling the results of a Full Bayesian Significance Test
Store the results of a FBST
data
:Object of class "list"
holding the results of the Full Bayesian Significance Test. posteriorDensityDraws
holds the posterior MCMC parameter draws, postEffSizeSorted
stores the sorted posterior MCMC parameter draws, densZero
stores the surprise function value at the sharp null hypothesis parameter value, postDensValues
stores the posterior density values, indices
stores the indices for deciding which values are located inside the tangential set, nullHypothesisValue
stores the sharp null hypothesis parameter value, referenceFunction
holds the name of the reference function used, dimensionTheta
holds the dimension of the parameter space, dimensionNullset
holds the dimension of the null set corresponding to the null hypothesis, eValue
holds the Bayesian evidence against the sharp null hypothesis, the e-value, pValue
holds the p-value associated with the Bayesian e-value in favour of the sharp null hypothesis, sev_H_0
holds the standardized e-value as a replacement of the frequentist p-value.
Plots the names of the objects stored in the data
object of a Full Bayesian Evidence Test.
## S3 method for class 'fbet' names(x)
## S3 method for class 'fbet' names(x)
x |
An Object of class |
Plots the names of the objects stored in the data
object of a Full Bayesian Evidence Test.
Returns a list of names.
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
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 = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) names(res)
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 = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) names(res)
Plots the names of the objects stored in the data
object of a Full Bayesian Significance Test.
## S3 method for class 'fbst' names(x)
## S3 method for class 'fbst' names(x)
x |
An Object of class |
Plots the names of the objects stored in the data
object of a Full Bayesian Significance Test.
Returns a list of names.
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
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) names(res)
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) names(res)
Plots the results of a Full Bayesian Evidence Test.
## S3 method for class 'fbet' plot(x, ..., leftBoundary = -100, rightBoundary = 100, type = "posterior", legendposition = "topleft", main = "")
## S3 method for class 'fbet' plot(x, ..., leftBoundary = -100, rightBoundary = 100, type = "posterior", legendposition = "topleft", main = "")
x |
An Object of class |
... |
Additional parameters, see |
leftBoundary |
x-coordinate for the left boundary to which is used for visualising the results. Defaults to -100. |
rightBoundary |
x-coordinate for the right boundary to which is used for visualising the results. Defaults to 100. |
type |
Defaults to "posterior", which produces a posterior-density based plot. Can be changed to "surprise" to show the surprise function instead. |
legendposition |
Position of the legend. Defaults to "topleft". Must be one of the standard string values available for the legend function of base R. |
main |
Title string for the plot. Default to no title. |
Plots the resulting surprise function, the interval null hypothesis (dotted blue lines), the resulting Bayesian evidence interval (solid blue lines), the evidence-threshold (dotted black line) and the resulting Bayesian evidence values. The Bayesian evidence value in favour of the interval null hypothesis is visualized as the blue area, and the Bayesian evidence value in favour of the alternative hypothesis is visualized as the red area.
Returns a plot.
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
set.seed(57) grp1=rnorm(50,0,1.5) grp2=rnorm(50,0.3,3.2) p = as.vector(BayesFactor::ttestBF(x=grp1,y=grp2, posterior = TRUE, iterations = 3000, rscale = "medium")[,4]) # flat reference function res = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) summary(res) plot(res)
set.seed(57) grp1=rnorm(50,0,1.5) grp2=rnorm(50,0.3,3.2) p = as.vector(BayesFactor::ttestBF(x=grp1,y=grp2, posterior = TRUE, iterations = 3000, rscale = "medium")[,4]) # flat reference function res = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) summary(res) plot(res)
Plots the results of a Full Bayesian Significance Test.
## S3 method for class 'fbst' plot(x, ..., leftBoundary = -100, rightBoundary = 100, type = "contour", parNames = NULL, xlimleft = NULL, xlimright = NULL, xlabString = "Parameter", ylabString = NULL)
## S3 method for class 'fbst' plot(x, ..., leftBoundary = -100, rightBoundary = 100, type = "contour", parNames = NULL, xlimleft = NULL, xlimright = NULL, xlabString = "Parameter", ylabString = NULL)
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". |
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.
Returns a plot.
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
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)
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)
Prints the main results of a Full Bayesian Evidence Test to the console.
## S3 method for class 'fbet' show(object)
## S3 method for class 'fbet' show(object)
object |
An Object of class |
Shows the main results of a Full Bayesian Evidence Test stored in an object of class fbet
.
Prints the results onto the console.
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
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 = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) show(res)
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 = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) show(res)
Prints the main results of a Full Bayesian Significance Test to the console.
## S3 method for class 'fbst' show(object)
## S3 method for class 'fbst' show(object)
object |
An Object of class |
Shows the main results of a Full Bayesian Significance Test stored in an object of class fbst
.
Prints the results onto the console.
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
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) show(res)
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) show(res)
Prints the results of a Full Bayesian Evidence Test.
## S3 method for class 'fbet' summary(object, ...)
## S3 method for class 'fbet' summary(object, ...)
object |
An Object of class |
... |
Additional parameters, see |
Summarises the results of a Full Bayesian Evidence Test.
Prints the results onto the console.
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
set.seed(57) grp1=rnorm(50,0,1.5) grp2=rnorm(50,0.3,3.2) p = as.vector(BayesFactor::ttestBF(x=grp1,y=grp2, posterior = TRUE, iterations = 3000, rscale = "medium")[,4]) # flat reference function res = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) summary(res)
set.seed(57) grp1=rnorm(50,0,1.5) grp2=rnorm(50,0.3,3.2) p = as.vector(BayesFactor::ttestBF(x=grp1,y=grp2, posterior = TRUE, iterations = 3000, rscale = "medium")[,4]) # flat reference function res = fbet(p, interval = c(-0.1,0.1), nu=1, FUN=NULL, par=NULL) summary(res)
Prints the results of a Full Bayesian Significance Test.
## S3 method for class 'fbst' summary(object, ...)
## S3 method for class 'fbst' summary(object, ...)
object |
An Object of class |
... |
Additional parameters, see |
Summarises the results of a Full Bayesian Significance Test.
Prints the results onto the console.
Riko Kelter
For a details, see: https://arxiv.org/abs/2001.10577 and https://arxiv.org/pdf/2001.10577.pdf.
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) summary(res)
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) summary(res)