[R] basic question about t-test with adjusted p value
Philipp Pagel
p.pagel at wzw.tum.de
Sat Aug 7 22:17:23 CEST 2010
On Sat, Aug 07, 2010 at 04:08:40PM -0400, Josef.Kardos at phila.gov wrote:
> I have read the R manual and help archives, sorry but I'm still stuck.
>
> How would I do a t-test with an adjusted p-value?
>
> Suppose that I use t.test ( ) , with the function argument alternative =
> "two.sided", and data such that degrees of freedom = 20. The function
> calculates a t-statistic of 2.086, and p-value =0.05
>
> How do I then adjust the p-value? My thought is to do
> p.adjust (pt(2.086, df=20),"BH")
> but that doesn't change anything (returns 0.975)
>
> what is the procedure? I'm sorry if there is a basic concept that I am
> missing here...
I'm confused - what result where you expecting? p.adjust will need to
know the number of test you are trying to adjust for - either by
giving explicitly giving the number or by handing a vector of p-values
to the function.
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
Maximus-von-Imhof-Forum 3
85354 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/
More information about the R-help
mailing list