percent_overlap: Confidence Interval Overlap Percentage

View source: R/percent_overlap.R

percent_overlapR Documentation

Confidence Interval Overlap Percentage

Description

The percent_overlap() function is used to calculate the overlap percentage between two numeric vectors. The function uses equation 3 described in chapter 2. The function takes as input two numeric vectors and a desired level of significance and it outputs the percentage overlap between the confidence intervals of population means of the input vectors. If there’s no overlap of the confidence intervals, e.g., the upper bound of the confidence interval of one vector is lower than the lower bound of the confidence interval of the other vector, a negative percent overlap would be displayed.

Usage

percent_overlap(x, y, alpha)

Arguments

x

a numeric vector

y

a numeric vector

alpha

level of significance

Value

percentage overlap between the confidence intervals of the two numeric vectors

Examples


## Not run: vecx <- rnorm(100)
vecy <- rnorm(100)
percent_overlap(vecx, vecy, 0.05)
## End(Not run)



pgrugwiro/variant documentation built on Aug. 2, 2022, 12:08 p.m.