I need some help with something I do rarely. What I want to do is plot on the same chart the means of two variables by a categorical variable. Both ‘y’ variables are 0/1 so, for what it’s worth a common scale would be fine but that’s a
minor consideration. I wish it were this simple: plot mean(calls15) mean(calls16) by enrollment. I know perfectly well this can be done in GPL but I want stay out of that because the overhead is extremely high.
I find chart builder unintelligible so that’s out. Can this be done in the legacy plot commands? It looks like it ought to be line charts, muiltiple (lines) summaries for groups of cases and then what? And, should it be possible with a legacy command, how does my data need to be structured:
wide or long with respect to the Y variables? Thanks, Gene Maguin |
Unless the categories are ordinal, I would suggest using a bar chart rather than a line chart. But both can be constructed in the Chartbuilder by choosing bar or line chart, selecting the two variables (using ctrl click) and dragging to the y axis, and dragging the categorical variable to the x axis. This would be the same whether you use a bar chart or a line chart. Using the legacy dialogs, you could do clustered bar or multiple line with Summaries of Separate Variables; then put the scale variables at the top and your category variable as the x. GRAPH /BAR(GROUPED)=MEAN(salary) MEAN(salbegin) BY jobcat /MISSING=LISTWISE. or GRAPH /LINE(MULTIPLE)=MEAN(salary) MEAN(salbegin) BY jobcat /MISSING=LISTWISE. On Thu, Aug 30, 2018 at 1:56 PM Maguin, Eugene <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |