2 years ago

#53102

test-img

bloomingroses7

SPSS produces 1 scatter plot with split file

I am working with data where I need to create multiple scatter plots for different populations. I also recently upgraded from SPSS v26 to v28 and the code that I used for this worked in v26 but is no longer working correctly in v28. Instead of producing multiple scatter plots like it's supposed to, it is now producing 1 plot in v28, presumably the first subpopulation in the split. I tested the split file function with descriptives and it worked as intended.

I have scoured everything in the GUI menus to find any kind of setting that was ticked by default and came up with nothing. I also tried to use a filter based on the criterion variables in my split file function and ran a scatter plot but that gave me a graph of the whole population instead of the subpopulation I filtered. Any guidance on what could be going on with scatter plots and the split file function in SPSS v28 would be greatly appreciated.

Here is my code for reference:

SORT CASES BY exit_yr service sigscore.
SPLIT FILE SEPARATE BY exit_yr service sigscore.
*Chart Builder.
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=wait.time[name="wait_time"] 
    score.change[name="score_change"] service.ideal[name="service_ideal"] MISSING=VARIABLEWISE 
    REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE
  /FITLINE TOTAL=NO SUBGROUP=NO.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: wait_time=col(source(s), name("wait_time"))
  DATA: score_change=col(source(s), name("score_change"))
  DATA: service_ideal=col(source(s), name("service_ideal"), unit.category())
  GUIDE: axis(dim(1), label("wait.time: Difference in days between referral submission ",
    "and referral acceptance"))
  GUIDE: axis(dim(2), label("score.change: score change from pre to post"))
  GUIDE: legend(aesthetic(aesthetic.color.interior), label("service.ideal"))
  GUIDE: text.title(label("Grouped Scatter of score.change: score change from pre to ",
    "post by wait.time: Difference in days between referral submission and referral ",
    "acceptance by service.ideal"))
  ELEMENT: point(position(wait_time*score_change), color.interior(service_ideal))
END GPL.
SPLIT FILE OFF.

file

split

scatter-plot

spss

0 Answers

Your Answer

Accepted video resources