plot_posterior: Plotting the posterior densities in Bayesian analyses

Description Usage Arguments Details Value References Examples

View source: R/plotting.R

Description

This function plots the posterior densities obtained in Bayesian analyses. It plots either univariately the posterior densities obtained via Bayesian correlated t tests. Or, if either a Bayesian Sign, Signed Rank or Hierarchical correlated t test have been used, it plots the projection of 3-simplex points into a 2D triangle.

Usage

1
plot_posterior(results, method, points = 1000)

Arguments

results

('character')
Results of the Bayesian analysis performed before.

method

('character')
The Bayesian test that has been performed. Either "b_corr_t_test", b_sign_test", "b_signed_rank_test" or "b_hierarchical_test".

points

('double')
Number of points used to plot the function.

Details

The plot for Bayesian correlated t tests has first been implemented in scmamp. The plots for the other Bayesian tests have first been implemented in rNPBST.

Value

('list')
List containing a 'gg' object.

References

https://github.com/b0rxa/scmamp https://github.com/JacintoCC/rNPBST

Examples

1
2
3
4
5
6
    ## Not run: 
      results <- b_signed_rank_test(df= test_benchmark_small,
        baseline = "algo_1", algorithm = "algo_2")
      plot_posterior(results, method = "b_signed_rank_test")
    
## End(Not run)

RebeccaGroh/seqbtests documentation built on Nov. 17, 2021, 8:50 a.m.