How can I convert -log10 (p-value) to p-value?
1
6
Entering edit mode
5.8 years ago

Hello,

Example:

–log10 (p-value)= 11.28

p-value???

Can anyone help?

Thanks in advance.

Best regards,

p-value • 47k views
ADD COMMENT
10
Entering edit mode
5.8 years ago

Hi- The opposite of logarithm is exponentiation. So take the base of the logarithm (10 in your case) and exponentiate it to the result of the log. E.g. in R:

p<- 0.01
logp<- -log10(p) # = 2

# Undo log:
10^-logp # = 0.01

# And:
10^-11.28 # = 5.248075e-12
ADD COMMENT
0
Entering edit mode

Thank you for your reply,

Here: logp<- -log10(p) # = 2

What does the number 2 mean?

ADD REPLY
3
Entering edit mode

In my own words (don't take them too seriously), the log can be interpreted as how many times a value is greater or smaller than the baseline of 1. So for example, a log10 of 2 means 100 times more than the baseline while a log10 of -2 means 100 times smaller than the baseline. In fact, log(1) = 0 which means zero times greater (or smaller), i.e. no change irrespective of the base of the log. The base of the log tells you what the multiplier is. So, in base 10 a unit increase means "10 times more" while in base 2 means "2 times more".

P-values are sometimes logged because they can span several orders of magnitude and the log makes them easier to plot and interpret since the difference between the log of 0.1 and 0.01 looks the same as the difference between, say, 1e-10 and 1e-11. If you had to use the raw p-values the difference 1e-10 and 1e-11 would be invisible on a plot. The minus sign is used for convenience (I think) because it makes values positive and the bigger the value the smaller is the underlying p-value (= more significant).

Another reason for logging is to make calculations feasible on computers since operations on probabilities (like the likelihood) can generate numbers small enough that computers cannot represent them with sufficient precision. If you take the log, numbers increase or decrease slowly enough that you can represent them. I think here the keyword to google is "numeric overflow" or underflow.

ADD REPLY
0
Entering edit mode

The comment signifies that the result of the calculation is 2. I.e.:

-log10(0.01) = 2

That’s the negative logarithm, in base 10 of 0.01

ADD REPLY
0
Entering edit mode

Thank you so much for your reply.

ADD REPLY
0
Entering edit mode

naive question https://www.nature.com/articles/s41467-019-09234-6 metascape pathway enrichment they don't mention about the logp or log2 obtained ..if i have to convert them into just p value what do i need do ? do i need to use 2 instead of 10 or any suggestion and values like here in the question where he mentioned -log10 pvalue ..in metascape output it is just LogP and the values are in negative for example this

  Term             LogP 

   GO:0002027  -5.092674867

i found the base ..used

ADD REPLY

Login before adding your answer.

Traffic: 1518 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6