Question: How convert q-value to p-value?
0
gravatar for star
4.8 years ago by
star260
Netherlands
star260 wrote:

I have a vector as below , I like to convert q-value to p-value (estimate p-value base on q-value).

data<-c(0.35,0.52,0.12,0.46)

I used below code for converting but I am not sure about it:(I take this code from here)

qvalues<-as.numeric(as.character(data))

convert.qval.pval = function(qvalues) {
    pi0 = max(qvalues)
    m0 = length(qvalues) * pi0
    return(qvalues * rank(qvalues) / m0)
}

qval_pval <- convert.qval.pval(qvalues)
qval_pval
[1] 0.33653846 1.00000000 0.05769231 0.66346154

Also, I like use "q-value" R package and but for this package I have to have a simulated or data-resampled (e.g., bootstrap, permutation) "null statistics", but I do not know how can I make it.

Code for converting using Q_value:

stat <- data
stat0 <- "creat using bootstar" ?!!!
p.testspecific <- empPvals(stat=state, stat0=stat0, pool=FALSE)
q-value R p-value • 3.1k views
ADD COMMENTlink modified 2.2 years ago by _r_am31k • written 4.8 years ago by star260

What is the question? you are not happy with the conversion or you want to use q-value package with your own data?

ADD REPLYlink written 4.7 years ago by Sukhdeep Singh10k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2190 users visited in the last hour