05-13-2021
wab13
Fluorite | Level 6
Member since
05-06-2021
- 3 Posts
- 4 Likes Given
- 0 Solutions
- 1 Likes Received
-
Latest posts by wab13
Subject Views Posted 1836 05-07-2021 12:09 PM 1857 05-07-2021 11:31 AM 1987 05-06-2021 05:08 PM -
Activity Feed for wab13
- Liked Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT for Rick_SAS. 05-07-2021 01:51 PM
- Posted Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT on Statistical Procedures. 05-07-2021 12:09 PM
- Liked Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT for Rick_SAS. 05-07-2021 12:02 PM
- Liked Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT for sbxkoenk. 05-07-2021 11:43 AM
- Posted Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT on Statistical Procedures. 05-07-2021 11:31 AM
- Liked Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT for sbxkoenk. 05-07-2021 07:20 AM
- Got a Like for Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT. 05-06-2021 05:34 PM
- Posted Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT on Statistical Procedures. 05-06-2021 05:08 PM
-
Posts I Liked
Subject Likes Author Latest Post 2 1 1 2 -
My Liked Posts
Subject Likes Posted 1 05-06-2021 05:08 PM
05-07-2021
12:09 PM
Ugh! Sorry for being dense, but I tried this above and got the graph with multiple lines that I pasted above. Doing it again now, the only difference were that the lines had different colors, which I think are to show all possible levels of TIS. proc mixed covtest noclprint data = wab.data1 method=ml ;
class ID cov2(ref='1') cov1(ref="0") cov3;
model GSI = es TIS es*TIS time cov1 cov2 cov3 cov4 cov5
/s ddfm = SATTERTHWAITE CL outpredm=MargPreds;
random intercept /sub=ID type=un g;
run;
proc sgplot data=MargPreds;
series x=ES y=Pred / group=TIS;
run;
... View more
05-07-2021
11:31 AM
Yes, this blog post was extremely helpful to get me where I'm at now (that's where I got the code I pasted above). Given the multiple lines, it seems to me that the second figure displays the relationship between x (es) and y (gsi) across the different clusters (individuals) -- random effects. But I'm not interested in displaying random effects, just average effects of X on Y by levels of moderator. I'm looking for something very similar to the first figure I posted (i.e. predictions of y [GSI] by x [ES] grouped by arbitrary levels of the moderator [TIS] -- like mean-1SD and mean+1SD), but would like to edit axis labels, legends, line colors. I read in other posts to the community that it is a bit harder to do that in PROC PLM than in PROC SGPLOT, but I haven't been able to send output of my models to PROC SGPLOT. I've been struggling to get at that with the code and examples in the blog post you pasted. I even thought about creating line graphs in Excel based on coefficients in the output, but was unsure if in mixed-effects models the coefficient of X would be (b+d) as in OLS regression (Y = a + bX + cM + dX*M) given the random intercept in my model. Plus I am really interested in learning to do this in SAS given that I have to do similar graphs often in my research.
... View more
05-06-2021
05:08 PM
1 Like
I'm running a random intercept model with a continuous outcome and continuous-continuous interaction term. It is panel data with 3 time points: PROC MIXED covtest noclprint data = wab.data1 method=ml ; class ID cov2(ref='1') time(ref="0") cov1; model GSI = time es TIS es*TIS soc cov1 cov2 cov3 cov4 cov5 /s ddfm = SATTERTHWAITE CL OUTPREDM=Pred; random intercept /sub=ID type=un g; store Model; run; And plotting the significant interaction with PROC GLM at M-1SD and M+1SD values of one of the variables in the interaction term: PROC PLM source=Model ;
effectplot slicefit(x=ES sliceby=TIS=4.24 6.22);
run; plot I want, but not looking good Is there a way to customize the looks of the plot (change axis labels, colors, etc.)? I've seen other posts recommending using the OUTPREDM option and use PROC SGPLOT instead of PROC GLM, but the outcome is not what I want. proc sgplot data=Pred;
series x=ES y=Pred / group=TIS;
run; So is there an easy way to create a stored data with PROC MIXED coefficients for PROC SGPLOT? not what I want, but at least I can customize the looks
... View more