|
Of course you can do this with GPL.
DATA LIST FREE/Group Gluc Triglic.
BEGIN DATA
1 5.17 1.51 1 5.25 1.64 1 5.31 1.59 1 4.58 1.52 1 5.56 1.64
1 5.15 1.35 1 5.33 1.68 1 5.29 1.30 1 5.01 1.91 1 5.88 1.30
2 4.92 1.32 2 4.71 1.41 2 4.79 1.24 2 4.04 1.24 2 4.82 1.39
2 4.41 1.32 2 4.89 1.36 2 4.60 1.33 2 4.75 1.20 2 5.33 1.41
2 4.67 1.18 2 4.08 1.37 2 5.19 1.28 2 4.77 1.05 2 4.94 0.99
2 4.65 1.31 2 4.76 1.29 2 5.33 1.20 2 4.70 1.18 2 5.02 1.13
END DATA.
VALUE LABEL Group 1 'Control' 2' Treated'.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=MEANSD(Gluc)[NAME="MEAN_Gluc" LOW="MEAN_Gluc_LOW" HIGH="MEAN_Gluc_HIGH"]
MEANSD(Triglic)[NAME="MEAN_Triglic" LOW="MEAN_Triglic_LOW" HIGH="MEAN_Triglic_HIGH"]
Group MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: MEAN_Gluc=col(source(s), name("MEAN_Gluc"))
DATA: LOW_Gluc=col(source(s), name("MEAN_Gluc_LOW"))
DATA: HIGH_Gluc=col(source(s), name("MEAN_Gluc_HIGH"))
DATA: MEAN_Triglic=col(source(s), name("MEAN_Triglic"))
DATA: LOW_Triglic=col(source(s), name("MEAN_Triglic_LOW"))
DATA: HIGH_Triglic=col(source(s), name("MEAN_Triglic_HIGH"))
DATA: Group=col(source(s), name("Group"), unit.category())
GUIDE: axis(dim(1), label("Glucose levels"))
GUIDE: axis(dim(2), label("Triglic"))
GUIDE: legend(aesthetic(aesthetic.color.exterior))
ELEMENT: point(position(MEAN_Gluc*MEAN_Triglic), color.exterior(Group))
ELEMENT: edge(position(MEAN_Gluc*(LOW_Triglic+HIGH_Triglic)), color.interior(Group))
ELEMENT: edge(position((LOW_Gluc+HIGH_Gluc)*MEAN_Triglic), color.interior(Group)) END GPL.
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Marta GarcĂa-Granero
Sent: Monday, May 28, 2007 10:12 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: [SPSSX-L] Bidimensional HILO graph with SPSS?
Hi everybody
I'm interested in creating a "centroids" plot (created with a veeeery
old program - it used to run in Windows 3.1 - called Grafit). Since my
original posting (with a bitmap of the graph) was rejected (due to the
attachment), here it goes a pathetic ASCII-art imitation (should be
viewed with courier font):
Triglic. -
| |
| |
| - |------*------|
| | |
| | |
| | -
| |----O----|
| |
| |
| |
| -
|------------------------------
Glucose levels
The circle&asterisc represent the mean of both variables (glucose and
triglycerids) in two groups: treated (O) and control (*). The error
bars are the SD of both variables in each group.
Right now, the process I have to follow is this one:
- I get mean&standard deviation (using any descriptive procedure or
aggregate) for both variables&groups
- I copy the results and paste then in Grafit data windows
- I create the graph, add manually the error bars, modify the axis
and some other settings...
- I copy the graph and paste it in Powerpoint (or Word), convert it to
Microsoft graph, ungroup all the elments, modify some details (like
making one of the circles solid and the other hollow...) and regroup
everything together again.
Then I start all over again with the next couple of variables I want
to graph (sssslow and booooring task).
Obvious question: can this task be done (either with raw or summarized
data) using SPSS graphs (legacy, Igraphs or SPSS 15 GPL)?
I have already taken a look at the GPL Reference Guide, but I found no
inspiration.
This is syntax to generate the datasets (both with raw or summarized
data).
* Raw data *.
DATA LIST FREE/Group Gluc Triglic.
BEGIN DATA
1 5.17 1.51 1 5.25 1.64 1 5.31 1.59 1 4.58 1.52 1 5.56 1.64
1 5.15 1.35 1 5.33 1.68 1 5.29 1.30 1 5.01 1.91 1 5.88 1.30
2 4.92 1.32 2 4.71 1.41 2 4.79 1.24 2 4.04 1.24 2 4.82 1.39
2 4.41 1.32 2 4.89 1.36 2 4.60 1.33 2 4.75 1.20 2 5.33 1.41
2 4.67 1.18 2 4.08 1.37 2 5.19 1.28 2 4.77 1.05 2 4.94 0.99
2 4.65 1.31 2 4.76 1.29 2 5.33 1.20 2 4.70 1.18 2 5.02 1.13
END DATA.
VALUE LABEL Group 1 'Control' 2' Treated'.
* Summarized *.
AGGREGATE
/OUTFILE=*
/BREAK=Group
/Gluc_mean = MEAN(Gluc)
/Gluc_sd = SD(Gluc)
/Triglic_mean = MEAN(Triglic)
/Triglic_sd = SD(Triglic).
If it can be done I'd appreciate any hint you could provide (I don't
need the full polished-flawless syntax, I don't mind working a bit on
the problem, it's burning my eyelashes for nothing that bothers me).
Thanks a lot.
Surviving monday arrival as best as I can,
Marta
|