Date: Mon, 8 Nov 2010 14:19:00 -0700
Reply-To: Jon K Peck <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Jon K Peck <email@example.com>
Subject: Re: comparing groups in two different datasets
Or, for t tests you can use the SPSSINC SUMMARY TTEST extension command,
which also has a dialog box interface. The command and its required
Python programmability plugin can be downloaded from SPSS Developer
Senior Software Engineer, IBM
From: Bruce Weaver <firstname.lastname@example.org>
Date: 11/08/2010 01:56 PM
Subject: Re: [SPSSX-L] comparing groups in two different datasets
Sent by: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
For continuous variables, I assume you want to use a t-test. If you have
mean, SD and N for each group, you can perform a one-way ANOVA (with the
ONEWAY procedure), using a matrix data file as input. E.g.,
MATRIX DATA VARIABLES=Group ROWTYPE_ Score /FACTORS=Group.
1 N 56
2 N 71
1 MEAN 22.98
2 MEAN 25.78
1 STDDEV 8.79
2 STDDEV 9.08
ONEWAY Score BY Group /matrix in(*) .
If you want to report it as a t-test, t = SQRT(F).
For categorical variables, I assume you want a chi-square test of
association. Again, all you need is the cell counts for the contingency
table. The trick is to use WEIGHT CASES. Here's an example where the
demographic variable has 3 levels. If you have only 2 levels, delete the
rows with DEMOGVAR = 3. If you have more levels, add more rows as needed.
And obviously, replace the CELL_COUNT values with the ones from your
DATA LIST LIST /demogvar (f2.0) group (f2.0) cell_count (f5.0) .
1 1 9
2 1 17
3 1 22
1 2 21
2 2 13
3 2 8
weight by cell_count. /* This is the key line .
crosstabs demogvar by group /cells = count exp /stat = chisq.
J McClure wrote:
> I want to compare demographic variables for veterans in my 4 month study
> sample with demographic data from the VA for all veterans who attended
> the emergency clinic for the month after my study ended. I have the
> mean age, proportion of males etc for bot the study sample and for all
> veterans but don't know how to do a statistical test looking for
> significant differences.
> Thanks for any help.
> To manage your subscription to SPSSX-L, send a message to
> LISTSERV@LISTSERV.UGA.EDU (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
"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.
View this message in context:
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
For a list of commands to manage subscriptions, send the command