**220**wrote:

**20**• written 16.5 years ago by Park, Richard •

**220**

Question: mt.teststat

0

Park, Richard • **220** wrote:

Hello Everyone,
I was wondering if anyone could interpret the raw p-values calculated
using mt.teststat() (this function is part of the multtest package). I
am using the following lines:
## To Calculate two-sided unequal variance t test values ##
teststat <- mt.teststat(compSet, label, test="t", nonpara="n")
rawp <- 2 * (1-pnorm(abs(teststat)))
I am keeping track of the rawp values between all possible comparisons
of samples.
However, I have not been able to completely decipher the values that
are coming out of this combination.
Example:
WT = 58.286, 48.842, 51.108
KO = 7.486, 6.373, 7.899
The p value calculated using
"test_t.test(x[k,],xr[k,],paired=F,var.equal=F)" is 0.003219981, which
is the same value that is calculated using the t.test within Excel.
Mt.teststat() produces a value of 0.00000000 (basically 0, I'm not
sure if it is lack of precision?). Does anyone understand why the
pvalue generated from mt.teststat() is so much smaller than the
traditional t.test() and what this means?
Thank you,
Richard Park
Computational Data Analyzer
Joslin Diabetes Center

ADD COMMENT
• link
•
modified 3.8 years ago
by
Smeeta Shrestha • **20**
•
written
16.5 years ago by
Park, Richard • **220**

Answer: mt.teststat

0

Wolfgang Huber ♦ **13k** wrote:

On Tue, 8 Apr 2003, Park, Richard wrote:
> I was wondering if anyone could interpret the raw p-values
calculated
> using mt.teststat() (this function is part of the multtest package).
I
> am using the following lines:
>
> teststat <- mt.teststat(compSet, label, test="t", nonpara="n")
> rawp <- 2 * (1-pnorm(abs(teststat)))
Hi Richard,
mt.teststat is fine. You need to use the "pt" function and not "pnorm"
if
you want to calculate the p-value of a t-test from the t-statistic.
Also,
in order to compare it to the result of ctest::t.test, there you'll
have
to use var.equal=TRUE.
Best regards
Wolfgang

Hi Wolfgang,

Could you please elaborate the earlier email .

> teststat <- mt.teststat(compSet, label, test="t", nonpara="n")

> rawp <- 2 * (1-pt(abs(teststat)))

Do i need to include a df .

For my study I have 12 pre and 12 post samples. (n=24)

file 1 0

file 2 1

file 3 0

file 4 1

file 5 0

file 6 1

I used this for classlabel and the data frame .

I am using the function :

Results <- mt.teststat(X,classlabel,test="wilcoxon")

my script

Results <- mt.teststat(X,classlabel,test="wilcoxon")

rawp.test <- 2 * (1-pt(abs(Results),df=23))

procedures = c("Bonferroni", "Hochberg", "BH")

adjusted = mt.rawp2adjp(rawp.pnorm, procedures)

adjusted$adjp[1:10, ]

Could you please advice if the syntax is correct. I am not sure where I can put the factors you mentioned in the earlier mail above.

ctest::t.test

var.equal=TRUE.

Thank you

smeeta

Please log in to add an answer.

Use of this site constitutes acceptance of our User
Agreement
and Privacy
Policy.

Powered by Biostar
version 16.09

Traffic: 289 users visited in the last hour