BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
lauragrau
Calcite | Level 5

Hello,

 

I raw this model:

 

proc mixed data=grouping ;
class id b;
model y=time|b/outpred=Pred;
random intercept /sub=id type=un;
store out=MixedModel;
lsmeans b/ at time=(0) diff;
lsmeans b/ at time=(3) diff;
run;

 

I can use PROC PLM to visualize the effectplot:

proc plm restore=MixedModel;
effectplot fit(x=time plotby=b)/clm; 
effectplot slicefit(x=time sliceby=b)/clm;
run;

 

Two questions:

1) Is there a way to change how PROC PLM's visuals look? I want to change the formatting!

 

 

I also tried this

proc sgplot data=pred;
band x=timelower=lower upper=upper/group=b transparency=.75;
series x=time y=pred/group=b;
run;

 

However, this graph looks different than the PLM graph.

 

T

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

There are two kinds of predicted values. The OUTPRED= option outputs the predicted that incorporate the random intercept estimates for each subject. The OUTPREDM= option outputs the marginal (averaged) predictions. These are the same predicted values that you obtain from the STORE statement and PROC PLM. 

 

So if you want to get the PROC PLM graph, use OUTPREDM=.

 

For details, an example, and more explanation, see "Visualize a mixed model that has repeated measures or random coefficients," especially the last section.

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Show us the plots. Describe what you don't like. Provide screen captures by clicking on the "Insert Photos" and not by attachments.

--
Paige Miller
lauragrau
Calcite | Level 5
Unfortunately, I can't! It's protected data. Basically, there are only two time points. PROC PLM makes a super nice graph with two lines, clearly showing the interaction. The SGPLOT has vertical lines at 0 and 3, which are then connected.
Rick_SAS
SAS Super FREQ

There are two kinds of predicted values. The OUTPRED= option outputs the predicted that incorporate the random intercept estimates for each subject. The OUTPREDM= option outputs the marginal (averaged) predictions. These are the same predicted values that you obtain from the STORE statement and PROC PLM. 

 

So if you want to get the PROC PLM graph, use OUTPREDM=.

 

For details, an example, and more explanation, see "Visualize a mixed model that has repeated measures or random coefficients," especially the last section.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 576 views
  • 0 likes
  • 3 in conversation