BookmarkSubscribeRSS Feed
ArchanaB
Calcite | Level 5

I am using SAS proc mixed to fit random effects models. The model line includes binary and categorical variables. I am trying to calculate the predicted outcomes (that take into account the confidence intervals) in SAS from proc mixed. Can anyone suggest any code in SAS that may create the equations to calculate different combinations of predicted outcomes that take into account varying values for each predicted outcome and the confidence intervals for each predictor variable on the model line based on the SAS Proc Mixed estimates? For example, having SAS calculate the predicted outcome on a cognitive test (measured outcome) for a person with a certain baseline age(predictor), with high vs. low pathology (predictor) on a specific visit? Thank you!  

3 REPLIES 3
Reeza
Super User

Does the Estimates statement within proc mixed not do this?

I might be missing something...

Or PROC SCORE but that would mean creating a dataset with the levels you're looking for?

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

I think you want predictions for certain values of the covariates or categorical variables. The easiest way is to stack some more data points at the end of your data set, with missing (.) for the response variable, and the desired values of the continuous and/or categorical variables. These missing records will not have any effect on the model fit, but will result in predictions of y in some output files. You will need to decide if you want marginal or conditional standard errors for the predictions of y. Then add the option to the model statement:

  / outp =outp;  * for conditional;

or

/ outm = outm; *for marginal;

If you print the created data file, you can see the desired predictions.I am guessing you would want the "marginal" results.

If you have sas 9.3, you could use the new PLM procedure to do the same, and a lot more. The approach is different -- check out the documentation.

ArchanaB
Calcite | Level 5

Reeza- thank you for your suggestions! LVM- I have been working on what you suggested for the past few hours and it worked!! Thanks for all your help!

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 4729 views
  • 0 likes
  • 3 in conversation