# display descriptives on graph Classic List Threaded 3 messages Open this post in threaded view
|

## display descriptives on graph

 hello all, for a range of values, is it possible to create a graph in spss displaying the mean, median, percentile points, i.e. like a graphical display of  a  table of results using a dot for the mean, a star for the median etc? I appreciate your help, thank you.
 Here is a quick example - are you sure you don't just want a box plot? `````` ******************************************************************************************. SET seed=943997. input program. loop a =1 to 100 by 1. end case. end loop. end file. end input program. dataset name sim. compute x = NORMAL(0.25). exe. GGRAPH /GRAPHDATASET NAME="sumdata" DATASET = 'sim' VARIABLES = GPTILE(x, 80)[NAME = "Per80"] GPTILE(x, 20)[NAME = "Per20"] MEAN(x)[NAME = "Mean_x"] /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: sumdata=userSource(id("sumdata")) DATA: Per80=col(source(sumdata), name("Per80")) DATA: Per20=col(source(sumdata), name("Per20")) DATA: Mean_x=col(source(sumdata), name("Mean_x")) TRANS: cat = eval(1) GUIDE: axis(dim(1), null()) GUIDE: axis(dim(2), label("Summary Stats")) SCALE: linear(dim(1), min(0), max(2)) ELEMENT: interval(position(cat*(Per20 + Per80)), color(color.grey), size(size."3")) ELEMENT: point(position(cat*Per80), color(color.red), size(size."15"), label("80th Percentile"), shape(shape.star)) ELEMENT: point(position(cat*Per20), color(color.blue), size(size."10"), label("20th Percentile"), shape(shape.star)) ELEMENT: point(position(cat*Mean_x), color(color.black), size(size."15"), label("Mean"), shape(shape.square)) END GPL. *Are you sure you don't just want a box plot?. compute cat = 1. variable level cat (nominal). EXAMINE VARIABLES=x BY cat /PLOT=BOXPLOT/STATISTICS=NONE/NOTOTAL. ******************************************************************************************. `````` Andy W apwheele@gmail.com http://andrewpwheeler.wordpress.com/