Hello, SPSS friends,
I'm trying to find a solution for this one - maybe somebody can help: I've got means for companies on three dimensions. I want to plot the companies as centroids within a 3d diagram with axes F01, F02, and F03. Companies should be represented by points which are connected to F01-F03 plane by a line - i.e. "balancing on a stilt". Any ideas with SPSS or R are welcome.
Here's the data:
DATA LIST FREE (" ")/company F01 F02 F03. BEGIN DATA 1 -0,10843674 0,203262369 0,01296737 2 -0,105096601 -0,025509327 -0,091137073 3 0,222312714 0,057440887 -0,117708879 4 0,667471767 -0,137292544 -0,252940788 5 -0,122125046 -0,44443488 0,148065611 6 0,461112382 -0,216526175 0,0626079 7 0,060317046 -0,357790726 -0,060617492 END DATA. EXE. VAR LAB company "Company". VAL LAB company 1 "A" 2 "B" 3 "C" 4 "D" 5 "E" 6 "F" 7 "G". VAR LAB F01 "Property 1". VAR LAB F02 "Property 2". VAR LAB F03 "Property 3".
Thanks for any help, Mario
Mario Giesel
Munich, Germany |
Unfortunately SPSS does not have a built in profile
graph to display the results of clustering, repeated measures,
etc. Parallel coordinate plots are almost the same except they
have different scales for each axis.
Below there are two sets of syntax the first does a profile chart it is a some syntax ViAnn helped me with. It does a profile with 14 dimensions. If this is what you are looking for you can just remove the extra 11 dimensions. The scales on the two sides are crowded. The second I just used chart builder to create a 3-D dot chart. One you run a graph you can do all kind of editing with the chart editor in the output window. Art Kendall Social Research Consultants data list list/ profile (f2) dim1 to dim14 (14f5.2). begin data. 1 .00 .00 .00 .02 .04 .23 .72 .52 .01 .00 .00 .25 .26 .19 2 .04 .03 .00 .03 .02 .14 .46 .35 .04 .00 1.00 .17 .26 .13 3 .01 .00 .00 .02 .02 .12 .00 .33 .03 .01 .12 .10 1.00 .55 4 .00 .01 .04 .03 .02 .40 .89 .00 .62 .52 .57 .25 .12 .12 5 .00 .00 .03 .07 .03 .43 1.00 1.00 .46 .40 .66 .11 .05 .04 6 .07 .00 .02 .09 .04 .43 .89 1.00 .52 .48 1.00 .98 .00 .04 7 .00 .00 .00 .00 .00 .00 .00 .00 .00 .01 .00 .00 .00 .00 8 .46 .38 .36 .53 .27 .64 .81 .76 .62 .59 .71 .59 .58 .59 end data. execute. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=profile dim1 to dim14 MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE TEMPLATE=[ "C:\Users\Vi\Desktop\test.sgt"]. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: dim1=col(source(s), name("dim1")) DATA: dim2=col(source(s), name("dim2")) DATA: dim3=col(source(s), name("dim3")) DATA: dim4=col(source(s), name("dim4")) DATA: dim5=col(source(s), name("dim5")) DATA: dim6=col(source(s), name("dim6")) DATA: dim7=col(source(s), name("dim7")) DATA: dim8=col(source(s), name("dim8")) DATA: dim9=col(source(s), name("dim9")) DATA: dim10=col(source(s), name("dim10")) DATA: dim11=col(source(s), name("dim11")) DATA: dim12=col(source(s), name("dim12")) DATA: dim13=col(source(s), name("dim13")) DATA: dim14=col(source(s), name("dim14")) DATA: profile=col(source(s), name("profile"), unit.category()) TRANS: caseid = index() COORD: parallel() SCALE: linear(dim(1), min(-.1), max(1.1)) SCALE: linear(dim(2), min(-.1), max(1.1)) SCALE: linear(dim(3), min(-.1), max(1.1)) SCALE: linear(dim(4), min(-.1), max(1.1)) SCALE: linear(dim(5), min(-.1), max(1.1)) SCALE: linear(dim(6), min(-.1), max(1.1)) SCALE: linear(dim(7), min(-.1), max(1.1)) SCALE: linear(dim(8), min(-.1), max(1.1)) SCALE: linear(dim(9), min(-.1), max(1.1)) SCALE: linear(dim(10), min(-.1), max(1.1)) SCALE: linear(dim(11), min(-.1), max(1.1)) SCALE: linear(dim(12), min(-.1), max(1.1)) SCALE: linear(dim(13), min(-.1), max(1.1)) SCALE: linear(dim(14), min(-.1), max(1.1)) GUIDE: legend(aesthetic(aesthetic.color), label("profile")) GUIDE: axis(dim(2), ticks(null())) GUIDE: axis(dim(3), ticks(null())) GUIDE: axis(dim(4), ticks(null())) GUIDE: axis(dim(5), ticks(null())) GUIDE: axis(dim(6), ticks(null())) GUIDE: axis(dim(7), ticks(null())) GUIDE: axis(dim(8), ticks(null())) GUIDE: axis(dim(9), ticks(null())) GUIDE: axis(dim(10), ticks(null())) GUIDE: axis(dim(11), ticks(null())) GUIDE: axis(dim(12), ticks(null())) GUIDE: axis(dim(13), ticks(null())) ELEMENT: line(position(dim1*dim2*dim3*dim4*dim5*dim6*dim7*dim7*dim9*dim10*dim11*dim12*dim13*dim14), split(caseid), color(profile), transparency(transparency.".5"),size(size."5px")) END GPL. ------------------------------ DATA LIST FREE (" ")/company F01 F02 F03. BEGIN DATA 1 -0.10843674 0.203262369 0.01296737 2 -0.105096601 -0.025509327 -0.091137073 3 0.222312714 0.057440887 -0.117708879 4 0.667471767 -0.137292544 -0.252940788 5 -0.122125046 -0.44443488 0.148065611 6 0.461112382 -0.216526175 0.0626079 7 0.060317046 -0.357790726 -0.060617492 END DATA. EXE. VAR LAB company "Company". VAL LAB company 1 "A" 2 "B" 3 "C" 4 "D" 5 "E" 6 "F" 7 "G". VAR LAB F01 "Property 1". VAR LAB F02 "Property 2". VAR LAB F03 "Property 3". * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=F01 F02 F03 MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: F01=col(source(s), name("F01")) DATA: F02=col(source(s), name("F02")) DATA: F03=col(source(s), name("F03")) COORD: rect(dim(1,2,3)) GUIDE: axis(dim(1), label("Property 3")) GUIDE: axis(dim(2), label("Property 1")) GUIDE: axis(dim(3), label("Property 2")) ELEMENT: point(position(F03*F01*F02)) END GPL. On 8/19/2011 1:55 PM, Mario Giesel wrote: ===================== 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 |
Estaré fuera de la oficina a partir del viernes 19 al 31 de Agosto, por temas de soporte técnico comunicarse con Eduardo Caro,
[hidden email], por temas de capacitación comunicarse con Carlos Padilla
[hidden email], otros temas favor contactar a
[hidden email]. fono oficina:+56.2.4153478 |
In reply to this post by Art Kendall
Parallel coordinates are now directly available
via the GraphBoard templates. You will see them listed in the Visualization
type control on the Detailed tab. GraphBoard generates the appropriate
GGRAPH syntax and does not require a special template such as the one (not)
included in Art's post.
Jon Peck (no "h") Senior Software Engineer, IBM [hidden email] new phone: 720-342-5621 From: Art Kendall <[hidden email]> To: [hidden email] Date: 08/20/2011 05:47 AM Subject: Re: [SPSSX-L] 3d plot of means Sent by: "SPSSX(r) Discussion" <[hidden email]> Unfortunately SPSS does not have a built in profile graph to display the results of clustering, repeated measures, etc. Parallel coordinate plots are almost the same except they have different scales for each axis. Below there are two sets of syntax the first does a profile chart it is a some syntax ViAnn helped me with. It does a profile with 14 dimensions. If this is what you are looking for you can just remove the extra 11 dimensions. The scales on the two sides are crowded. The second I just used chart builder to create a 3-D dot chart. One you run a graph you can do all kind of editing with the chart editor in the output window. Art Kendall Social Research Consultants
|
In reply to this post by Mario Giesel
GPL will draw the points and anchor the lines to the 0 point but will not render a plane transection the Y axis. It draws the floor of x*z at the minimum point of Y. Here’s my version: GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=F01 F02 F03 MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: F01=col(source(s), name("F01")) DATA: F02=col(source(s), name("F02")) DATA: F03=col(source(s), name("F03")) COORD: rect(dim(1,2,3)) SCALE: linear(dim(2), origin(0)) GUIDE: axis(dim(1), label("F03")) GUIDE: axis(dim(2), label("F01")) GUIDE: axis(dim(3), label("F02"), gridlines()) ELEMENT: interval(position(F03*F01*F02)) ELEMENT: point(position(F03*F01*F02), shape.interior(shape.square), size(size."5px"), color(color.black)) END GPL. From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mario Giesel Hello, SPSS friends, I'm trying to find a solution for this one - maybe somebody can help: I've got means for companies on three dimensions. I want to plot the companies as centroids within a 3d diagram with axes F01, F02, and F03. Companies should be represented by points which are connected to F01-F03 plane by a line - i.e. "balancing on a stilt". Any ideas with SPSS or R are welcome. Here's the data: DATA LIST FREE (" ")/company F01 F02 F03. BEGIN DATA 1 -0,10843674 0,203262369 0,01296737 2 -0,105096601 -0,025509327 -0,091137073 3 0,222312714 0,057440887 -0,117708879 4 0,667471767 -0,137292544 -0,252940788 5 -0,122125046 -0,44443488 0,148065611 6 0,461112382 -0,216526175 0,0626079 7 0,060317046 -0,357790726 -0,060617492 END DATA. EXE. VAR LAB company "Company". VAL LAB company 1 "A" 2 "B" 3 "C" 4 "D" 5 "E" 6 "F" 7 "G". VAR LAB F01 "Property 1". VAR LAB F02 "Property 2". VAR LAB F03 "Property 3". Thanks for any help, Mario |
In reply to this post by Jon K Peck
I forgot to mention that you can workaround to get a profile chart by including extra profiles and using
parallel coordinates plot.
1 extra profile has all values at the max you wish for all scales, e.g., 3.5 for z-scores, 100 for percents and percentiles, n for n tiles. etc. 1 extra profile has all values at the min you wish for all scales, e.g., - 3.5 for z-scores, zero for percents. and 1 for percentiles an other n tiles, etc. perhaps some reference lines e.g., for z-scores (-3,-2,-1,0,1,2,3), for percents and percentiles (5, 10,25, 50, 75, 90, 95) etc. Then you can use the chart editor to make the reference frame all one color/pattern. Art Kendall Social Research Consultants On 8/20/2011 10:10 AM, Jon K Peck wrote: Parallel coordinates are now directly available via the GraphBoard templates. You will see them listed in the Visualization type control on the Detailed tab. GraphBoard generates the appropriate GGRAPH syntax and does not require a special template such as the one (not) included in Art's post.===================== 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 |
Free forum by Nabble | Edit this page |