LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 3 Jan 2008 10:19:32 -0700
Reply-To:     ViAnn Beadle <vab88011@gmail.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         ViAnn Beadle <vab88011@gmail.com>
Subject:      Re: Comparing Selected Cases with All Cases
Comments: To: "Dybdahl, Alf-Christian" <Alf-Christian.Dybdahl@laerdal.no>
In-Reply-To:  <D31520723288584FB72869E577C8360407D55FBE@nosrv003.laerdal.global>
Content-Type: text/plain; charset="us-ascii"

One way to do this is to create copies of the score questions except that the value is missing for the copy unless the case is one for Germany. It's fairly easy to get the case summary for both variables in a single table but a bit harder to get a nice clustered bar chart with clusters defined by Germany vs. All. This syntax assumes that you have one variable identifying the country and one score variable.

1. Case summaries. In this instance I've used CTABLES but you can also get summaries from DESCRIPTIVES and SUMMARIZE:

if (country eq 'Germany')gscore=score. variable labels gscore 'Score for Germany'. CTABLES /VLABELS VARIABLES=gscore score DISPLAY=DEFAULT /TABLE gscore [MEAN] + score [MEAN].

2a. Frequencies side by side. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=score[LEVEL=ORDINAL] gscore [LEVEL=ORDINAL] MISSING=VARIABLEWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: score=col(source(s), name("score"), unit.category()) DATA: gscore=col(source(s), name("gscore"), unit.category()) GUIDE: axis(dim(1), label("score")) GUIDE: axis(dim(2), label("Frequency")) SCALE: linear(dim(2), include(0)) ELEMENT: interval(position(summary.count(score/"Overall Score"+gscore/"Germany Score" )), shape.interior(shape.square)) END GPL.

2b. Clustered frequencies. This is best done by first restructuring so that you get two rows. The first row contains the value of the score variable in a new variable and the second row contains the value of the gscore variable in that same variable (which will be missing for all non-German rows). An index variable is then used to do the clustering. Note that VARSTOCASES will overwrite your active data file so make sure it is saved first before running. This syntax assumes that there is no unique case id:

VARSTOCASES /MAKE newscore FROM score gscore /INDEX=index "Germany vs. All"(2) /KEEP=country /NULL=KEEP. value labels index 1 "All" 2 "Germany".

To extend this to multiple variables use the Restructure wizard to create multiple variables corresponding to the score/gscore pair for each.

After restructuring you have a simple clustered bar chart that could be generated using Chart Builder:

GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=newscore[LEVEL=ORDINAL] COUNT()[name="COUNT"] index MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: newscore=col(source(s), name("newscore"), unit.category()) DATA: COUNT=col(source(s), name("COUNT")) DATA: index=col(source(s), name("index"), unit.category()) COORD: rect(dim(1,2), cluster(3,0)) GUIDE: axis(dim(3), label("newscore")) GUIDE: axis(dim(2), label("Count")) GUIDE: legend(aesthetic(aesthetic.color.interior), label("Germany vs. All")) SCALE: linear(dim(2), include(0)) ELEMENT: interval(position(index*COUNT*newscore), color.interior(index), shape.interior(shape.square)) END GPL.

You'll need a separate GGRAPH command for each score variable.

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Dybdahl, Alf-Christian Sent: Thursday, January 03, 2008 7:36 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: Comparing Selected Cases with All Cases

Hi!

Thanks for the reply!

I only want to run 2 simply analysises for now:

1. Case Summaries (showing the mean score - all questions are scores from 1 to 6) 2. Frequency analysis (graph).

Thank you Alf.Christian Dybdahl

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Art Kendall Sent: 3. januar 2008 14:43 To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: Comparing Selected Cases with All Cases

You most likely want to compare Germany to the other countries rather than having Germany on both sides of the comparison. First create a variable the represents that comparison of interest. Something like this.

compute mygroups = country eq 'Germany'. value labels mygroups 1 'Germany' 0 'other countries'.

A lot depends on your sample design. Are there already case weights in the data? etc. These are necessary to weight the cases,

My superficial guess would be that you would want to use the COMPLEX SAMPLES procedures.

A lot depends on the questions you want to ask of the data and the levels of measurement of the data.

You might do simple comparisons of percentages, t-tests, contingency tables, or more sophisticated models of the data such as categorical regression, discriminant function analysis, etc.

Art Kendall Social Research Consultants

Dybdahl, Alf-Christian wrote: > Dear all, > > Happy New Year! > I am using SPSS 15.0 for Windows. > > I have a file with responses from a survey from different countries > and departments. I want to run simple statistics on the results where I e.g. > create a report that shows the results for Germany compared with the > total scores. > > I am pretty new to SPSS and would greatly appreciate any help on how > to accomplish this. > > Thanks for your time. > > Best regards, > Alf-Christian Dybdahl > Laerdal Medical > > > =================== > 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 > > >

===================== 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

===================== 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

===================== 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


Back to: Top of message | Previous page | Main SPSSX-L page