help with graphics

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

help with graphics

Karen Soeken
I need to create spaghetti plots using PASW v. 18.  Is it possible to do? If so, how?
Reply | Threaded
Open this post in threaded view
|

Re: help with graphics

ViAnn Beadle

What’s a spaghetti plot? Can you point us to examples on the web?

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Karen Soeken
Sent: Friday, May 28, 2010 9:54 AM
To: [hidden email]
Subject: help with graphics

 

I need to create spaghetti plots using PASW v. 18.  Is it possible to do? If so, how?

Reply | Threaded
Open this post in threaded view
|

Re: help with graphics

Karen Soeken
It's a plot that looks like a bunch of spaghetti showing the data points for each subject across time.
----- Original Message -----
Sent: Friday, May 28, 2010 3:21 PM
Subject: RE: help with graphics

What’s a spaghetti plot? Can you point us to examples on the web?

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Karen Soeken
Sent: Friday, May 28, 2010 9:54 AM
To: [hidden email]
Subject: help with graphics

 

I need to create spaghetti plots using PASW v. 18.  Is it possible to do? If so, how?

Reply | Threaded
Open this post in threaded view
|

Re: help with graphics

Rick Oliver-3

If you search for "spaghetti plot" on Google, one of the hits appears to provide a way to use R with Statistics 18 to obtain a spaghetti plot.


From: Karen Soeken <[hidden email]>
To: [hidden email]
Date: 05/28/2010 02:44 PM
Subject: Re: help with graphics
Sent by: "SPSSX(r) Discussion" <[hidden email]>





It's a plot that looks like a bunch of spaghetti showing the data points for each subject across time.
----- Original Message -----
From: ViAnn Beadle
To: 'Karen Soeken' ; [hidden email]
Sent: Friday, May 28, 2010 3:21 PM
Subject: RE: help with graphics

What’s a spaghetti plot? Can you point us to examples on the web?
 
From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Karen Soeken
Sent:
Friday, May 28, 2010 9:54 AM
To:
[hidden email]
Subject:
help with graphics

 
I need to create spaghetti plots using PASW v. 18.  Is it possible to do? If so, how?

Reply | Threaded
Open this post in threaded view
|

Re: help with graphics

