Skip to contents

This function computes the overlap between two sets of observed and permuted 'values for single-label replicates (SLR). It calculates the proportion of overlap between pairs of vectors (res1/res2 and pres1/pres2) after sorting them.

Usage

calOverlaps.slr(D, pD, nrow, N, N_len, B, overlaps, overlaps_P)

Arguments

D

Numeric vector. Observed data values (e.g., differences).

pD

Numeric vector. Permuted data values.

nrow

Integer. Number of rows in each block of data.

N

Integer vector. Number of top values to consider for overlap calculation.

N_len

Integer. Length of the N vector.

B

Integer. Number of bootstrap samples or resampling iterations.

overlaps

Numeric matrix. Matrix to store overlap results for observed data.

overlaps_P

Numeric matrix. Matrix to store overlap results for permuted data.

Value

A list containing two matrices: overlaps for observed data and overlaps_P for permuted data.

Details

The function calculates the overlap for two sets of comparisons: one for observed data (res1/res2) and one for permuted data (pres1/pres2). For each bootstrap sample, the function orders the two vectors being compared, then computes the proportion of overlap for the top N values.