08-22-2011 01:43 PM
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!
08-22-2011 01:55 PM
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?
08-22-2011 03:51 PM
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;
/ 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.
08-22-2011 07:36 PM
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!