Reputation: 1
I am trying to do a longitudinal analysis with a random intercept random slope model. I am following the book "Intensive longitudinal methods" from Bolger and Laurenceau (2013).
The authors recommend looking at the data before starting to analyze. They made an example of different panelplots to see their dependent variable change over time for each participant separately:
I would like to do the same, but struggle to do so in IBM SPSS 26. I can get the lineplots of my dependent variable, but only from all the participants together in one plot. And I am afraid, I am not able to recognize much from this, since there are too many lines overlaying:
My data (in long format):
id
: my variable to identify the participants. It repeats itself 30 times (for each of the measurement points).
Index1
: was created when I changed from wide- to long-format and indicates what measurement-point or timepoint the variable belong to. They go from 1 to 30.
Age_Longitudinal
: Each participant has 30 values for age, one for each timepoint. The independent variable.
Timepoint
: automatically created variable containing time and date the participants filled out the questionnaire. Each participant has 30.
Date
: Date the participants filled out the questionnaire.
SEIQOL_Longitudinal
: a variable containing the dependent variable Quality of life. Measured 30 times.
The panelplot should have the SEIQOL_Longitudinal at the y-axis and the Index1 at the x-axis to indicate timepoint. I would like to have individual "cascets" for each participant. There is no treatment or controle-group (in the example of Bolger and Laurenceau (2013) there is one). Later on it could be interesting though to maybe also look at the same kinds of plots seperated for 2 groups (old old, and young old), which is indicated in the nominal variable "Agegroup_Longitudinal".
Does anyone know how to do this?
Upvotes: 0
Views: 442
Reputation: 586
Try the following commands (open a syntax window, copy and paste the commands into it, and with your data file open, click Run>All or highlight the commands and click the Green arrowhead button):
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=Index1 SEIQOL_Longitudinal id MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: Index1=col(source(s), name("Index1"), unit.category())
DATA: SEIQOL_Longitudinal=col(source(s), name("SEIQOL_Longitudinal"))
DATA: id=col(source(s), name("id"), unit.category())
GUIDE: axis(dim(1), label("Index1"))
GUIDE: axis(dim(2), label("SEIQOL_Longitudinal"))
GUIDE: axis(dim(3), label("id"), opposite())
GUIDE: text.title(label("Simple Line of SEIQOL_Longitudinal by Index1 by id"))
COORD: rect(dim(1,2), wrap())
SCALE: linear(dim(2), include(0))
ELEMENT: line(position(Index1*SEIQOL_Longitudinal*id), missing.wings())
END GPL.
I got to this by setting up a line chart in the Chart Editor with Index1 on the X axis and SEIQOL_Longitudinal on the Y axis, as specified, also adding id as a columns panel variable on the Groups/Point ID tab. I then pasted the commands into a syntax window and added the COORD: rect(dim(1,2), wrap())
statement, which I don't know how to do in the Chart Editor to achieve the wrapping.
Any of the labels in quotes on the GUIDE
statements can be changed as desired.
Upvotes: 0