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

Dear All,

I've been trying to model the climate data (temperature) trend over time for combined sites using LMM Proc Mixed. I was just wondering if anyone experienced with mixed effect models could suggest which plots to use in illustrating the results of the model. I was thinking about plotting the fitted values from random coefficients model. I used the following code. However, I found the following error.

 

“NOTE: The data set WORK.PRED has 0 observations and 0 variables.

WARNING: Data set WORK.PRED was not replaced because new file is incomplete.

ERROR: Variable PRED not found.

 ERROR: Variable YEAR not found.

 ERROR: Variable PLOT not found”

 

Please suggest me what could be the proper code to visualise the output of LMM, Any suggestion is highly appreciated. Thanks. 

 

proc mixed data= import;
   class plot;
   model temp =  plot plot*year;
run;

proc mixed data=import;
         class plot;
         model temp = year /  ddfm=kr solution outp=pred;
         random int year / type=un subject=plot solution;
         run;

proc sort data=pred; 
         by year; 
         run;

proc sgplot data=pred;  
         series y=pred x=year / group=plot;
         run;

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @sohelsayma,

 

As a first step, I think, you should make sure that your input data are correct. Did you notice that the four time series for PLOT=1, 2, 3, 4 in temp.xlsx are exactly identical (maybe due to a copy/paste error)? This should not be the case in your dataset IMPORT in order for model variable PLOT to make sense.

 

Possibly, with correct data the issue with the OUTP= dataset will disappear. If you'll still get the same note about an empty dataset WORK.PRED, it would be helpful if you included the (presumably) preceding warning message from PROC MIXED in your post. This could read, for example, "WARNING: Did not converge." or "WARNING: Stopped because of too many likelihood evaluations." Then, mixed models experts in the forum will be able to give you further advice, also regarding illustrative plots.

The conference paper Tips and Strategies for Mixed Modeling with SAS/STAT® Procedures contains a lot of information about those statistical/computational issues such as failed convergence.

 

The three error messages (from PROC SGPLOT, I assume) are just a consequence of the previous issue with dataset PRED.

View solution in original post

4 REPLIES 4
FreelanceReinh
Jade | Level 19

Hello @sohelsayma,

 

As a first step, I think, you should make sure that your input data are correct. Did you notice that the four time series for PLOT=1, 2, 3, 4 in temp.xlsx are exactly identical (maybe due to a copy/paste error)? This should not be the case in your dataset IMPORT in order for model variable PLOT to make sense.

 

Possibly, with correct data the issue with the OUTP= dataset will disappear. If you'll still get the same note about an empty dataset WORK.PRED, it would be helpful if you included the (presumably) preceding warning message from PROC MIXED in your post. This could read, for example, "WARNING: Did not converge." or "WARNING: Stopped because of too many likelihood evaluations." Then, mixed models experts in the forum will be able to give you further advice, also regarding illustrative plots.

The conference paper Tips and Strategies for Mixed Modeling with SAS/STAT® Procedures contains a lot of information about those statistical/computational issues such as failed convergence.

 

The three error messages (from PROC SGPLOT, I assume) are just a consequence of the previous issue with dataset PRED.

sohelsayma
Obsidian | Level 7

Hello @FreelanceReinh,

FreelanceReinh
Jade | Level 19

Hello @sohelsayma,

 

Glad to read I could help you with my few hints. Thanks for accepting them. The preview window says "Error displaying attachment content" when I try to view your PDF file, but I think that's not important. Regarding your plot, please have a look at the PROC SGPLOT graph gallery: http://support.sas.com/sassamples/graphgallery/PROC_SGPLOT.html. I think, you could either create an overlay plot (i.e. add another SERIES statement to your existing PROC SGPLOT step, see Sample 39137 in the gallery) or possibly use the annotate feature (see Sample 49302) to draw your mean line.

 

If you get stuck, please feel free to create a new, specific post in the SAS/GRAPH and ODS Graphics board, where the ODS Graphics experts will be happy to help you. I'm sure, you will have your desired plot very soon.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 2452 views
  • 1 like
  • 2 in conversation