On Sat, Aug 07, 2010 at 04:08:40PM -0400, josef.kar...@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/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.