Date: Mon, 8 Nov 2010 14:19:00 -0700
Reply-To: Jon K Peck <peck@us.ibm.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Jon K Peck <peck@us.ibm.com>
Subject: Re: comparing groups in two different datasets
In-Reply-To: <1289249527853-3255769.post@n5.nabble.com>
Content-Type: multipart/alternative;
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
Central, www.spss.com/devcentral.
HTH,
Jon Peck
Senior Software Engineer, IBM
peck@us.ibm.com
312-651-3435
From: Bruce Weaver <bruce.weaver@hotmail.com>
To: SPSSX-L@LISTSERV.UGA.EDU
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
the
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.
BEGIN DATA
1 N 56
2 N 71
1 MEAN 22.98
2 MEAN 25.78
1 STDDEV 8.79
2 STDDEV 9.08
END DATA.
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
table.
DATA LIST LIST /demogvar (f2.0) group (f2.0) cell_count (f5.0) .
BEGIN DATA.
1 1 9
2 1 17
3 1 22
1 2 21
2 2 13
3 2 8
END DATA.
weight by cell_count. /* This is the key line .
crosstabs demogvar by group /cells = count exp /stat = chisq.
HTH.
J McClure wrote:
>
> Hi,
> 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.
> Jan
>
> =====================
> 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
>
>
-----
--
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.
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/comparing-groups-in-two-different-datasets-tp3255523p3255769.html
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
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
[text/html]