T-Test: Controlling for a 3rd Variable

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

T-Test: Controlling for a 3rd Variable

Chao yawo-2
Hello, I am running a basic T-test to estimate gender (varX) differences in income (varY).  However, I want to segregate the analysis by 3 separate racial groups.

At the moment, T-test only supports 1 variable on the groups command.  A longer way is to limit the analysis to each group (using select cases), and run the T-test repeatedly/separately.

Is there a different way to accomplish this in SPSS?

thanks, CY
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: T-Test: Controlling for a 3rd Variable

Rich Ulrich

Another way to get 3 t-tests is to sort the file and use SPLIT FILE -- you might prefer the layout this way.


A t-test is an alternate computation for the oneway ANOVA, applicable when there are just two groups.  The square

of the t-test value is equal to the corresponding F-test.  If you do a 3x2 ANOVA, you get the overall comparison

for your varX (gender); if you work for it, you could also get contrasts using the common denominator for tests.


--

Rich Ulrich



From: SPSSX(r) Discussion <[hidden email]> on behalf of Chao yawo <[hidden email]>
Sent: Friday, February 3, 2017 8:40 PM
To: [hidden email]
Subject: T-Test: Controlling for a 3rd Variable
 
Hello, I am running a basic T-test to estimate gender (varX) differences in income (varY).  However, I want to segregate the analysis by 3 separate racial groups.

At the moment, T-test only supports 1 variable on the groups command.  A longer way is to limit the analysis to each group (using select cases), and run the T-test repeatedly/separately.

Is there a different way to accomplish this in SPSS?

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: T-Test: Controlling for a 3rd Variable

Bruce Weaver
Administrator
Here's an example of the 3x2 ANOVA method Rich described.  It uses EMMEANS with the COMPARE option to get M vs F contrasts at each level of race.


* Modify path on next line.
GET FILE='C:\SPSSdata\survey_sample.sav'.

UNIANOVA age BY sex race
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(race*sex) COMPARE(sex) ADJ(LSD)
  /CRITERIA=ALPHA(.05)
  /DESIGN=sex race sex*race.

* See the last 3 tables in the output.
* Take the square root of the F-tests
* in the final table if you want to
* report as t-tests.


Rich Ulrich wrote
Another way to get 3 t-tests is to sort the file and use SPLIT FILE -- you might prefer the layout this way.


A t-test is an alternate computation for the oneway ANOVA, applicable when there are just two groups.  The square

of the t-test value is equal to the corresponding F-test.  If you do a 3x2 ANOVA, you get the overall comparison

for your varX (gender); if you work for it, you could also get contrasts using the common denominator for tests.


--

Rich Ulrich

________________________________
From: SPSSX(r) Discussion <[hidden email]> on behalf of Chao yawo <[hidden email]>
Sent: Friday, February 3, 2017 8:40 PM
To: [hidden email]
Subject: T-Test: Controlling for a 3rd Variable

Hello, I am running a basic T-test to estimate gender (varX) differences in income (varY).  However, I want to segregate the analysis by 3 separate racial groups.

At the moment, T-test only supports 1 variable on the groups command.  A longer way is to limit the analysis to each group (using select cases), and run the T-test repeatedly/separately.

Is there a different way to accomplish this in SPSS?


=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.