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

Hi, All:

 

 

I'm trying to investigate clinical trial data by Linear Mixed-Effects Modeling and I want to make Predicted Mean Graph with 90%CI, which is like attached picture (Plots are not needed). 

I started hunting and got following ideas, but I haven't reached clear one yet, and they are like difficult ones to understand. If you have easier ideas, advice, reference documents and so on, please let me know. Thank you for your kind cooperation.

LikeThis.PNG

Ideas I reached are following.....

No. 1: Use OUTP= option in MODEL Statement of PROC MIXED -> Use SGPLOT (I couldn't get wanted one.)

No. 2: PROC MIXED or PROC GLIMMIX -> PROC PLM (difficult one? less information)

/* For Example, I want to make graph by using information in Output "Solution for Fixed Effects" */
data hospital;
    input hospital physician x y @@;
    datalines;
    1 1 19.4 32.4 1 1 19.3 28.3 1 1 19.2 31.9
    1 2 18.8 18.9 1 2 18.4 20.3 1 2 18.2 21.3
    1 3 19.7 24.8 1 3 20.4 38.6 1 3 20.2 27.4
    1 4 19.3 36.1 1 4 21.7 32.4 1 4 20.8 30.7
    2 1 21.5 31.3 2 1 18.7 28.5 2 1 19.9 20.1
    2 2 18.9 31.8 2 2 18.7 25.1 2 2 19.5 32.9
    2 3 18.7 18.3 2 3 19.4 27.4 2 3 19.5 26.2
    2 4 20.9 28.6 2 4 21.1 29.9 2 4 20.0 16.4
    ;
run;
proc mixed data=hospital;
    class hospital physician;
    model y=x / ddfm=kr solution;
    random int / subject=physician(hospital);
run;

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

You have to use the OUTPM= option on the MODEL statement to get the predicted means. Otherwise, the band and fitted values will be based on the individual predictions.

 

proc mixed data=hospital alpha=0.1;
    class hospital physician;
    model y=x / ddfm=kr solution outpm=Predicted;
    random int / subject=physician(hospital);
run;

proc sort data=Predicted; by x; run;

proc sgplot data=Predicted;
band x=x lower=Lower upper=Upper / legendlabel="90% CLM";
series x=x y=pred;
scatter x=x y=y;  
run;

 

View solution in original post

3 REPLIES 3
ballardw
Super User

Your first step would likely be to set the option Alpha=0.1 to create 90% confidence intervals. The default for Alpha is 0.05 creating 95% intervals.

 

Note that "couldn't get wanted one" does not clarify why you did not get the one you wanted. What was wrong, other than a likely Alpha related issue?

Rick_SAS
SAS Super FREQ

You have to use the OUTPM= option on the MODEL statement to get the predicted means. Otherwise, the band and fitted values will be based on the individual predictions.

 

proc mixed data=hospital alpha=0.1;
    class hospital physician;
    model y=x / ddfm=kr solution outpm=Predicted;
    random int / subject=physician(hospital);
run;

proc sort data=Predicted; by x; run;

proc sgplot data=Predicted;
band x=x lower=Lower upper=Upper / legendlabel="90% CLM";
series x=x y=pred;
scatter x=x y=y;  
run;

 

KentaMURANAKA
Pyrite | Level 9

Dear ballardw & Rick:

 

 

Thank you for your reply and I'm so sorry for confusing you with insufficient information.

Like Mr. Rick said, I used OUTP= option and I got data based on the individual predictions, so I was confused.

 

Now, I accomplished my objective.

Thank you so much.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1568 views
  • 3 likes
  • 3 in conversation