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

@Rick_SAS,

 

Yes, that makes sense. Is there a way to specify that the predicted values in the output are for trainer 1 and the mean values of the covariates? I realize the fit won't be very impressive, but this type of graph has been requested by my co-authors.

 

Thanks again for your help!

Katy

 

StatsMan
SAS Super FREQ

The predicted values produced by PROC MIXED are for the values of the categorical and continuous predictors present in the data.  You cannot change the values used to create the prediction - that really would not make a lot of sense.  The prediction for an observation in the input data set should be for the data in that observation.

 

You can get MIXED to give you extra predictions, though.  You can add observations to the DATA= data set that are at levels of the predictors that are of interest to you.  Set the value of the response value to missing.  Since the response is missing, MIXED will not use the information in those observations when estimating the parameters.  If only the response is missing, MIXED will produce predicted values and confidence intervals for those predictions.  You can use those predictions to create the plot you want using SGPLOT.  

Rick_SAS
SAS Super FREQ

In short, @StatsMan's suggestion is equivalent to creating a sliced fit plot. Many SAS regression procedures support the STORE statement to store the model in a SAS item store. You can then use PROC PLM to create the plot, as shown in the linked article.

 

The article also shows how to create a sliced fit plot when you want to include the observations or when you are using a procedure that does not support the STORE statement. What you do is to create a data set that contains the "slice" you want to score on. As StatsMan says, you use missing values for the response. Then you score the data and create the plot of the predicted values.

 

How to create a sliced fit plot in SAS

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!

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
  • 17 replies
  • 11408 views
  • 6 likes
  • 5 in conversation