Data visualization with SAS programming

Proc Mixed Plots

Reply
Occasional Contributor
Posts: 18

Proc Mixed Plots

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

Trusted Advisor
Posts: 1,789

Re: Proc Mixed Plots

And I need a plot with 95% error.

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

Occasional Contributor
Posts: 18

Re: Proc Mixed Plots

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!


Trusted Advisor
Posts: 1,789

Re: Proc Mixed Plots

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.

Trusted Advisor
Posts: 1,789

Re: Proc Mixed Plots

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

Occasional Contributor
Posts: 18

Re: Proc Mixed Plots

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

Trusted Advisor
Posts: 1,789

Re: Proc Mixed Plots

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

Occasional Contributor
Posts: 18

Re: Proc Mixed Plots

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

Trusted Advisor
Posts: 1,789

Re: Proc Mixed Plots

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.

SAS Super FREQ
Posts: 3,624

Re: Proc Mixed Plots

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.

SAS Super FREQ
Posts: 3,624

Re: Proc Mixed Plots

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

Occasional Contributor
Posts: 18

Re: Proc Mixed Plots

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

Ask a Question
Discussion stats
  • 11 replies
  • 661 views
  • 6 likes
  • 3 in conversation