Description Usage Arguments Details Value Examples
View source: R/changefunctions.R
Finds corner of a vector of ordered transformed p values.
1 | elbow(zvec, rbuff = 25, h = 30)
|
zvec |
vector of ordered transformed p values |
rbuff |
scaler, by default 25. Controls the right buffer. |
h |
scaler, default 30. Controls the window size. |
The corner point of ordered p values indicate the point where the change from the alternative to null happens. So, by detecting that point we get an estimate of the number of true alternatives.
This function uses two methods for corner detection. One method is by transforming the vectors by taking their first difference and centering them around a theoretical mean for null case. The other method is by detecting the maximum change in gradient at each point. These methods will be denoted by dav and dlm respectively.
vector with two elements, containing estimates of the index of corner
$dav: by average method. $dlm: by maximum gradient method.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
n = 50;m = 250;m0 = 20;
sigeff = 1;
Sigma <- 0.25*diag(m)
X <- datgen(n,m,m0,sigeff,Sigma = Sigma)
porder <- pboot.1sample(X=X,B=500,ncpus = 1)
out <- elbow(zvec = porder[1,])
out
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.