Here is the syntax for everyone having trouble with the broken link in the description: compute V2 = V1. varstocases /make V from V1 V2 /index panel_dum. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=V panel_dum groups MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) COORD: transpose(mirror(rect(dim(1,2)))) DATA: V=col(source(s), name("V")) DATA: panel_dum=col(source(s), name("panel_dum"), unit.category()) DATA: groups=col(source(s), name("groups"), unit.category()) TRANS: zero = eval(10) GUIDE: axis(dim(1), label("V1")) GUIDE: axis(dim(2), null()) GUIDE: axis(dim(3), null()) SCALE: linear(dim(2), min(0)) ELEMENT: area(position(density.kernel.epanechnikov(V*1*panel_dum*1*groups)), transparency.exterior(transparency."1.0"), transparency.interior(transparency."0.4"), color.interior(color.grey), color.exterior(color.grey))) ELEMENT: interval(position(V*zero*panel_dum*1*groups), transparency.exterior(transparency."0.8")) END GPL. Found at this link: andrewpwheeler.com/2012/05/20/bean-plots-in-spss/
I tried using this on an existing data set, and it worked to make the graph, neat. However, not only did it create those new variables, it duplicated my whole data set?? Every row now appears twice? How do I correct this!
Here is the syntax for everyone having trouble with the broken link in the description:
compute V2 = V1.
varstocases
/make V from V1 V2
/index panel_dum.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=V panel_dum groups MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
COORD: transpose(mirror(rect(dim(1,2))))
DATA: V=col(source(s), name("V"))
DATA: panel_dum=col(source(s), name("panel_dum"), unit.category())
DATA: groups=col(source(s), name("groups"), unit.category())
TRANS: zero = eval(10)
GUIDE: axis(dim(1), label("V1"))
GUIDE: axis(dim(2), null())
GUIDE: axis(dim(3), null())
SCALE: linear(dim(2), min(0))
ELEMENT: area(position(density.kernel.epanechnikov(V*1*panel_dum*1*groups)), transparency.exterior(transparency."1.0"), transparency.interior(transparency."0.4"),
color.interior(color.grey), color.exterior(color.grey)))
ELEMENT: interval(position(V*zero*panel_dum*1*groups), transparency.exterior(transparency."0.8"))
END GPL.
Found at this link: andrewpwheeler.com/2012/05/20/bean-plots-in-spss/
Hello. It helped me a lot! But do you know how to include a Boxplot inside the violin? Thanks.
I tried using this on an existing data set, and it worked to make the graph, neat.
However, not only did it create those new variables, it duplicated my whole data set?? Every row now appears twice? How do I correct this!
Thank you, brilliant, but the mean marker has been duplicated and is sitting outside of the violin ... any idea why?
TRANS: zero = eval(20) should be TRANS: zero = eval(0)
Hello, I cannot open the link to add the mean to the syntax .... could you provide it again?