Skip to contents

Format binomial proportions and confidence intervals in APA style

Usage

apa_binom_mean_conf(x, digits = 2, ...)

Arguments

x

A vector of zeros and ones

digits

Number of digits in results

...

Additional arguments passed to format_results

Value

A string with the mean and confidence interval in square brackets

Examples

# Generate binomial data
set.seed(123)
x <- rbinom(500, 1, prob = 0.7)

# Format results in APA style
apa_binom_mean_conf(x)
#> [1] "_M_ = 0.71 [0.67, 0.75]"