A question related to converting p values to -log p
2
0
Entering edit mode
@li-aiguo-nihnci-828
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20071010/ 766b4d71/attachment.pl
• 1.7k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 5 hours ago
United States
Did you try -log(p)? This should work provided the zeros you report below aren't really zero. Best, Jim Li, Aiguo (NIH/NCI) [C] wrote: > Dear all, > > > > I have a list of p values as below and would like to convert it into > minus log p. How should I do it in R? > > > > Thanks in advance, > > > > AG Lee > > > > 0 > > 0.069805 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0.176752 > > 0.049759 > > 0.143271 > > 0.122581 > > 0.012448 > > 0.037795 > > 0 > > 0.004878 > > 0.319481 > > 0.07681 > > 0.106322 > > 0.005626 > > 0.852804 > > 0.011966 > > 0.197347 > > 0.081081 > > 0.809278 > > 0.012658 > > 0.190164 > > 0.010417 > > 0.242424 > > 0.003454 > > 0.211268 > > 0.257426 > > 0.287611 > > 0.455696 > > 0 > > 0.822715 > > 0.692568 > > 0.141827 > > 0.053435 > > 0.211744 > > 0.002809 > > 0 > > 0.897356 > > 0.052373 > > 0.077544 > > 0.015652 > > 0 > > 0.115321 > > 0.415888 > > 0 > > 0.854914 > > 0 > > 0.173913 > > 0.926509 > > 0.007704 > > 0.144578 > > 0.071186 > > 0 > > 0.343849 > > 0.545757 > > 0 > > 0.09913 > > 0.056106 > > 0.088586 > > 0.942356 > > 0.249117 > > 0 > > 0.438356 > > 0.673736 > > 0.017857 > > 0.22973 > > 0.203306 > > 0.027553 > > 0.872822 > > 0.387987 > > 0.11324 > > 0.033762 > > 0.106796 > > 0.219585 > > 0 > > 0.365052 > > 0.03405 > > 0.261111 > > 0.913559 > > 0.017945 > > 0.004951 > > 0 > > 0.015038 > > 0.066884 > > 0.138748 > > 0.213287 > > 0.01071 > > 0.028668 > > 0.115587 > > 0.830846 > > 0.015152 > > 0.71 > > 0 > > 0.060606 > > 0.190554 > > 0.156627 > > 0.00821 > > 0.031949 > > 0.866005 > > 0.00361 > > 0.008562 > > 0.340836 > > 0.02916 > > 0.46677 > > 0.328205 > > 0.049404 > > 0.588618 > > 0.008902 > > 0.614238 > > 0.612795 > > 0.155673 > > 0.003077 > > 0.633157 > > 0.685864 > > 0.54321 > > 0.015437 > > 0.014085 > > 0.983452 > > 0 > > 0.72758 > > 0.407718 > > 0.153199 > > 0.528875 > > 0.563679 > > 0 > > 0.056899 > > 0.073552 > > 0.476271 > > 0.126904 > > 0.003115 > > 0.268608 > > 0.571207 > > 0.02139 > > 0.135987 > > 0.037705 > > 0.005076 > > 0.017268 > > 0.269663 > > 0.00846 > > 0.095638 > > 0.00624 > > 0.817708 > > 0.801038 > > 0.343333 > > 0.641538 > > 0 > > 0.011349 > > 0.005181 > > 0.098361 > > 0.048991 > > 0.017301 > > 0.306733 > > 0.222222 > > 0.327243 > > 0.001504 > > 0.004666 > > 0.015912 > > 0 > > 0.312 > > 0.046823 > > 0.076299 > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD COMMENT
0
Entering edit mode
@morten-mattingsdal-1907
Last seen 10.2 years ago
Hi, Paste the following code, and the -log values is in the object "logged"... paste all the below code: AGLee <- scan(nlines=167,what=list(0)) 0 0.069805 0 0 0 0 0 0 0 0.176752 0.049759 0.143271 0.122581 0.012448 0.037795 0 0.004878 0.319481 0.07681 0.106322 0.005626 0.852804 0.011966 0.197347 0.081081 0.809278 0.012658 0.190164 0.010417 0.242424 0.003454 0.211268 0.257426 0.287611 0.455696 0 0.822715 0.692568 0.141827 0.053435 0.211744 0.002809 0 0.897356 0.052373 0.077544 0.015652 0 0.115321 0.415888 0 0.854914 0 0.173913 0.926509 0.007704 0.144578 0.071186 0 0.343849 0.545757 0 0.09913 0.056106 0.088586 0.942356 0.249117 0 0.438356 0.673736 0.017857 0.22973 0.203306 0.027553 0.872822 0.387987 0.11324 0.033762 0.106796 0.219585 0 0.365052 0.03405 0.261111 0.913559 0.017945 0.004951 0 0.015038 0.066884 0.138748 0.213287 0.01071 0.028668 0.115587 0.830846 0.015152 0.71 0 0.060606 0.190554 0.156627 0.00821 0.031949 0.866005 0.00361 0.008562 0.340836 0.02916 0.46677 0.328205 0.049404 0.588618 0.008902 0.614238 0.612795 0.155673 0.003077 0.633157 0.685864 0.54321 0.015437 0.014085 0.983452 0 0.72758 0.407718 0.153199 0.528875 0.563679 0 0.056899 0.073552 0.476271 0.126904 0.003115 0.268608 0.571207 0.02139 0.135987 0.037705 0.005076 0.017268 0.269663 0.00846 0.095638 0.00624 0.817708 0.801038 0.343333 0.641538 0 0.011349 0.005181 0.098361 0.048991 0.017301 0.306733 0.222222 0.327243 0.001504 0.004666 0.015912 0 0.312 0.046823 0.076299 aglee=as.data.frame(AGLee) logged=-log(aglee) print("Bioconductor is King") > Dear all, > > > > I have a list of p values as below and would like to convert it into > minus log p. How should I do it in R? > > > > Thanks in advance, > > > > AG Lee > > > > 0 > > 0.069805 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0.176752 > > 0.049759 > > 0.143271 > > 0.122581 > > 0.012448 > > 0.037795 > > 0 > > 0.004878 > > 0.319481 > > 0.07681 > > 0.106322 > > 0.005626 > > 0.852804 > > 0.011966 > > 0.197347 > > 0.081081 > > 0.809278 > > 0.012658 > > 0.190164 > > 0.010417 > > 0.242424 > > 0.003454 > > 0.211268 > > 0.257426 > > 0.287611 > > 0.455696 > > 0 > > 0.822715 > > 0.692568 > > 0.141827 > > 0.053435 > > 0.211744 > > 0.002809 > > 0 > > 0.897356 > > 0.052373 > > 0.077544 > > 0.015652 > > 0 > > 0.115321 > > 0.415888 > > 0 > > 0.854914 > > 0 > > 0.173913 > > 0.926509 > > 0.007704 > > 0.144578 > > 0.071186 > > 0 > > 0.343849 > > 0.545757 > > 0 > > 0.09913 > > 0.056106 > > 0.088586 > > 0.942356 > > 0.249117 > > 0 > > 0.438356 > > 0.673736 > > 0.017857 > > 0.22973 > > 0.203306 > > 0.027553 > > 0.872822 > > 0.387987 > > 0.11324 > > 0.033762 > > 0.106796 > > 0.219585 > > 0 > > 0.365052 > > 0.03405 > > 0.261111 > > 0.913559 > > 0.017945 > > 0.004951 > > 0 > > 0.015038 > > 0.066884 > > 0.138748 > > 0.213287 > > 0.01071 > > 0.028668 > > 0.115587 > > 0.830846 > > 0.015152 > > 0.71 > > 0 > > 0.060606 > > 0.190554 > > 0.156627 > > 0.00821 > > 0.031949 > > 0.866005 > > 0.00361 > > 0.008562 > > 0.340836 > > 0.02916 > > 0.46677 > > 0.328205 > > 0.049404 > > 0.588618 > > 0.008902 > > 0.614238 > > 0.612795 > > 0.155673 > > 0.003077 > > 0.633157 > > 0.685864 > > 0.54321 > > 0.015437 > > 0.014085 > > 0.983452 > > 0 > > 0.72758 > > 0.407718 > > 0.153199 > > 0.528875 > > 0.563679 > > 0 > > 0.056899 > > 0.073552 > > 0.476271 > > 0.126904 > > 0.003115 > > 0.268608 > > 0.571207 > > 0.02139 > > 0.135987 > > 0.037705 > > 0.005076 > > 0.017268 > > 0.269663 > > 0.00846 > > 0.095638 > > 0.00624 > > 0.817708 > > 0.801038 > > 0.343333 > > 0.641538 > > 0 > > 0.011349 > > 0.005181 > > 0.098361 > > 0.048991 > > 0.017301 > > 0.306733 > > 0.222222 > > 0.327243 > > 0.001504 > > 0.004666 > > 0.015912 > > 0 > > 0.312 > > 0.046823 > > 0.076299 > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > > . > >
ADD COMMENT

Login before adding your answer.

Traffic: 669 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