turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS/GRAPH and ODS Graphics
- /
- How can I make Predicted Mean Graph with 90%CI Usi...

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

2 weeks ago

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.

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.

Accepted Solutions

Solution

2 weeks ago

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to KentaMURANAKA

2 weeks ago - last edited 2 weeks ago

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;
```

All Replies

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to KentaMURANAKA

2 weeks ago

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?

Solution

2 weeks ago

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to KentaMURANAKA

2 weeks ago - last edited 2 weeks ago

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;
```

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Rick_SAS

2 weeks ago

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.