Multiple line plots

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple line plots

Valerie Seagroatt
I am trying to plot out trends in rates by age group on one chart. I would like the x axis to be year and rates plotted for each age group. It seems to me that should be simple but cant seem to get the right syntax.

My data file consists of variables year, age group and corresponding rate. I tried using multiple line in Graph  -  in help it says

MULTIPLE  Multiple line chart. A multiple line chart is defined by a single function and two BY variables or by multiple functions and a single BY variable.

I would have thought that the first should apply ie single function - the value of rate - plotted by two variables year & age. Its quite happy when ask for just year (having first split the file by age)  but not when try to use two by variables: year and age (on the original unsplit file) ie

GRAPH
  /LINE (multiple) = value (rate) BY year by age .

Any suggestions would be welcome. Thank you.
Valerie

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple line plots

ViAnn Beadle
What is a case? Is it a value, a year, and an age with each row being a
unique combination of age and year?

The VALUE function assumes each row is multiple y values and one x value. A
statistical function allows two BY keywords--VALUE does not. If every row is
a unique combination, just use the default MEAN function and then change the
y axis title in the chart editor. Alternatively, use Chart Builder and
change the title in the Chart Builder properties for the Y axis.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Valerie Seagroatt
Sent: Monday, January 07, 2008 10:44 AM
To: [hidden email]
Subject: Multiple line plots

I am trying to plot out trends in rates by age group on one chart. I would
like the x axis to be year and rates plotted for each age group. It seems to
me that should be simple but cant seem to get the right syntax.

My data file consists of variables year, age group and corresponding rate. I
tried using multiple line in Graph  -  in help it says

MULTIPLE  Multiple line chart. A multiple line chart is defined by a single
function and two BY variables or by multiple functions and a single BY
variable.

I would have thought that the first should apply ie single function - the
value of rate - plotted by two variables year & age. Its quite happy when
ask for just year (having first split the file by age)  but not when try to
use two by variables: year and age (on the original unsplit file) ie

GRAPH
  /LINE (multiple) = value (rate) BY year by age .

Any suggestions would be welcome. Thank you.
Valerie

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
[hidden email] (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