help > Command line and p-value for t-test
Showing 1-5 of 5 posts
Display:
Results per page:
Jan 4, 2015  10:01 PM |
Command line and p-value for t-test
Dear Andrew,

Your tools are very much appreciated: thank you.

I would like to ask two questions:

1 Regarding command line NBS. I'm having trouble using the command line to run NBS, that is, using NBSrun. It has something to do with the S variable. It seems that the S variable should be created when running NBS, but when I run NBSrun after having ran NBS, an error prints:

Undefined function or variable "S".
Error in NBSrun (line 255)
[msg,stop]=errorcheck(UI,DIMS,S);
Error in nbs_meta (line 37)
NBSrun(UI)

So S isn't being created, how do you recommend implementing NBSrun from the commandline? I looked in the reference manual and the NBSrun code but was unable to find the solution. I imagine this may be a very simple fix... ideas?

2 Regarding p-values and multiple comparisons. I see that when using the t-test Statistical Test the test is always one-sided (from pg. 22 in the manual). Thus, it makes sense to run the contrast in both directions if one does not have a priori hypotheses regarding directionality (i.e., [-1,1] and [1,-1]). With that said, it seems that we are now running two statistical tests, so should we correct for multiple comparisons across two tests or perhaps approach the p-value as if it is a two-sided test? For example, we could simply multiply the p-values by two from the two contrasts to make two-sided tests. Do you have advice on this?

Many thanks for your time and help, best,

Matthew
Apr 16, 2015  02:04 AM |
RE: Command line and p-value for t-test
Dear Andrew,

Did you happen to see the previous message in this chain? It would be great to get your thoughts.

Thank you
Apr 16, 2015  02:04 AM | Andrew Zalesky
RE: Command line and p-value for t-test
Hi Matt,

The S you refer to is simply a handle to the GUI. You should not have to worry about it at all if you are using the command line. You could try NBSrun(UI,[]), which means S=[], although this should not be necessary. Curious to know how this goes.

Regarding your 2nd question - yes, strictly speaking we should correct for the 2 multiple comparisons. You can do a two-sided test by selecting "F-test" and thereby avoid this problem. Your design matrix will be a bit different for an F-test - see the manual for details.

Andrew

Originally posted by :
Dear Andrew,

Your tools are very much appreciated: thank you.

I would like to ask two questions:

1 Regarding command line NBS. I'm having trouble using the command line to run NBS, that is, using NBSrun. It has something to do with the S variable. It seems that the S variable should be created when running NBS, but when I run NBSrun after having ran NBS, an error prints:

Undefined function or variable "S".
Error in NBSrun (line 255)
[msg,stop]=errorcheck(UI,DIMS,S);
Error in nbs_meta (line 37)
NBSrun(UI)

So S isn't being created, how do you recommend implementing NBSrun from the commandline? I looked in the reference manual and the NBSrun code but was unable to find the solution. I imagine this may be a very simple fix... ideas?

2 Regarding p-values and multiple comparisons. I see that when using the t-test Statistical Test the test is always one-sided (from pg. 22 in the manual). Thus, it makes sense to run the contrast in both directions if one does not have a priori hypotheses regarding directionality (i.e., [-1,1] and [1,-1]). With that said, it seems that we are now running two statistical tests, so should we correct for multiple comparisons across two tests or perhaps approach the p-value as if it is a two-sided test? For example, we could simply multiply the p-values by two from the two contrasts to make two-sided tests. Do you have advice on this?

Many thanks for your time and help, best,

Matthew
Apr 16, 2015  03:04 AM |
RE: Command line and p-value for t-test
Dear Andrew,

Thanks for your tip to use NBSrun(UI,[]), I'm no longer getting an error related to the S GUI handle. I also appreciate the suggestion to use an F-test for a two-sided test, thus avoiding multiple comparisons.

Thanks!
Jul 9, 2015  12:07 PM | Marie Miguel
RE: Command line and p-value for t-test
Glad to have signed up in this forum.  I scanned the topics and I know I will learn a lot.