Hi everyone,
I am new to this forum, but I hope that you can help me resolve an issue. I use SPSS infrequently, but mainly for producing frequencies where there is a single response (yes/no) to a question. Producing graphs using a script is dead easy, but when I want to do the same for a multi response question the built in graphs is horrible, and can't be edited. I came across a script for producing graphs from the help file in the form of: GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=$prob RESPONSES() /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: prob=col(source(s), name("$prob"), unit.category()) DATA: responses=col(source(s), name("RESPONSES")) GUIDE: axis(dim(1), label("Most Important Problems in Last 12 Months")) GUIDE: axis(dim(2), label("Responses")) ELEMENT: interval(position(prob*responses)) END GPL. The so called helpfile on SPSS is very, very silent on how this works, and what the graph will look like. I wonder if anyone has produced a graph using this method (just a small piece of data) that I could learn from, or if someone could help me get the most out of this. Thank you in advance, and I hope that I will be in a position to help someone one day. Ajamu Mutumwa Consultant Solon Community Network ------------------------------- Tel 020 7780 2220 Fax 020 7702 7381 Mobile 07990 510 518 Email [hidden email] <mailto:[hidden email]> Website www.solontp.org.uk <http://www.solontp.org.uk/> ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
I'm not sure what you mean by producing graphs using a script. When you say script are you referring to a SaxBasic script or SPSS macro? You also mention built in graphs. Which command are you talking about that produces built in graphs?
---------------------------------------------- This syntax produces a bar chart. It uses a multiple response group defined from a set of variables. Each variable contains a single response which is the value of something identified as most important. The respondents could have been asked to check as many problems as they want as being important. The bar chart has the problem items listed on the categorical axis and the height of the bar is the number of responses which identified that as important. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ajamu Mutumwa Sent: Thursday, September 28, 2006 10:00 AM To: [hidden email] Subject: Re: Multi response graphs Hi everyone, I am new to this forum, but I hope that you can help me resolve an issue. I use SPSS infrequently, but mainly for producing frequencies where there is a single response (yes/no) to a question. Producing graphs using a script is dead easy, but when I want to do the same for a multi response question the built in graphs is horrible, and can't be edited. I came across a script for producing graphs from the help file in the form of: GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=$prob RESPONSES() /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: prob=col(source(s), name("$prob"), unit.category()) DATA: responses=col(source(s), name("RESPONSES")) GUIDE: axis(dim(1), label("Most Important Problems in Last 12 Months")) GUIDE: axis(dim(2), label("Responses")) ELEMENT: interval(position(prob*responses)) END GPL. The so called helpfile on SPSS is very, very silent on how this works, and what the graph will look like. I wonder if anyone has produced a graph using this method (just a small piece of data) that I could learn from, or if someone could help me get the most out of this. Thank you in advance, and I hope that I will be in a position to help someone one day. Ajamu Mutumwa Consultant Solon Community Network ------------------------------- Tel 020 7780 2220 Fax 020 7702 7381 Mobile 07990 510 518 Email [hidden email] <mailto:[hidden email]> Website www.solontp.org.uk <http://www.solontp.org.uk/> ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
In reply to this post by Ajamu Mutumwa
Hi, Thanks for the response.
Response: I'm not sure what you mean by producing graphs using a script. Answer: When you produce a frequency you can run the following script to produce a graph. The script is as follows: FREQUENCIES VARIABLES= origin /ORDER= ANALYSIS . GRAPH /BAR(SIMPLE)=PCT BY origin . Response: When you say script are you referring to a SaxBasic script or SPSS macro? Answer: It is an SPSS syntax that I run. I assume that is an SPSS macro? No? Response: You also mention built in graphs. Which command are you talking about that produces built in graphs? Answer: I produce a table in the output. I then right mouse click that table to produce a graph. This by passes the chart builder, but the graph produced is horrible, and you can't edit it. I am trying to run a script similar to above, but related to multiple responses. The graph script will not run on a multi response frequency. ---------------------------------------------- This syntax produces a bar chart. It uses a multiple response group defined from a set of variables. Each variable contains a single response which is the value of something identified as most important. The respondents could have been asked to check as many problems as they want as being important. The bar chart has the problem items listed on the categorical axis and the height of the bar is the number of responses which identified that as important. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ajamu Mutumwa Sent: Thursday, September 28, 2006 10:00 AM To: [hidden email] Subject: Re: Multi response graphs Hi everyone, I am new to this forum, but I hope that you can help me resolve an issue. I use SPSS infrequently, but mainly for producing frequencies where there is a single response (yes/no) to a question. Producing graphs using a script is dead easy, but when I want to do the same for a multi response question the built in graphs is horrible, and can't be edited. I came across a script for producing graphs from the help file in the form of: GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=$prob RESPONSES() /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: prob=col(source(s), name("$prob"), unit.category()) DATA: responses=col(source(s), name("RESPONSES")) GUIDE: axis(dim(1), label("Most Important Problems in Last 12 Months")) GUIDE: axis(dim(2), label("Responses")) ELEMENT: interval(position(prob*responses)) END GPL. The so called helpfile on SPSS is very, very silent on how this works, and what the graph will look like. I wonder if anyone has produced a graph using this method (just a small piece of data) that I could learn from, or if someone could help me get the most out of this. Thank you in advance, and I hope that I will be in a position to help someone one day. Ajamu Mutumwa Consultant Solon Community Network ------------------------------- Tel 020 7780 2220 Fax 020 7702 7381 Mobile 07990 510 518 Email [hidden email] <mailto:[hidden email]> Website www.solontp.org.uk <http://www.solontp.org.uk/> ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
When you say script what you mean is run spss syntax. Scripting is a very different thing in the context of SPSS. A macro is a way to substitute arguments into syntax and you're not doing this.
To get your chart using the syntax below, you must be using SPSS 14. Define your multiple response variables in the Analyze>Tables>Multiple Response Sets... dialog. Then open Graphics>Chart Builder and pick a bar chart from the gallery. Drag the set you defined above into the x-axis slot and hit run. Does this work better for you? -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ajamu Mutumwa Sent: Thursday, September 28, 2006 10:42 AM To: [hidden email] Subject: Re: Multi response graphs Hi, Thanks for the response. Response: I'm not sure what you mean by producing graphs using a script. Answer: When you produce a frequency you can run the following script to produce a graph. The script is as follows: FREQUENCIES VARIABLES= origin /ORDER= ANALYSIS . GRAPH /BAR(SIMPLE)=PCT BY origin . Response: When you say script are you referring to a SaxBasic script or SPSS macro? Answer: It is an SPSS syntax that I run. I assume that is an SPSS macro? No? Response: You also mention built in graphs. Which command are you talking about that produces built in graphs? Answer: I produce a table in the output. I then right mouse click that table to produce a graph. This by passes the chart builder, but the graph produced is horrible, and you can't edit it. I am trying to run a script similar to above, but related to multiple responses. The graph script will not run on a multi response frequency. ---------------------------------------------- This syntax produces a bar chart. It uses a multiple response group defined from a set of variables. Each variable contains a single response which is the value of something identified as most important. The respondents could have been asked to check as many problems as they want as being important. The bar chart has the problem items listed on the categorical axis and the height of the bar is the number of responses which identified that as important. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ajamu Mutumwa Sent: Thursday, September 28, 2006 10:00 AM To: [hidden email] Subject: Re: Multi response graphs Hi everyone, I am new to this forum, but I hope that you can help me resolve an issue. I use SPSS infrequently, but mainly for producing frequencies where there is a single response (yes/no) to a question. Producing graphs using a script is dead easy, but when I want to do the same for a multi response question the built in graphs is horrible, and can't be edited. I came across a script for producing graphs from the help file in the form of: GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=$prob RESPONSES() /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: prob=col(source(s), name("$prob"), unit.category()) DATA: responses=col(source(s), name("RESPONSES")) GUIDE: axis(dim(1), label("Most Important Problems in Last 12 Months")) GUIDE: axis(dim(2), label("Responses")) ELEMENT: interval(position(prob*responses)) END GPL. The so called helpfile on SPSS is very, very silent on how this works, and what the graph will look like. I wonder if anyone has produced a graph using this method (just a small piece of data) that I could learn from, or if someone could help me get the most out of this. Thank you in advance, and I hope that I will be in a position to help someone one day. Ajamu Mutumwa Consultant Solon Community Network ------------------------------- Tel 020 7780 2220 Fax 020 7702 7381 Mobile 07990 510 518 Email [hidden email] <mailto:[hidden email]> Website www.solontp.org.uk <http://www.solontp.org.uk/> ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
Free forum by Nabble | Edit this page |