At 06:15 PM 1/14/2004 -0600, Scott Merryman wrote:
Isn't this just calculating the difference and then using -ttest diff
= #-
Example:
. sysuse auto
(1978 Automobile Data)
. gen diff = disp - length
. ttest diff = 10
That should work, and is more straightforward than what I tossed out
before. A matched pairs problem can be converted into a single sample
t-test problem in this way.
One thing that occurs to me: Scott and I both interpreted this as a
matched pairs problem. But, if the original author meant "diff" to
stand for the difference between 2 group means (i.e. an independent
samples t-test) rather than the difference between the means of two
variables (matched pairs) then neither Scott's nor my approach is
right. So, if you hypothesized that group 1's mean was 10 points
higher than group 2's, you'd do something like gen score2 = score
replace score2 = score2-10 if group==1
ttest score2, by(group)
-------------------------------------------
Richard Williams, Associate Professor
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
=============================================
I am not sure that I get the issue correctly, having missed the original
thread.