I am very new to this and it's all driving me nuts! I don't have much SPSS experience and I don't find it that intuitive ...
I have two columns of data that represent the outcome from two random (hopefully) groups and I need to develop a graph/plot that shows that there is not a period effect .... i.e. that the randomisation of the two groups has led to them statistically identical (with 95% confidence). Try as I might, I cannot generate a plot/graph that tell me (and eventually my supervisor) that the groups are similar and robust enough that further data analysis is likely to be statistically acceptable. I am running version 21.0.0. of SPSS and I am using Graphs-Chart Builder and then following some charting guidelines from Laerd.com and from a basic book. I would appreciate someone guiding me in a very simple way how i can get this data on one chart as a series of two lines. To me, it follows that if the slope of those lines is pretty much identical, then the data should not have a period effect?? Many thanks |
Administrator
|
I suspect you need to restructure your data. I.e., I think you have a file that looks something like this:
G1 G2 66.00 42.39 29.50 46.86 45.58 57.92 60.09 20.00 48.74 44.99 60.87 53.25 59.10 45.79 35.30 57.50 42.96 27.34 46.70 51.32 And you need it to look like this: Group Score 1 66.00 1 29.50 1 45.58 1 60.09 1 48.74 1 60.87 1 59.10 1 35.30 1 42.96 1 46.70 2 42.39 2 46.86 2 57.92 2 20.00 2 44.99 2 53.25 2 45.79 2 57.50 2 27.34 2 51.32 With the data structured this way, use Group as the X-axis variable and Score as the Y-axis variable when generating your charts. HTH.
--
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/). |
Thank you, yes.
Can I insert the second score next to the first and generate one chart but with two lines representing the data? Bish
|
Administrator
|
Normally, one would only have the second score next to the first if the two scores belonged to the same individual. Is that the case here? I thought not, because in your first post, you said you have "two random (hopefully) groups".
For two independent groups, you want one variable (column) coding group membership, and another holding a score. For example: NEW FILE. DATASET CLOSE all. DATA LIST list / Group(F1) Score (F5.3). BEGIN DATA 1 66.49 1 52.02 1 31.63 1 53.27 1 62.25 1 45.78 1 72.48 1 49.75 1 28.05 1 47.85 2 43.30 2 67.73 2 43.14 2 39.39 2 50.58 2 46.21 2 64.12 2 30.42 2 28.61 2 63.81 END DATA. * Make an error-bar plot to show means with 95% CIs. * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=Group MEANCI(Score, 95)[name="MEAN_Score" LOW="MEAN_Score_LOW" HIGH="MEAN_Score_HIGH"] MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: Group=col(source(s), name("Group"), unit.category()) DATA: MEAN_Score=col(source(s), name("MEAN_Score")) DATA: LOW=col(source(s), name("MEAN_Score_LOW")) DATA: HIGH=col(source(s), name("MEAN_Score_HIGH")) GUIDE: axis(dim(1), label("Group")) GUIDE: axis(dim(2), label("Mean Score")) GUIDE: text.footnote(label("Error Bars: 95% CI")) SCALE: linear(dim(2), include(0)) ELEMENT: point(position(Group*MEAN_Score)) ELEMENT: interval(position(region.spread.range(Group*(LOW+HIGH))), shape.interior(shape.ibeam)) END GPL. * Display box-plots for the two groups. * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=Group Score MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: Group=col(source(s), name("Group"), unit.category()) DATA: Score=col(source(s), name("Score")) DATA: id=col(source(s), name("$CASENUM"), unit.category()) GUIDE: axis(dim(1), label("Group")) GUIDE: axis(dim(2), label("Score")) SCALE: linear(dim(2), include(0)) ELEMENT: schema(position(bin.quantile.letter(Group*Score)), label(id)) END GPL. You said you're relatively new to SPSS. Have you learned how to use syntax? If not, copy the syntax shown above and paste it into a new syntax window (File > New > Syntax), then Run > All. In general, when using the GUI dialogs, exit via the PASTE button rather than by clicking OKAY. PASTE generates command syntax, which you can save as documentation of your work. (The pasted syntax is usually very verbose, and as you gain experience, you'll probably start cutting out some of the unnecessary bits. But using the PASTE button is a good way to get started. Paying attention to syntax you see posted in this forum is another good way to learn.) HTH.
--
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/). |
Thank you once again Bruce. This was very helpful and, at the same time, highlights my shortcomings ...
I appear to be running before I learned to walk! I have not touched Syntax - that appears to be a bit advanced for me. I managed to run the code and then repeated with my data set(s). The output whinged about missing data and advised how it was going to handle this .. but I did not understand. I wonder if the boxplot chart gave a fair view of the distribution because of the missing data?? I wonder if there is a possibility of including all the data (from Group 1 and Group 2) and then, by plotting a mean line for both groups, compare their similarity (or not)? Thanks Bish
|
Free forum by Nabble | Edit this page |