Lines on scatterplot

3 messages
Open this post in threaded view
|

Lines on scatterplot

 This is not for analysis, but a revised version of my SPSS tutorial 4.5.1 Graphic teaching aid for regression and correlation [http://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/4.5.1_graphic_teaching_aid_for_regression_and_correlation.pdf]. This was written on artficial data, but I now want to produce similar charts on real data, particularly the regression lines of X on Y and Y on X, plus the overlay of both regression lines to show that Pearson's r is the cosine of the angle between the two. With these data from 21 countries in Europe, plus UK and USA (N=23) V1 = Homicide rate; V2 Gini coefficient. 1.0 34.94 0.7 30.25 1.7 28.53 1.6 33.68 1.0 26.63 0.8 29.02 2.2 27.74 1.3 33.78 1.0 31.14 1.6 34.48 1.1 32.30 2.0 42.78 0.9 34.41 0.9 28.73 0.6 25.86 1.1 33.25 1.2 35.84 1.6 27.32 0.9 35.79 1.0 26.81 0.7 32.72 1.2 34.81 4.8 40.46 . . and this syntax: DATASET ACTIVATE DataSet0. STATS REGRESS PLOT YVARS=homicide XVARS=Gini /OPTIONS CATEGORICAL=BARS GROUP=1 BOXPLOTS INDENT=15 YSCALE=75 /FITLINES APPLYTO=TOTAL. I can produce the following chart: I can then copy the chart to Word, Right-click >> Wrap text >> Behind and manually add: 1) a horizontal line through mean y with repeated underscores ____ 2) a vertical line through mean x with repeated rows of "¦" ¦ ¦ ¦ Can SPSS produce a chart with a) a vertical line through mean x b) a horizontal line through mean y (preferably both together)? After that, can I get a chart with: a) horizontal lines from each data point to mean x and b) vertical lines from each data point to mean y? Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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