BookmarkSubscribeRSS Feed
SpanishPhD
Calcite | Level 5

Hi,

I need do a plot for my model in proc Mixed.
It is my final model:

proc mixed data=DatosExpIny2010 covtest;
class nest sex;
where F_Chick=1;
model Time= treatment date/ddfm=satterth;
random nest;
*lsmeans sex;
*estimate 'volumen huevo' huevovolok 1;
estimate 'orden_p' opuesta 1;
estimate 'trt' trt 1;
*estimate 'Fechatot' Fechatot 1;
*estimate 'Fase Pollo' F_Pollo 1;
run;

And I need a plot with 95% error.

Could you tell me the correct script?

Thank you very much.

All the best

11 REPLIES 11
PaigeMiller
Diamond | Level 26
And I need a plot with 95% error.

What statistic do you need a plot of with 95% confidence limits?

--
Paige Miller
SpanishPhD
Calcite | Level 5

Yes, I need to make a graph that represents the model. It should be a plot for Treatment and Time, becaue they are continuous variables. Also I need it with confidence limits. Thanks!


PaigeMiller
Diamond | Level 26

As far as I can see, there is no built in plotting with PROC MIXED that makes a plot of the model.

You might want to do this through PROC GLIMMIX followed by PROC PLM with the EFFECTPLOT statement.

--
Paige Miller
PaigeMiller
Diamond | Level 26

Update: Looks like PROC MIXED followed by PROC PLM with the EFFECTPLOT statement might work as well, but I haven't tried it.

--
Paige Miller
SpanishPhD
Calcite | Level 5

It sounds great! but... how i can do it? Thanks!

PaigeMiller
Diamond | Level 26

SpanishPhD wrote:

It sounds great! but... how i can do it? Thanks!

Here's an example using PROC ORTHOREG, maybe this can get you started

SAS/STAT(R) 12.1 User's Guide

--
Paige Miller
SpanishPhD
Calcite | Level 5

but this option does not allow me to work with random, do it?

PaigeMiller
Diamond | Level 26

As I said, it was an example.

I think you will need to use PROC MIXED or PROC GLIMMIX followed by PROC PLM, if you want to include a RANDOM statement in the model.

--
Paige Miller
Rick_SAS
SAS Super FREQ

If you want 95% CL for the mean predicted values, I think you can get that in an output data set.  On the MODEL statement, use the OUTP=  option to get an output data set. The doc says

"The L95 and U95 variables provide a t-type confidence interval for the predicted values, and they correspond to the L95M and U95M variables from the GLM and REG procedures for fixed-effects models. The residuals are the observed minus the predicted values."

You can then use PROC SGPLOT to plot the predicted and 95% CLM.

Rick_SAS
SAS Super FREQ

If you want to see examples of usnig PROC PLM, see the paper by Tobias and Cai (2010) : http://support.sas.com/resources/papers/proceedings10/258-2010.pdf

SpanishPhD
Calcite | Level 5

Thakns a lot!!! I will try it!!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 11 replies
  • 3715 views
  • 6 likes
  • 3 in conversation