loess_smoothed_marginals: Estimate the label probabilities of two pairs of binary...

Description Usage Arguments Details Examples

Description

Given two binary (0 or 1) features, X and Y, of a set of individuals sequenced by some numerical attribute (length, say), this function performs loess smoothing on those observed features in order to the estimate the probability that each feature is 1, expressed as a function of the numerical attribute.

Usage

1
2
3
loess_smoothed_marginals(lengths_all = NULL, lengths_X_0 = NULL,
  lengths_X_1 = NULL, lengths_Y_0 = NULL, lengths_Y_1 = NULL,
  monotonicity = NULL)

Arguments

lengths_all

NULL, or a vector of all lengths

lengths_X_0

NULL, or a vector of lengths for which X is observed to be 0

lengths_X_1

NULL, or a vector of lengths for which X is observed to be 1

lengths_Y_0

NULL, or a vector of lengths for which Y is observed to be 0

lengths_Y_1

NULL, or a vector of lengths for which X is observed to be 1

monotonicity

NULL, 'increasing' or 'decreasing'.

Details

The function requires four vectors, namely that of the lengths for which X = 0, X = 1, Y = 0 and Y = 1. Not all four need to be provided, as the missing ones can be inferred provided enough information: the function can accept a vector of all lengths, meaning labels with X = 0 (resp. Y = 0) can then be inferred from the list of those with X = 1 (resp. Y = 1) and vice versa.

If set to 'increasing' (resp. 'decreasing'), the monotonicity argument enforces that the resulting probabilities be monotone by setting each label probability equal to the max (resp. min) of all estimated label probabilities on a shorter length individual.

Examples

1
2
3
4
> label_probs = loess_smoothed_marginals(1:10, lengths_X_0=c(4, 7, 8), lengths_Y_1=8:10, monotonicity='increasing')
> label_probs$X
> label_probs$Y
> label_probs$length

dmanescu/enrichment-test documentation built on May 15, 2019, 9:19 a.m.