calculating p-values September 28, 2012, 04:56:20 PM Hello,I am trying to go through the output in Excel and adjust for features in which one or more of the spectra had a zero for an ion count. After removing these points, I can recalculate the tstat using Welch's t-test but this should alter the p-value. Could somebody tell me how the p-values are computed from the tstat? Thanks,Andrew Quote Selected
Re: calculating p-values Reply #1 – October 03, 2012, 02:50:20 PM In R or in Excel?In R, the t.test function will return the p-value directly, seeCode: [Select]?t.testIn XCMS t-statistics are calculated using the function mt.teststat (library multtest)and p-values are calculated from that using the function pval, seeCode: [Select]library(xcms)?pval Quote Selected
Re: calculating p-values Reply #2 – October 05, 2012, 01:22:41 PM Thanks,I was trying to calculate the p-value of the Welch's t-test in Excel. I was confused by the degrees of freedom calculation but have figured it out. The result is a non-integer value for df. The Excel function t.dist.2t truncates the df to an integer. However, the p-value can be successfully calculated with the Excel t.test function by selecting the arrays of feature intensities which then calculates and uses the correct non-integer degrees of freedom. By doing so, I could replace the existing pvalue column with the t.test function. Now feature with "0" intensity can be removed and left blank and the is p-value recalculated. I'm still working on learning the same manipulations in R. Thanks for the help.Andrew Quote Selected