« Return to Thread: Save translate outfiles (excel) using a filter variable
Thanks ViAnn!
Excuse the GPL newbie question. I now get
a legend that repeats the line legends twice. The graph looks find, it’s just
the legent.
I have three lines, one for ed, office,
and outpatient. But the legend shows each of these twice. It’s a small issue. I
know that if I get rid of the points the duplicate line legends disappear. I’d
rather keep the points in the graph. How else can I change the legend that
seems to automatically appear. I don’ see it in the code.
Thanks
matt
Here’s the code:
GGRAPH
/GRAPHDATASET
NAME="graphdataset" VARIABLES=month_year ed_sum office_sum outpatient_sum
MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE:
s=userSource(id("graphdataset"))
DATA: month_year=col(source(s),
name("month_year"))
DATA: ed_sum=col(source(s),
name("ed_sum"))
DATA: office_sum=col(source(s),
name("office_sum"))
DATA: outpatient_sum=col(source(s),
name("outpatient_sum"))
TRANS:
month_year_ed_sum=eval("month_year - ed_sum")
TRANS:
month_year_office_sum=eval("month_year - office_sum")
TRANS: month_year_outpatient_sum=eval("month_year
- outpatient_sum")
ELEMENT:
point(position(month_year*ed_sum), color.exterior(month_year_ed_sum))
ELEMENT:
point(position(month_year*office_sum), color.exterior(month_year_office_sum))
ELEMENT: point(position(month_year*outpatient_sum),
color.exterior(month_year_outpatient_sum))
ELEMENT:
line(position(smooth.linear(month_year*ed_sum)),
color.interior(month_year_ed_sum))
ELEMENT:
line(position(smooth.linear(month_year*office_sum)),
color.interior(month_year_office_sum))
ELEMENT:
line(position(smooth.linear(month_year*outpatient_sum)),
color.interior(month_year_outpatient_sum))
END GPL.
Any help much appreciated!
Thanks
matt
Matthew Pirritano, Ph.D.
Research Analyst IV
Medical Services Initiative (MSI)
Orange County Health Care Agency
(714) 568-5648
From: ViAnn Beadle
[mailto:vab88011@...]
Sent: Thursday, July 09, 2009 5:25
AM
To:
Cc: SPSSX-L@...
Subject: Re: syntax for graph with
single consistent DV and multiple different IVs
Use the GGRAPH command. Specify all your variables in the GGRAPH part,
define them as data using in the GPL section. Specify a point element for each
pair and line element for each pair. Use the color or shape function to
distinguish the points in each pair. I suspect that there is a simple example
of a one pair in the GPL reference that you can start from to develop
your syntax.
Note, if you have lots of
cases, this chart is likely to look like a busy abstract painting and you might
think about just showing the regression lines without the points. In that case,
don't use the point element.
On Wed, Jul 8, 2009 at 7:33 PM,
I want to make a graph where the same DV is paired with
multiple different IVs. I know that I can do this in Graph with syntax like:
GRAPH
/SCATTERPLOT(OVERLAY)=month_year month_year month_year
WITH ed_1000 office_1000 outpatient_1000(PAIR)
/MISSING=LISTWISE.
But I need to be able to create separate regression lines for
all three relationships. It’s gotta be done in syntax because the process is to
be automated in python.
I know that IGRAPH can produce a regression line in syntax,
but can it produce three regression lines with three separate independent
variables?
Thanks
matt
Matthew Pirritano, Ph.D.
Research Analyst IV
Medical Services Initiative (MSI)
Orange County Health Care Agency
(714) 568-5648
« Return to Thread: Save translate outfiles (excel) using a filter variable
| Free embeddable forum powered by Nabble | Forum Help |