Hello Rick, Thank you so much for the fast response and for helping me out! My apologies for not posting the data but it has not been published yet. However, I can publish some data that is not for publishing to use as an example if it helps. Time in my model is a continuous variable so there are no fixed timepoints. This is clinical data from hospitalized patients and measurements differ by time collected so we need to adjust for time of measurement and hence, include time in the models. It is basically the time from hospital admission to actual measurement. I ran your script and when group=sex is in, it looks good, but when I remove it from the sgplot then I get a curved line rather than a straight line. The plot I am trying to re-create looks like this (below), where values are the observed ones and line of best fit is the one from the prediction equation obtained form the mixed regression model: Also, can you please let me know what is the difference between OUTP and OUTPM? I used both and the pred column in the output dataset is per individual in both cases so cannot see where they differ. Also, I ran the script you sent with the pred from OUTP and OUTPM and is the same. I am really new to SAS so still trying to figure basic stuff out! Thanks a ton! Vic
... View more