Tuesday, April 2, 2019

Question about the hypothesized mean in a t-test

Dear all in Statalist,

I want to perform a t-test for a hypothesized mean of, for instance, +/-2. Is there way to do that without needing to perform the test for the positive and then for the negative value?

The following code is an example of what I am doing to test the hypothesis. I need combine the last two commands somehow to make Stata compare the obtained mean to the given limits (+/-2) instead of one value (2).
Code:
gen T3_Diff = T3_X - T3_Y
ttest T3_Diff == 2     
ttest T3_Diff == -2
I hope I'm clear enough.

No comments:

Post a Comment