shifted_outcome: Implements the shifted modified outcome approach

Description Usage Arguments Value Examples

View source: R/methods.R

Description

Shifted modified outcome is an improvement to modified outcome. It is a heuristic which consists in the addition of of a small translation term to the inverse of the propensity score. The goal is to avoid numerical instability due to low propensity scores values. More precisely, the inverses of the propensity scores become 1/(P(A|X) + shift). We recommend keeping the default value of the parameter shift at 0.1.

Usage

1
shifted_outcome(A, X, Y, propensity, parallel = FALSE, shift = 0.1, ...)

Arguments

A

target variant

X

rest of the genotype

Y

phenotype

propensity

propensity scores

parallel

whether to perform support estimation in a parallelized fashion

shift

regularization term to be added to the propensity scores to avoid numerical stability

...

additional arguments to be passed to stabilityGLM or stabilityBIG

Value

a vector containing the area under the stability selection path for each variable in X

Examples

1
2
3
4
5
6
7
8
9
n <- 30
p <- 10
X <- matrix((runif(n * p) < 0.5) + (runif(n * p) < 0.5),
             ncol = p, nrow = n) # SNP matrix
A <- (runif(n) < 0.3)
propensity <- runif(n, min = 0.4, max = 0.8)
Y <- runif(n) < 1/ (1 + exp(-X[, 2, drop = FALSE]))
shifted_scores <- shifted_outcome(A, X, Y, propensity,
                               shift = 0.1, n_subsample = 1)

EpiSlim/epiGWAS documentation built on Nov. 19, 2019, 7:15 p.m.