Hi everyone,
As can be seen attached, I have a dataset in which the binary outcome variable (Y) was assessed on a monthly basis, for 6 consecutive months, in the context of a longitudinal study design. The continuous independent variable (X) was assessed at baseline only (i.e., between-person/Level 2 variable). Results from a generalized linear mixed model (GLMM) revealed a significant effect of X on Y. More specifically, higher X scores were associated with elevated odds of Y (coefficient = .196; ExpCoefficient = 1.2). The SPSS syntax and output were also attached with this message. I was wondering whether there is a way to depict this finding in a Figure ? For instance, it would be great to come up with a Figure in which the outcome/probability data (i.e., ExpCoefficient) are depicted on the Y axis, and the continuous scores from the independent variable depicted on the X axis. Attached is an example of Figure taken from the literature (see attached) that I have in mind. I was wondering whether a similar Figure could be created with my data ? Thank you very much in advance for your input. Regards, O. SPSS_dataset.sav <http://spssx-discussion.1045642.n5.nabble.com/file/t340718/SPSS_dataset.sav> SPSS_syntax_&_output.spv <http://spssx-discussion.1045642.n5.nabble.com/file/t340718/SPSS_syntax_%26_output.spv> Figure.jpg <http://spssx-discussion.1045642.n5.nabble.com/file/t340718/Figure.jpg> -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
I'm a bit confused about your command statement versus your data description. You have six waves of data and I was expecting that you use a growth curve formulation with wave/time/month as a predictor or a repeated measures design. What am I missing or not understanding?
Gene Maguin -----Original Message----- From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Oliver Sent: Friday, November 16, 2018 4:11 PM To: [hidden email] Subject: Data visualization (GLMM) Hi everyone, As can be seen attached, I have a dataset in which the binary outcome variable (Y) was assessed on a monthly basis, for 6 consecutive months, in the context of a longitudinal study design. The continuous independent variable (X) was assessed at baseline only (i.e., between-person/Level 2 variable). Results from a generalized linear mixed model (GLMM) revealed a significant effect of X on Y. More specifically, higher X scores were associated with elevated odds of Y (coefficient = .196; ExpCoefficient = 1.2). The SPSS syntax and output were also attached with this message. I was wondering whether there is a way to depict this finding in a Figure ? For instance, it would be great to come up with a Figure in which the outcome/probability data (i.e., ExpCoefficient) are depicted on the Y axis, and the continuous scores from the independent variable depicted on the X axis. Attached is an example of Figure taken from the literature (see attached) that I have in mind. I was wondering whether a similar Figure could be created with my data ? Thank you very much in advance for your input. Regards, O. SPSS_dataset.sav <http://spssx-discussion.1045642.n5.nabble.com/file/t340718/SPSS_dataset.sav> SPSS_syntax_&_output.spv <http://spssx-discussion.1045642.n5.nabble.com/file/t340718/SPSS_syntax_%26_output.spv> Figure.jpg <http://spssx-discussion.1045642.n5.nabble.com/file/t340718/Figure.jpg> -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Hi Gene,
Thanks for your response. When I run the GLMM analysis, results revealed a significant main effect of "time" on the outcome. That is, as time increases, the likelihood of the behaviour decreases. However, in this case, I'm only interested in the main effect of a Level 2 independent variable, regardless of time. GLMM results indicated that igher scores on my IV were associated with elevated odds of Y (coefficient = .196; ExpCoefficient = 1.2), and I'd like to depict this through a Figure (instead of a table), even if the magnitude/effect size of this effect is not very strong. I guess a "forest plot" could be an option, but I was curious whether other types of Figures could also be generated. Thanks again, O. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Here is an example drawing the S curve you ask for. The superimposed points
don't make sense in comparison here (given the random intercept they won't necessarily line up). *********************************************************************************************. *X actually only goes from 2.5 to 10. *Plotting larger range to illustrate the S curve. INPUT PROGRAM. COMPUTE #XMin = -25. COMPUTE #XMax = 40. COMPUTE #GridSize = 1000. COMPUTE #Step = (#XMax - #XMin)/(#GridSize-1). LOOP #X = 1 TO #GridSize. COMPUTE X = #XMin + (#X - 1)*#Step. END CASE. END LOOP. END FILE. END INPUT PROGRAM. DATASET NAME Logit. *Inverse logit to go to probability scale. DEFINE !INVLOGIT (!POSITIONAL !ENCLOSE("(",")") ) 1/(1 + EXP(-!1)) !ENDDEFINE. *If you want a more automated way, either save parameter file. *Or get these from OMS. COMPUTE #Int = -2.143. COMPUTE #X_Eff = 0.196. COMPUTE #Lin = #Int + X*#X_Eff. COMPUTE Prob = !INVLOGIT(#Lin). EXECUTE. *Now make the graph with just the line. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=X Prob MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: X=col(source(s), name("X")) DATA: Prob=col(source(s), name("Prob")) GUIDE: axis(dim(1), label("X")) GUIDE: axis(dim(2), label("Probability")) ELEMENT: line(position(X*Prob)) END GPL. *If you restrict to actual X values the line is pretty straight though. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=X Prob MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: X=col(source(s), name("X")) DATA: Prob=col(source(s), name("Prob")) GUIDE: axis(dim(1), label("X")) GUIDE: axis(dim(2), label("Probability")) SCALE: linear(dim(1), min(2.5), max(10)) ELEMENT: line(position(X*Prob)) END GPL. *Might actually want to superimpose points from actual dataset as a rug. *See https://andrewpwheeler.wordpress.com/2012/05/20/bean-plots-in-spss/. *And https://andrewpwheeler.wordpress.com/2017/02/07/side-by-side-charts-in-spss/. *********************************************************************************************. ----- Andy W [hidden email] http://andrewpwheeler.wordpress.com/ -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
In reply to this post by Oliver
"through a Figure (instead of a table)"
Are your sure? Wouldn't BOTH be more honest presentation? ----- Art Kendall Social Research Consultants -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants |
Free forum by Nabble | Edit this page |