compare_hdi: Compare subset-specific Beta distributions across two groups

Description Usage Arguments Value Examples

View source: R/analysis.R View source: R/analysis.R

Description

For each subset, calculate the difference in Beta distributions across two groups, and label it as significant if we can confidently claim that the HDI of the difference is other than zero. Do not attempt tests in subsets for which we do not have a good estimate of the success rate to start with (HDI range = 1).

Usage

1
compare_hdi(happy_hdi, sample_size = 1e+05, significance = 0.05)

Arguments

happy_hdi

A happy_hdi object obtained with estimate_hdi().

sample_size

Number of observations to draw from the Beta posterior to estimate HDIs for the difference in Beta distributions. Default: 1e5.

significance

Significance levels for HDIs of the difference. Default: 0.05 (= 95% HDIs).

Value

A data.frame with estimated differences across groups, HDIs for the difference and significance labels.

Examples

1
2
3
4
5
6
## Not run: 
hdi <- estimate_hdi(df, successes_col = 'TRUTH.TP', totals_col = 'TRUTH.TOTAL', 
                   group_cols = c('Group.Id', 'Subset', 'Type', 'Subtype'))
hdi_diff <- compare_hdi(happy_hdi = hdi)                 

## End(Not run)

Illumina/happyCompare documentation built on Sept. 30, 2017, 7:07 p.m.