Detect a "shift of mass" between two conditions. For example expression might move later in a time series in an experimental condition vs a control. If all expression shifted to a later time in the experimental condition, this would be given an effect size of 1. Conversely if all expression shifted to an earlier time, the effect size would be -1.

effect_shift(coef1, coef2)

effect_shift_stepdown(coef1, coef2)

effect_shift_stepup(coef1, coef2)

effect_shift_log2(coef1, coef2)

effect_shift_stepdown_log2(coef1, coef2)

effect_shift_stepup_log2(coef1, coef2)

## Arguments

coef1 Column numbers in the design matrix for the first condition, in some meaningful order. Corresponding column numbers for the second condition.

## Value

An object defining how to calculate an effect size.

## Details

This can be viewed as similar to Somers' D. effect_shift_log2 is adapted to work with log2 scaled coefficients. This is almost certainly the version you want.

Note that this effect size is not symmetric: effect_shift_log2(c(1,2),c(3,4)) and effect_shift_log2(c(1,3),c(2,4)) will give different results.

The _stepdown and _stepup versions are for cumulative distributions. These are most useful in group effect form, where they can be used to examine shifts in start or end of transcriptions from RNA-seq or microarray data.