Per group (control, intervention) I have two measurements per case (before= left, after= right). Now I want to add a line between the repeated measurements per individual case to display the change per case per group. I have the following syntax:
* Chart Builder.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=Radomization Global_longitudinal_strain Index1
MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: Radomization=col(source(s), name("Radomization"), unit.category())
DATA: Global_longitudinal_strain=col(source(s), name("Global_longitudinal_strain"))
DATA: Index1=col(source(s), name("Index1"), unit.category())
DATA: id=col(source(s), name("$CASENUM"), unit.category())
COORD: rect(dim(1,2), cluster(3,0))
GUIDE: axis(dim(3), label("Radomization"))
GUIDE: axis(dim(2), label(""))
GUIDE: legend(aesthetic(aesthetic.color), label(""))
GUIDE: text.title(label("Clustered Boxplot of 10.1|GLS MRI by Radomization by Index1"))
SCALE: cat(dim(3), include("0", "1"))
SCALE: linear(dim(2), include(0))
ELEMENT: point(position(Index1*Global_longitudinal_strain*Radomization), color(Index1))
ELEMENT: line(position(Index1*Global_longitudinal_strain*Radomization), color(color.black), size(size."2px"), split(id))
END GPL.
Unfortunately, the code snippet ELEMENT: LINE(position…. etc) does not produce the lines I require. The output I get is attached. Attached also the structure of the data in spss.
[enter image description here](https://i.sstatic.net/TMtBr1sJ.png)
see above
, see above,
souf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.