Art Kendall
In reply to this post by Karen Soeken
when you have the data file in SPSS, arrange it so that the time points are variables.
Then click <graphs> Graphboard template chooser> <detailed> <choose> <parallel> click on the icon to the right of the white edit box. (hovering over it will say "pick from the set of available variables). Select the variables you want to see.  click <paste> run that syntax.  let us know if that is what you want to see.  Note that this differs from an old fashioned profile plot in that the variables will be treated as if on different scales, and that individual cases not aggregated groups of cases will be shown.

just for purposes of this graph add a couple dummy cases to your data one where every time's variables has the highscore rounded e.g., to the next higher integer and
one where every time's variables has the lowscore rounded e.g., to the next lower integer.
you can get those tow values by adapting this syntax to your situation.
compute highscore = max(dim_1 to dim_3).
compute lowscore = min(dim_1 to dim_3).
formats highscore lowscore (f6.2).
descriptives variables = highscore lowscore/stats= min max.

then plug in numbers that are  the highscore rounded to the next higher integer, and lowscore rounded to the next lower integer.

Art Kendall
Social Research Consultants

On 5/28/2010 11:54 AM, Karen Soeken wrote:
I need to create spaghetti plots using PASW v. 18.  Is it possible to do? If so, how?
===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: help with graphics

Bruce Weaver
Administrator
In reply to this post by Rick Oliver-3
Is R necessary?  Can't one just restructure to a file with multiple rows per ID (if necessary), and use an ordinary line graph?  E.g., does this not do what the OP is asking for?


* Modify path to file if necessary .

GET FILE='C:\Program Files\SPSSInc\PASWStatistics17\Samples\testmarket.sav'.

* Note that the file has a LONG format -- i.e., there are
* multiple rows per Location ID (locid).  If your data file
* has one row per ID, you'll need to restructure it with
* VARSTOCASES.

* Now make a spaghetti plot .

* Via the GRAPH command (for us old-school types) .

GRAPH
  /LINE(MULTIPLE)=MEAN(sales) BY week BY locid.

* And now via the new-fangled Chart Builder .

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=week MEAN(sales)[name="MEAN_sales"] locid
    MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: week=col(source(s), name("week"), unit.category())
  DATA: MEAN_sales=col(source(s), name("MEAN_sales"))
  DATA: locid=col(source(s), name("locid"), unit.category())
  GUIDE: axis(dim(1), label("Week"))
  GUIDE: axis(dim(2), label("Mean Units sold in thousands"))
  GUIDE: legend(aesthetic(aesthetic.color.interior), label("Location ID"))
  SCALE: linear(dim(2), include(0))
  ELEMENT: line(position(week*MEAN_sales), color.interior(locid), missing.wings())
END GPL.



Rick Oliver wrote
If you search for "spaghetti plot" on Google, one of the hits appears to
provide a way to use R with Statistics 18 to obtain a spaghetti plot.



From:
Karen Soeken <ksoeken@tidalwave.net>
To:
SPSSX-L@LISTSERV.UGA.EDU
Date:
05/28/2010 02:44 PM
Subject:
Re: help with graphics
Sent by:
"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>



It's a plot that looks like a bunch of spaghetti showing the data points
for each subject across time.
----- Original Message -----
From: ViAnn Beadle
To: 'Karen Soeken' ; SPSSX-L@LISTSERV.UGA.EDU
Sent: Friday, May 28, 2010 3:21 PM
Subject: RE: help with graphics

What’s a spaghetti plot? Can you point us to examples on the web?
 
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Karen Soeken
Sent: Friday, May 28, 2010 9:54 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: help with graphics
 
I need to create spaghetti plots using PASW v. 18.  Is it possible to do?
If so, how?

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: help with graphics

ViAnn Beadle
Note that you don't have to use an aggregation function in GPL--select value as the statistic in the Chart Builder and you get no aggregation.

The more I think about it, the R example doesn't really produce a spaghetti chart because I have never seen multi-colored spaghetti. Rather than specifying the locid as a color attribute, it probably better to just use the split function instead to produce multiple black lines, one for each locid. That also dispenses with having to explicitly null out the legend since the R article doesn't include one.


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver
Sent: Friday, May 28, 2010 4:15 PM
To: [hidden email]
Subject: Re: help with graphics

Is R necessary?  Can't one just restructure to a file with multiple rows per ID (if necessary), and use an ordinary line graph?  E.g., does this not do what the OP is asking for?


* Modify path to file if necessary .

GET FILE='C:\Program Files\SPSSInc\PASWStatistics17\Samples\testmarket.sav'.

* Note that the file has a LONG format -- i.e., there are
* multiple rows per Location ID (locid).  If your data file
* has one row per ID, you'll need to restructure it with
* VARSTOCASES.

* Now make a spaghetti plot .

* Via the GRAPH command (for us old-school types) .

GRAPH
  /LINE(MULTIPLE)=MEAN(sales) BY week BY locid.

* And now via the new-fangled Chart Builder .

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=week MEAN(sales)[name="MEAN_sales"] locid
    MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: week=col(source(s), name("week"), unit.category())
  DATA: MEAN_sales=col(source(s), name("MEAN_sales"))
  DATA: locid=col(source(s), name("locid"), unit.category())
  GUIDE: axis(dim(1), label("Week"))
  GUIDE: axis(dim(2), label("Mean Units sold in thousands"))
  GUIDE: legend(aesthetic(aesthetic.color.interior), label("Location ID"))
  SCALE: linear(dim(2), include(0))
  ELEMENT: line(position(week*MEAN_sales), color.interior(locid),
missing.wings())
END GPL.




Rick Oliver wrote:

>
> If you search for "spaghetti plot" on Google, one of the hits appears
> to provide a way to use R with Statistics 18 to obtain a spaghetti plot.
>
>
>
> From:
> Karen Soeken <[hidden email]>
> To:
> [hidden email]
> Date:
> 05/28/2010 02:44 PM
> Subject:
> Re: help with graphics
> Sent by:
> "SPSSX(r) Discussion" <[hidden email]>
>
>
>
> It's a plot that looks like a bunch of spaghetti showing the data
> points for each subject across time.
> ----- Original Message -----
> From: ViAnn Beadle
> To: 'Karen Soeken' ; [hidden email]
> Sent: Friday, May 28, 2010 3:21 PM
> Subject: RE: help with graphics
>
> What’s a spaghetti plot? Can you point us to examples on the web?
>
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf
> Of Karen Soeken
> Sent: Friday, May 28, 2010 9:54 AM
> To: [hidden email]
> Subject: help with graphics
>
> I need to create spaghetti plots using PASW v. 18.  Is it possible to do?
> If so, how?
>
>
>
>


-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
View this message in context: http://old.nabble.com/help-with-graphics-tp28708648p28712469.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

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