Description Usage Arguments Value See Also Examples
Compute the null distribution of test statistics on one gaussian variable.
Useful if testing a large number of variables at once since it allows
running permutations only once beforehand rather than for every variable.
Used in conjunction with "get_calibrated_pvalues
"
1 2 3 4 5 6 7 8 9 10 11 | calibrate_test(
y,
w = NULL,
rep = 1e+07,
doall = TRUE,
unidirectional = 0,
flatten = 0.5,
ignoremax = 0,
normmethod = 1,
novariance = F
)
|
y |
A binary vector of sample labels (cases=1, controls=0). |
w |
Default = NULL. Optional numerical vector of weights. 1 means all weights are equal to 1 and only the ordering is considered. If NULL (default), a standardisation of x is used to calculate the weights giving larger weights to aberrations of larger magnitude. |
rep |
Default=100000. Number of permutations to be used to calculate p-values. |
doall |
Default=TRUE. All permutations are performed |
unidirectional |
Default = 0. Can be 0, 1 or -1. 0 is for testing both directions of effect. 1 is for testing cases<controls and -1 is for testing cases>controls. |
flatten |
Default = 0.5. Numeric value recommended between 0 and 1.
If weights are not given, we take the max of flatten and the absolute
value of the Z-score of |
ignoremax |
Default=0. Optional value indicating if we should ignore the first few values when selecting the maximal enrichment score. Alternatively, it can be viewed as the minimal size considered for the aberrant interval. |
normmethod |
Default=1. If w=NULL the weights are generated by
subtracting the mean and dividing by the standard deviation. If |
novariance |
Default=FALSE. aziz.test is able to detect a difference in
variance between cases and controls as an association (when variance of cases
is larger than the variance of controls). |
A vector that can be used in get_calibrated_pvalues()
get_calibrated_pvalues
, aziz.test
1 2 3 4 5 | y = c(rep(1,200),rep(0,200))
x = rnorm(400)
calibration = calibrate_test(y,rep=100)
es = aziz.test(y,x,rep=0)$es #No need for permutations, p-values computed from calibration
get_calibrated_pvalues(calibration,es)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.