Description Usage Arguments Details Value Examples
Fancy Table for two group comparison
1 | BayesFactorTest(x, y, data)
|
x |
two level variable |
y |
variable to compare |
data |
data.frame or tibble used to create model fits. Used for capturing variable labels, if they exist |
Two group comparison
A tibble with: Variable
, Parameter
, Median CI
,
pd
(probability of direction),
ROPE CI
(R.O.P.E and CI),
ROPE%
(R.O.P.E precentage),
BF
(bayes factor),
Prior \[loc scale\]
(Prior distribution with location and scale parameters)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Real World Examples
data(Bladder_Cancer)
library(bayestestR)
library(tidyverse)
Bladder_Cancer <- Bladder_Cancer %>%
mutate(Cycles_cat = droplevels(Cycles_cat),
Clinical_Stage_Model = recode_factor(Clinical_Stage_Grouped,
'Stage I/II (<=T2NxMx)' = 'Stage I/II (<=T2NxMx)',
'Stage III (T3NxMx)' = 'Stage III/IV (T3/4NxMx)'
,'Stage IV (T4NxMx)' = 'Stage III/IV (T3/4NxMx)')
)
# For multiple variables use map_dfr function
vars_to_run <- c('PT0N0','Gender', 'Clinical_Stage_Model', 'Cycles_cat')
testmap <- purrr::map_dfr(
vars_to_run, BayesFactorTest, y='Elix_Sum', data = Bladder_Cancer )
# kable(testmap, 'latex', booktabs = TRUE, linesep = '',
# caption = 'Bayesian t-tests for Elix Sum')%>%
# kable_styling(font_size = 7.0)
# just one
testone <- BayesFactorTest(x = 'Cycles_cat', y = 'Elix_Sum', data = Bladder_Cancer )
# kable(testone, 'latex', booktabs = TRUE, linesep = '',
# caption = 'Bayesian t-tests for Elix Sum')%>%
# kable_styling(font_size = 7.0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.