Skip to contents

This function attempts to return, or compute, p-values of Bayesian models.

Usage

# S3 method for BFBayesFactor
p_value(model, ...)

Arguments

model

A statistical model.

...

Additional arguments

Value

The p-values.

Details

For Bayesian models, the p-values corresponds to the probability of direction (bayestestR::p_direction()), which is converted to a p-value using bayestestR::convert_pd_to_p().

Examples

data(iris)
model <- lm(Petal.Length ~ Sepal.Length + Species, data = iris)
p_value(model)
#>           Parameter            p
#> 1       (Intercept) 1.005180e-11
#> 2      Sepal.Length 1.121002e-28
#> 3 Speciesversicolor 9.645641e-67
#> 4  Speciesvirginica 4.917626e-71