|
I virtually never use spss graphics but now I need to and I need some help
1) I'd like for these to be 'production quality' as opposed to 'look at-assess-pitch' quality. Perhaps this is an irrelevant distinction but then again I don't know. 2) At the moment I think I want to plot one continuous IV on the x axis and five continuous DVs, all having the same range, on the y axis. I'd also want to show the regression line for each iv-dv pair. I'm guessing that this will involve serious GPL. 3) I've got quite a few of these to do and I think I'd like to fix things (somehow) so that when the chart is copied to Word, I can arrange 4 of them per page. So I need to shrink the chart from what it is in spss to something smaller. Has anyone ever done this? Can it be done? How? I will entertain alternative to spss such as excel (I have never seen a regression line option in powerpoint. So that's out.) However, bear in mind that I have no experience graphing in excel. Thanks, Gene Maguin ===================== 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 |
|
Listers,
I have several variable with the date format mm/dd/yyyy hh:mm:ss. The data is coming in from an excel file. When I read it into paws I get dates for all variables except for one. I cannot identify anything different about this one variable. In excel it has the same format as the other variables. There are no differences, no extra spaces etc. Any ideas? Thanks matt Matthew Pirritano, Ph.D. Research Analyst IV Medical Services Initiative (MSI) Orange County Health Care Agency (714) 568-5648 ===================== 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 |
|
What is the un-formatted value in Excel in the first row of the variable
that is not reading correctly? SPSS (or PAWS :~) guesses at the format based on the first row of data. HTH Jim Marks Director, Market Research LodgeNet Interactive Corporation 3900 W. Innovation St. Sioux Falls SD, 57107 www.lodgenet.com [hidden email] -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Pirritano, Matthew Sent: Thursday, July 23, 2009 3:39 PM To: [hidden email] Subject: date format mm/dd/yyyy hh:mm:ss reading from excel is coming in for all date variables except one Listers, I have several variable with the date format mm/dd/yyyy hh:mm:ss. The data is coming in from an excel file. When I read it into paws I get dates for all variables except for one. I cannot identify anything different about this one variable. In excel it has the same format as the other variables. There are no differences, no extra spaces etc. Any ideas? Thanks matt Matthew Pirritano, Ph.D. Research Analyst IV Medical Services Initiative (MSI) Orange County Health Care Agency (714) 568-5648 ===================== 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 |
|
There was funny (or not so funny) data in one cell in excel that was
causing the paws problem. Problem solved. Thanks matt Matthew Pirritano, Ph.D. Research Analyst IV Medical Services Initiative (MSI) Orange County Health Care Agency (714) 568-5648 -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Marks, Jim Sent: Thursday, July 23, 2009 3:28 PM To: [hidden email] Subject: Re: date format mm/dd/yyyy hh:mm:ss reading from excel is coming in for all date variables except one What is the un-formatted value in Excel in the first row of the variable that is not reading correctly? SPSS (or PAWS :~) guesses at the format based on the first row of data. HTH Jim Marks Director, Market Research LodgeNet Interactive Corporation 3900 W. Innovation St. Sioux Falls SD, 57107 www.lodgenet.com [hidden email] -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Pirritano, Matthew Sent: Thursday, July 23, 2009 3:39 PM To: [hidden email] Subject: date format mm/dd/yyyy hh:mm:ss reading from excel is coming in for all date variables except one Listers, I have several variable with the date format mm/dd/yyyy hh:mm:ss. The data is coming in from an excel file. When I read it into paws I get dates for all variables except for one. I cannot identify anything different about this one variable. In excel it has the same format as the other variables. There are no differences, no extra spaces etc. Any ideas? Thanks matt Matthew Pirritano, Ph.D. Research Analyst IV Medical Services Initiative (MSI) Orange County Health Care Agency (714) 568-5648 ===================== 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 ===================== 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 |
|
In reply to this post by Maguin, Eugene
Hi Gene:
Regarding your question #2, perhaps I don't understand it correctly, but a simple ol' overlay plot should do the trick (tested with some sample data of mine): GRAPH /SCATTERPLOT(OVERLAY)=iv WITH dv1 dv2 dv3 dv4 dv5 /TEMPLATE='ChartTemplate.sgt'. The chart template content is quite simple (this is the important line: " <addFitLine target="pair" type="linear"/>" ) <?xml version="1.0" encoding="UTF-8" standalone="no"?> <template SPSS-Version="1.4" description="" selectPath="78 " xmlns="http://xml.spss.com/spss/visualization" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xml.spss.com/spss/visualization http://xml.spss.com/spss/visualization/vizml-template-3.0.xsd"> <addFitLine target="pair" type="linear"/> </template> Anyway, a GPL solution will certainly be cuter. Regarding question #3, I usually export the graphs to Word, and then I edit the document and right click on every figure and manually modify its size (down to 50%, 40%) to fit the page width. But I'm old fashioned, there must be a better solution. HTH, Marta GG Gene Maguin escribió: > I virtually never use spss graphics but now I need to and I need some help > > 1) I'd like for these to be 'production quality' as opposed to 'look > at-assess-pitch' quality. Perhaps this is an irrelevant distinction but then > again I don't know. > > 2) At the moment I think I want to plot one continuous IV on the x axis and > five continuous DVs, all having the same range, on the y axis. I'd also want > to show the regression line for each iv-dv pair. I'm guessing that this will > involve serious GPL. > > 3) I've got quite a few of these to do and I think I'd like to fix things > (somehow) so that when the chart is copied to Word, I can arrange 4 of them > per page. So I need to shrink the chart from what it is in spss to something > smaller. Has anyone ever done this? Can it be done? How? > > I will entertain alternative to spss such as excel (I have never seen a > regression line option in powerpoint. So that's out.) However, bear in mind > that I have no experience graphing in excel. > > Thanks, Gene Maguin > > ===================== > 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 > > -- For miscellaneous SPSS related statistical stuff, visit: http://gjyp.nl/marta/ ===================== 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 |
|
Marta,
Thank you very much for your reply. I was stumbling around in GPL last night, which is rather dark and swampish. This part of your syntax worked fine. GRAPH /SCATTERPLOT(OVERLAY)=iv WITH dv1 dv2 dv3 dv4 dv5 I got a plot with my points. Point pairs are defined by color. While we have a color printer, I'd like to stay off of it. Is there a symbol option for points? This part generated a warning. The text was >Warning # 34 in column 13. Text: ChartTemplate.sgt >SPSS cannot access a file with the given file specification. The file >specification is either syntactically invalid, specifies an invalid drive, >specifies a protected directory, specifies a protected file, or specifies a >non-sharable file. I went into help and read how to apply a chart template. I opened the chart in the editor, and looked at the chart template list and did not see the name below. /TEMPLATE='ChartTemplate.sgt'. You went on to say >>The chart template content is quite simple (this is the important line: " <addFitLine target="pair" type="linear"/>" ) <?xml version="1.0" encoding="UTF-8" standalone="no"?> <template SPSS-Version="1.4" description="" selectPath="78 " xmlns="http://xml.spss.com/spss/visualization" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xml.spss.com/spss/visualization http://xml.spss.com/spss/visualization/vizml-template-3.0.xsd"> <addFitLine target="pair" type="linear"/> </template> I have no idea what you are telling me here except that that one line is very important. Lastly, does the chart template piece produce one fit line per DV? And, can that line be marked by symbol rather than color? Thanks, Gene Maguin ===================== 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 |
|
Hi Gene
Sorry, my explanations were not clear (or were they absolutely absent?). My bad. I don't know why, but I thought you would understand my scanty-minimalistic message. What I should have said is that you had to copy-paste these lines into an empty text editor window (Notepad, for instance): <?xml version="1.0" encoding="UTF-8" standalone="no"?> <template SPSS-Version="1.4" description="" selectPath="78 " xmlns="http://xml.spss.com/spss/visualization" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xml.spss.com/spss/visualization http://xml.spss.com/spss/visualization/vizml-template-3.0.xsd"> <addFitLine target="pair" type="linear"/> </template> And save the contents into a file named "ChartTemplate.sgt" in the same folder where your data were stored. Then the syntax would, not only draw the overlay scatterplot, but also add the regression lines you wanted. Concerning the problem with colors, I suppose we can add more lines the chart template file, let me work on it. GPL would be a better choice, since the selection of patterns instead of colors might be done directly, without having to use a chart template at all. It's Friday evening, I really don't feel a lot like hard working, and I'm going to have some fun trying to solve your problem. Marta Gene Maguin wrote: > Thank you very much for your reply. I was stumbling around in GPL last > night, which is rather dark and swampish. > > This part of your syntax worked fine. > > GRAPH /SCATTERPLOT(OVERLAY)=iv WITH dv1 dv2 dv3 dv4 dv5 > > I got a plot with my points. Point pairs are defined by color. While we have > a color printer, I'd like to stay off of it. Is there a symbol option for > points? > > > This part generated a warning. The text was > > >> Warning # 34 in column 13. Text: ChartTemplate.sgt >> SPSS cannot access a file with the given file specification. The file >> specification is either syntactically invalid, specifies an invalid drive, >> specifies a protected directory, specifies a protected file, or specifies a >> non-sharable file. >> > > I went into help and read how to apply a chart template. I opened the chart > in the editor, and looked at the chart template list and did not see the > name below. > > /TEMPLATE='ChartTemplate.sgt'. > > You went on to say > > >>> The chart template content is quite simple (this is the important line: >>> > " <addFitLine target="pair" type="linear"/>" ) > > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > <template SPSS-Version="1.4" description="" selectPath="78 " > xmlns="http://xml.spss.com/spss/visualization" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://xml.spss.com/spss/visualization > http://xml.spss.com/spss/visualization/vizml-template-3.0.xsd"> > <addFitLine target="pair" type="linear"/> > </template> > > I have no idea what you are telling me here except that that one line is > very important. > > Lastly, does the chart template piece produce one fit line per DV? And, can > that line be marked by symbol rather than color? > > -- For miscellaneous SPSS related statistical stuff, visit: http://gjyp.nl/marta/ ===================== 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 |
|
In reply to this post by Maguin, Eugene
Hi Gene:
This is the solution using GPL, no chart template needed. Replace every instance of "iv" by the X variable name, and every instance of "dv1" "dv2".... by the real Y variable names. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=iv dv1 dv2 dv3 dv4 dv5 MISSING= LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: iv=col(source(s), name("iv")) DATA: dv1=col(source(s), name("dv1")) DATA: dv2=col(source(s), name("dv2")) DATA: dv3=col(source(s), name("dv3")) DATA: dv4=col(source(s), name("dv4")) DATA: dv5=col(source(s), name("dv5")) GUIDE: axis(dim(1)) TRANS: iv_x1=eval("iv- dv1") TRANS: iv_x2=eval("iv- dv2") TRANS: iv_x3=eval("iv- dv3") TRANS: iv_x4=eval("iv- dv4") TRANS: iv_x5=eval("iv- dv5") ELEMENT: point(position(iv*dv1), shape(shape.circle)) ELEMENT: point(position(iv*dv2), shape(shape.cross)) ELEMENT: point(position(iv*dv3), shape(shape.square)) ELEMENT: point(position(iv*dv4), shape(shape.star)) ELEMENT: point(position(iv*dv5), shape(shape.plus)) ELEMENT: line(position(smooth.linear(iv*dv1)), shape(shape.solid)) ELEMENT: line(position(smooth.linear(iv*dv2)), shape(shape.dash)) ELEMENT: line(position(smooth.linear(iv*dv3)), shape(shape.half_dash)) ELEMENT: line(position(smooth.linear(iv*dv4)), shape(shape.dash_2x)) ELEMENT: line(position(smooth.linear(iv*dv5)), shape(shape.dash_3x)) END GPL. HTH, Marta GG -- For miscellaneous SPSS related statistical stuff, visit: http://gjyp.nl/marta/ ===================== 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 |
|
In reply to this post by Marta Garcia-Granero
Hi Marta,
I know how to do a few things but charts/graphs is absolutely not one of them. And, I've never used or created a template. So I needed detailed directions. And now that part is now working. One of my lines is pale yellow and it barely shows up on screen. So symbols are probably going to be better. I'm curious about something in this. I see http references. Am I correct in assuming that in the execution of the graph command the program is accessing some public portion of the spss website? Thanks, Gene Maguin <?xml version="1.0" encoding="UTF-8" standalone="no"?> <template SPSS-Version="1.4" description="" selectPath="78 " xmlns="http://xml.spss.com/spss/visualization" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xml.spss.com/spss/visualization http://xml.spss.com/spss/visualization/vizml-template-3.0.xsd"> <addFitLine target="pair" type="linear"/> </template> ===================== 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 |
|
In reply to this post by Marta Garcia-Granero
Marta,
The end is near. I want to ask about one modification and one issue and a couple of questions. The issue: Is is possible to add a legend 'something' to the chart to identify which lines/symbols refer to which DV? The modification: I have points that are at 0.0 on the y axis and those points half way and indistinctly plot on the chart. So, can the y axis have a range below 0.0? I know there are commands for controlling the range and I haven't checked or tried them. You have five commands in there such as TRANS: iv_x1=eval("iv-dv1") What does this command do? I'm assuming that you have considerable experience with GPL (and I ask this of others with GPL experience). Are there funny case sensitivity issues with GPL? I initally had trouble getting it to run at all with a case mismatch between the variable names. Then I changed all the syntax to uppercase. That gave me an error referring to the 'usersource' word. Only when I fixed things so that the variable case matched did it run. This suggests to me that there is but I don't know anything here. Thank you, Gene Maguin ===================== 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 |
|
I have been working onthe legend issue, but, at least with SPSS 15, I
have stumbled on a glitch/bug. Tomorrow (it's 20:25 now in Spain and I want to call it a day, dinner's waiting to be cooked... by ME). I'll try with PASW 17 tomorrow (yes, I know, it's Saturday). Concerning the iv_x1 issue... again my mistake. I had been testing the code with some fake data I created, and my variables were named x1, x2.... Therefore x1 should be replaced by dv1, x2 by dv2... and so on. We'll keep on discussing this tomorrow. Marta Gene Maguin escribió: > Marta, > > The end is near. I want to ask about one modification and one issue and a > couple of questions. > > The issue: Is is possible to add a legend 'something' to the chart to > identify which lines/symbols refer to which DV? > > The modification: I have points that are at 0.0 on the y axis and those > points half way and indistinctly plot on the chart. So, can the y axis have > a range below 0.0? I know there are commands for controlling the range and I > haven't checked or tried them. > > You have five commands in there such as > > TRANS: iv_x1=eval("iv-dv1") > > What does this command do? > > I'm assuming that you have considerable experience with GPL (and I ask this > of others with GPL experience). Are there funny case sensitivity issues with > GPL? I initally had trouble getting it to run at all with a case mismatch > between the variable names. Then I changed all the syntax to uppercase. That > gave me an error referring to the 'usersource' word. Only when I fixed > things so that the variable case matched did it run. This suggests to me > that there is but I don't know anything here. > > Thank you, Gene Maguin > > ===================== > 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 > > -- For miscellaneous SPSS related statistical stuff, visit: http://gjyp.nl/marta/ ===================== 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 |
|
In reply to this post by Maguin, Eugene
Hi Gene... and SPSS support people, I'd like you to take a look at this
too, please, since thereis something strange with my second code (tested with SPSS 15 and PASW 17 & 18 beta) Back to the computer Gene Maguin wrote: > The issue: Is is possible to add a legend 'something' to the chart to > identify which lines/symbols refer to which DV? > Here is my code. I'm using faked data, and I have stumbled upon a problem/bug/glitch (se second GPL syntax)... * Sample data *. INPUT PROGRAM. - VECTOR x(6). - LOOP #I = 1 TO 50. - LOOP #J = 1 TO 6. - COMPUTE x(#J) = NORMAL(1). - END LOOP. - END CASE. - END LOOP. - END FILE. END INPUT PROGRAM. execute. * This solution doesn't show a legend for line patterns, but gives a nice legend for dot patterns *. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=x6 x1 x2 x3 x4 x5 MISSING= LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: x6=col(source(s), name("x6")) DATA: x1=col(source(s), name("x1")) DATA: x2=col(source(s), name("x2")) DATA: x3=col(source(s), name("x3")) DATA: x4=col(source(s), name("x4")) DATA: x5=col(source(s), name("x5")) GUIDE: axis(dim(1)) TRANS: x6_x1=eval("x6 - x1") TRANS: x6_x2=eval("x6 - x2") TRANS: x6_x3=eval("x6 - x3") TRANS: x6_x4=eval("x6 - x4") TRANS: x6_x5=eval("x6 - x5") ELEMENT: point(position(x6*x1), shape.interior(x6_x1)) ELEMENT: point(position(x6*x2), shape.interior(x6_x2)) ELEMENT: point(position(x6*x3), shape.interior(x6_x3)) ELEMENT: point(position(x6*x4), shape.interior(x6_x4)) ELEMENT: point(position(x6*x5), shape.interior(x6_x5)) ELEMENT: line(position(smooth.linear(x6*x1)), shape(shape.solid)) ELEMENT: line(position(smooth.linear(x6*x2)), shape(shape.dash)) ELEMENT: line(position(smooth.linear(x6*x3)), shape(shape.half_dash)) ELEMENT: line(position(smooth.linear(x6*x4)), shape(shape.dash_2x)) ELEMENT: line(position(smooth.linear(x6*x5)), shape(shape.dash_3x)) END GPL. * This one is a mess: the line patterns are repeated 6 times! (SPSS 15, PASW 17/18) *. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=x6 x1 x2 x3 x4 x5 MISSING= LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: x6=col(source(s), name("x6")) DATA: x1=col(source(s), name("x1")) DATA: x2=col(source(s), name("x2")) DATA: x3=col(source(s), name("x3")) DATA: x4=col(source(s), name("x4")) DATA: x5=col(source(s), name("x5")) GUIDE: axis(dim(1)) TRANS: x6_x1=eval("x6 - x1") TRANS: x6_x2=eval("x6 - x2") TRANS: x6_x3=eval("x6 - x3") TRANS: x6_x4=eval("x6 - x4") TRANS: x6_x5=eval("x6 - x5") ELEMENT: point(position(x6*x1), shape(x6_x1)) ELEMENT: point(position(x6*x2), shape(x6_x2)) ELEMENT: point(position(x6*x3), shape(x6_x3)) ELEMENT: point(position(x6*x4), shape(x6_x4)) ELEMENT: point(position(x6*x5), shape(x6_x5)) ELEMENT: line(position(smooth.linear(x6*x1)), shape(x6_x1)) ELEMENT: line(position(smooth.linear(x6*x2)), shape(x6_x2)) ELEMENT: line(position(smooth.linear(x6*x3)), shape(x6_x3)) ELEMENT: line(position(smooth.linear(x6*x4)), shape(x6_x4)) ELEMENT: line(position(smooth.linear(x6*x5)), shape(x6_x5)) END GPL. > The modification: I have points that are at 0.0 on the y axis and those > points half way and indistinctly plot on the chart. So, can the y axis have > a range below 0.0? I know there are commands for controlling the range and I > haven't checked or tried them. > > > You should edit one of the graphs, select the Y axis, go to the scale options, and add 5% margin to the lower end of the axis. Leaving Pamplona (my city, and, unfortunately, city of the "Running of the bulls") for the weekend, I'll be back late Sunday. Marta GG -- For miscellaneous SPSS related statistical stuff, visit: http://gjyp.nl/marta/ ===================== 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 |
|
In reply to this post by Maguin, Eugene
Hi Gene:
Looks like I'm not leaving yet... See if this is exactly what you needed. * Sample dataset *. INPUT PROGRAM. - VECTOR x(6). - LOOP #I = 1 TO 50. - LOOP #J = 1 TO 6. - COMPUTE x(#J) = NORMAL(1). - END LOOP. - END CASE. - END LOOP. - END FILE. END INPUT PROGRAM. EXE. * Change dataset from wide to long *. VARSTOCASES /MAKE DV FROM x1 x2 x3 x4 x5 /INDEX = Group(DV) /KEEP = x6 /NULL = KEEP. * GPL (with min Y value set -0.5) * . GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=x6 DV Group MISSING= LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: x6=col(source(s), name("x6")) DATA: DV=col(source(s), name("DV")) DATA: Group=col(source(s), name("Group"), unit.category()) GUIDE: axis(dim(1), label("IV")) GUIDE: axis(dim(2), label("DV")) GUIDE: legend(aesthetic(aesthetic.shape.interior), label("Dependent")) SCALE: linear(dim(2), min(-0.5)) SCALE: cat(aesthetic(aesthetic.shape.interior)) ELEMENT: point(position(x6*DV), shape.interior(Group)) ELEMENT: line(position(smooth.linear(x6*DV)), shape.interior(Group)) END GPL. That's it. MGG -- For miscellaneous SPSS related statistical stuff, visit: http://gjyp.nl/marta/ ===================== 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 |
|
Marta,
Yes, your solution does everything I asked for! I really, really thank you for the time you put in on this question. Your final solution is also very clever in the use of the varstocases and the creation of the grouping variable to insert the legend. It's a parallel to the same strategy for the mixed command. Gene Maguin ===================== 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 |
| Free forum by Nabble | Edit this page |
