For the top hits from an R program, I was getting all zero p-values, which are not that useful for ranking or plotting.
Turns out that the R program was calculating the p-value in this manner:
1 - pchisq(71.12830,1)
But, according to the discussion here, in R
".Machine$double.eps is the smallest number such that 1+x can be distinguished from 1"
On my machine, we have that:
> .Machine$double.eps
[1] 2.220446e-16
So that is why this truncates to zero:
> 1 - pchisq(71.12830,1)
[1] 0
However, we can get a non-zero p-value if instead we compute it this way:
> pchisq(71.12830,1,lower.tail=FALSE)
[1] 3.347341e-17
Dr. Weeks is a Professor of Human Genetics and Biostatistics at the University of Pittsburgh. His research focuses on statistical human genetics in the area of mapping susceptibility loci involved in complex human diseases. The content on this blog is for informational purposes only - use at your own risk!
Wednesday, August 14, 2013
Tuesday, October 23, 2012
knitr
I recently became aware of the kintr package http://yihui.name/knitr/ which is much more capable and easier to use than Sweave when creating dynamic 'reproducible research' reports that interweave LaTeX and R.
Monday, October 22, 2012
Quertle http://www.quertle.info/
I learned today about an amazing new program for searching the PubMed literature database plus full text documents - this is called 'Quertle' http://www.quertle.info/
I tried it out and quickly found an important and relevant paper that we hadn't found in an earlier more extensive conventional literature search.
I tried it out and quickly found an important and relevant paper that we hadn't found in an earlier more extensive conventional literature search.
Tuesday, October 18, 2011
Your genetic profile
Craig Venter said, in response to a question about the 'risks' of knowing one's genetic makeup:
"Understanding the genetic code is understanding probabilities. There is very little in your code that is yes/no."
"Understanding the genetic code is understanding probabilities. There is very little in your code that is yes/no."
Monday, October 17, 2011
Hazards of Having Good Students in your Introductory Statistics Class
This paper "Hazards of Having Good Students in your Introductory Statistics Class" by Trivellore Raghunathan about the meaning of confidence intervals and p-values is well-written and entertaining.
The meaning of p-values
Regarding p-values, Paul Meehl said something along the lines of "a p-value answers a question we shouldn't ask about a topic we aren't interested in".
Subscribe to:
Posts (Atom)
