Syntax multiple plots with reference line calculated from variable

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

lightBV0
Posts: 1
Joined: Thu Feb 18, 2016 2:49 pm

Syntax multiple plots with reference line calculated from variable

Postby lightBV0 » Thu Feb 18, 2016 3:02 pm

I have a dataset with K subjects, all analyzed for L aspects, 2 parameters per aspect and the meanand difference of one of these 2 parameters.
Using

Code: Select all

Adding grid lines

Grid lines can be added on the guide statement.  If a vertical line is to be added, the value at which it is to be placed is given in parentheses.  If a horizontal line is desired, an asterisk is given first in the parentheses, followed by a comma and then the value.  We have used the color option to distinguish between the grid lines.

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=read write
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: read=col(source(s), name("read"))
DATA: write=col(source(s), name("write"))
GUIDE: form.line(position(*,60), color(color.red))
GUIDE: form.line(position(*, 65), color(color.green))
ELEMENT: point(position(read*write))
END GPL.
[taken from http://www.ats.ucla.edu/stat/spss/libra ... amples.htm]
I am able to create scatterplots with reference lines, but I would like to use a variable value in the dataset to replace the "60" or "65" in the code above. How can I do this???

Who is online

Users browsing this forum: No registered users and 2 guests

cron